Timeline



Oct 24, 2017:

11:55 PM Changeset in webkit [223950] by zandobersek@gmail.com
  • 3 edits in trunk/Source/bmalloc

[Linux] Enable Gigacage in x64 Linux environment
https://bugs.webkit.org/show_bug.cgi?id=177745
<rdar://problem/34773148>

Reviewed by Yusuke Suzuki.

Re-enable Gigacage on x86_64 Linux platforms after it was disabled in 223877.

The cause for the revert was problems with huge coredumps being generated
while Gigacage was enabled. The feature virtually allocates about 80GB of
memory at the beginning of the process lifetime. This is not a problem in
itself since the memory range is marked as not needed through madvise(),
but all this memory was still included upon core dump generation on Linux.
Since there are reasonable limits enforced upon core dumps, these were
being truncated every time, not yielding any useful information.

To avoid this, on Linux, invocations of madvise() with the MADV_NORMAL and
MADV_DONTNEED advice parameters should be accompanied with respectively
matching MADV_DODUMP and MADV_DONTDUMP madvise() calls. This correctly
avoids core-dumping any memory that's not yet been physically allocated.

  • bmalloc/Gigacage.h:
  • bmalloc/VMAllocate.h:

(bmalloc::vmDeallocatePhysicalPages):
(bmalloc::vmAllocatePhysicalPages):

11:26 PM Changeset in webkit [223949] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Clean up gcc build warnings about reaching the end of a non void function for webrtc classes
https://bugs.webkit.org/show_bug.cgi?id=178721

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-10-24
Reviewed by Youenn Fablet.

Assert when we reach those situations and return some value after that to avoid warning.

No new tests, this is a clean up.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::sessionDescriptionType):
(WebCore::signalingState):
(WebCore::toRTCIceConnectionState):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::bundlePolicyfromConfiguration):
(WebCore::iceTransportPolicyfromConfiguration):

10:37 PM Changeset in webkit [223948] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

REGRESSION(r222181): Web Inspector: Augmenting Agents Domains are not getting activated
https://bugs.webkit.org/show_bug.cgi?id=178768
<rdar://problem/35081334>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-24
Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

Simplify event dispatch.

  • UserInterface/Controllers/AppController.js:

(WI.AppController.prototype.activateExtraDomains):
Pass the domains on.

6:35 PM Changeset in webkit [223947] by rniwa@webkit.org
  • 5 edits
    2 adds in trunk

RenderSVGModelObject::checkIntersection triggers layout
https://bugs.webkit.org/show_bug.cgi?id=178710

Reviewed by Simon Fraser.

Source/WebCore:

Fixed the bug that checkIntersection and checkEnclosure no longer updates the layout after r223882.

Test: svg/custom/check-intersection-basic.svg

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
(WebCore::SVGSVGElement::checkIntersection):
(WebCore::SVGSVGElement::checkEnclosure):

  • svg/SVGSVGElement.h:

LayoutTests:

Added the support for SVG documents to js-test.js, and added a basic test for checkIntersection
and checkEnclosure using it.

  • resources/js-test.js:

(ensureRootElement): Added. Creates a foreignObject element inside a SVG document.
(moveForeignObjectToTopIfNeeded): Added. In SVG, z-index order is determined by the element order.
In order to make the results visible, we move the foreignObject to the top by appending to the end
of the document element.
(getOrCreate):
(debug): Run innerHTML before appendChild as setting namespaceURI before running innerHTML would
result in span's being parsed as SVG elements.
(insertStyleSheet):
(finishJSTest):

  • svg/custom/check-intersection-basic-expected.txt: Added.
  • svg/custom/check-intersection-basic.svg: Added.
6:34 PM Changeset in webkit [223946] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

Owner commit does not necessarily exist in the same commit set for an owned commit.
https://bugs.webkit.org/show_bug.cgi?id=178763

Reviewed by Ryosuke Niwa.

Remove the check based on previous incorrect assumption.
Added unit tests to cover this change.

  • public/privileged-api/create-test-group.php:
  • server-tests/privileged-api-create-test-group-tests.js:

(return.addTriggerableAndCreateTask.string_appeared_here.then.id.taskId.id.then):

5:52 PM Changeset in webkit [223945] by aestes@apple.com
  • 20 edits
    4 copies
    2 adds in trunk

[Apple Pay] Implement a paymentmethodselected event for PaymentRequest
https://bugs.webkit.org/show_bug.cgi?id=178765

Reviewed by Tim Horton.

Source/WebCore:

When the Apple Pay payment method changes, fire an applepaypaymentmethodchanged event on the
PaymentRequest object. The event has a paymentMethod property and an updateWith() method
which behaves identically to PaymentRequestUpdateEvent.updateWith().

Test: http/tests/ssl/applepay/ApplePayPaymentMethodUpdateEvent.https.html

  • DerivedSources.make:
  • Modules/applepay/ApplePayPaymentMethod.idl:
  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
  • Modules/applepay/PaymentMethod.h:

(WebCore::PaymentMethod::PaymentMethod): Deleted.
(WebCore::PaymentMethod::pkPaymentMethod const): Deleted.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::detailsUpdated):
(WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
(WebCore::ApplePayPaymentHandler::didSelectPaymentMethod):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/applepay/paymentrequest/ApplePayPaymentMethodUpdateEvent.cpp: Added.

(WebCore::ApplePayPaymentMethodUpdateEvent::ApplePayPaymentMethodUpdateEvent):
(WebCore::ApplePayPaymentMethodUpdateEvent::eventInterface const):

  • Modules/applepay/paymentrequest/ApplePayPaymentMethodUpdateEvent.h: Added.
  • Modules/applepay/paymentrequest/ApplePayPaymentMethodUpdateEvent.idl: Added.
  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::shippingAddressChanged):
(WebCore::PaymentRequest::shippingOptionChanged):
(WebCore::PaymentRequest::dispatchEvent):
(WebCore::PaymentRequest::updateWith):
(WebCore::PaymentRequest::settleDetailsPromise):
(WebCore::PaymentRequest::dispatchUpdateEvent): Deleted.

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentRequest.idl:
  • Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:

(WebCore::PaymentRequestUpdateEvent::updateWith):

  • Modules/paymentrequest/PaymentRequestUpdateEvent.h:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventNames.h:
  • dom/EventNames.in:
  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::changePaymentMethod):

  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl:
  • testing/MockPaymentMethod.h: Added.

LayoutTests:

  • http/tests/ssl/applepay/ApplePayPaymentMethodUpdateEvent.https-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePayPaymentMethodUpdateEvent.https.html: Added.
5:47 PM Changeset in webkit [223944] by commit-queue@webkit.org
  • 6 edits in trunk/Source

ServiceWorkerClientFetch should return an error that is not null in case of failure
https://bugs.webkit.org/show_bug.cgi?id=178761

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-24
Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by existing tests.

As per spec, ServiceWorkerJob should not go through Service Worker Handle Fetch
for fetching scripts.

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadAsynchronously):

  • workers/WorkerScriptLoaderClient.h:

(WebCore::WorkerScriptLoaderClient::isServiceWorkerClient const):

  • workers/service/ServiceWorkerJob.h:

Source/WebKit:

  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::didFail): Generating a General error.

5:36 PM Changeset in webkit [223943] by Michael Catanzaro
  • 3 edits in trunk/Tools

Unreviewed, fix name of Perl LibXML package on Fedora
https://bugs.webkit.org/show_bug.cgi?id=178206
<rdar://problem/35028586>

  • gtk/install-dependencies:
  • wpe/install-dependencies:
5:33 PM Changeset in webkit [223942] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Move inspector and loader to unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178760

Rubber-stamped by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
5:27 PM Changeset in webkit [223941] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix build after r223940

  • inspector/WebConsoleAgent.cpp:
5:12 PM Changeset in webkit [223940] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build after r223929.
https://bugs.webkit.org/show_bug.cgi?id=177027

  • inspector/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::getLoggingChannels):
Always initialize the variable "level". Visual studio was complaining about the possibility of not initializing it
but this is only possible if logChannel->level is an invalid enum value.

5:09 PM Changeset in webkit [223939] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build after r223925
https://bugs.webkit.org/show_bug.cgi?id=178687

  • html/ImageBitmap.cpp:

(WebCore::interpolationQualityForResizeQuality):
Visual Studio was complaining that not all control paths returned a value.

4:33 PM Changeset in webkit [223938] by dbates@webkit.org
  • 3 edits in trunk/LayoutTests

Test fast/writing-mode/english-bt-text-with-spelling-marker.html should wait for editing commands to complete
https://bugs.webkit.org/show_bug.cgi?id=178759

Reviewed by Ryosuke Niwa.

Make use of typeCharacterCommand() from (LayoutTests/editing/editing.js) to type each character
with a delay and delay test completion until all characters have been typed.

  • fast/writing-mode/english-bt-text-with-spelling-marker-expected.html:
  • fast/writing-mode/english-bt-text-with-spelling-marker.html:
3:59 PM Changeset in webkit [223937] by msaboff@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Allow OjbC Weak References when building TestAPI
https://bugs.webkit.org/show_bug.cgi?id=178748

Reviewed by Dan Bernstein.

Set TestAPI build flag Weak References in Manual Retain Release to true.

  • JavaScriptCore.xcodeproj/project.pbxproj: Reverted.
  • Configurations/ToolExecutable.xcconfig: Changed the flag here instead.
3:30 PM Changeset in webkit [223936] by ddkilzer@apple.com
  • 5 edits in trunk/Source/bmalloc

Need to pass non-nil argument to SimulateCrash() in bmalloc::logVMFailure()
<https://webkit.org/b/178740>
<rdar://problem/35154943>

Reviewed by Saam Barati.

  • bmalloc/BPlatform.h:

(BUNUSED_PARAM): Define macro.

  • bmalloc/Logging.cpp:

(SimulateCrash): Change third argument of SimulateCrash() to
CFStringRef since it's an NSString * in Objective-C.
(bmalloc::logVMFailure): Create a CFStringRef to use as a
description string. Use new vmSize parameter to log size.

  • bmalloc/Logging.h:

(bmalloc::logVMFailure): Update function signature to take a
size_t parameter representing vmSize.

  • bmalloc/VMAllocate.h:

(bmalloc::tryVMAllocate): Pass vmSize into logVMFailure().

3:28 PM Changeset in webkit [223935] by commit-queue@webkit.org
  • 17 edits
    1 copy
    5 adds in trunk

Enable service worker to use cache storage api
https://bugs.webkit.org/show_bug.cgi?id=178684

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

Source/WebCore:

Test: http/tests/workers/service/service-worker-cache-api.https.html

Updated WorkerLoaderProxy so that it can create a CacheStorageConnection.
Update WorkerCacheStorageConnection to take benefit of that.
This allows creating a CacheStorageConnection based on the page for regular workers and differently for Service Worker context.

Added ServiceWorkerThreadProxy as a proxy to ServiceWorkerThread.
It is in particular responsible to do proxy for loading tasks.
It implements cache API support for service worker by creating a dedicated CacheStorageConnection.

  • Modules/cache/WorkerCacheStorageConnection.cpp:

(WebCore::WorkerCacheStorageConnection::create):
(WebCore::WorkerCacheStorageConnection::~WorkerCacheStorageConnection):
(WebCore::WorkerCacheStorageConnection::doOpen):
(WebCore::WorkerCacheStorageConnection::doRemove):
(WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
(WebCore::WorkerCacheStorageConnection::reference):
(WebCore::WorkerCacheStorageConnection::dereference):
(WebCore::WorkerCacheStorageConnection::doRetrieveRecords):
(WebCore::WorkerCacheStorageConnection::doBatchDeleteOperation):
(WebCore::WorkerCacheStorageConnection::doBatchPutOperation):

  • WebCore.xcodeproj/project.pbxproj:
  • workers/WorkerLoaderProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::createCacheStorageConnection):

  • workers/WorkerMessagingProxy.h:
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):

  • workers/service/context/ServiceWorkerThread.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp: Added.

(WebCore::ServiceWorkerThreadProxy::create):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
(WebCore::ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::ServiceWorkerThreadProxy::postTaskToLoader):
(WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection):

  • workers/service/context/ServiceWorkerThreadProxy.h: Added.

Source/WebKit:

Passing the WebPreferences store of the default page group of the WebProcessPool to its ServiceWorker process.
ServiceWorkerContextManager then uses it to initialize the preferences accordingly.
Patch is covered by new test which is using cache api previously disabled and now enabled through the store.

Made use of the new ServiceWorkerThreadProxy in ServiceWorkerContextManager to enable a cache storage connection.
Fixed the default size of quota in WebsiteDataStore.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::getWorkerContextProcessConnection):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebProcess/Storage/ServiceWorkerContextManager.cpp:

(WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):
(WebKit::ServiceWorkerContextManager::updatePreferences):
(WebKit::ServiceWorkerContextManager::startServiceWorker):
(WebKit::ServiceWorkerContextManager::startFetch):

  • WebProcess/Storage/ServiceWorkerContextManager.h:

(WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager): Deleted.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWorkerContextConnection):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:

LayoutTests:

  • http/tests/workers/service/resources/service-worker-cache-api-worker.js: Added.
  • http/tests/workers/service/resources/service-worker-cache-api.js: Added.
  • http/tests/workers/service/service-worker-cache-api.https-expected.txt: Added.
  • http/tests/workers/service/service-worker-cache-api.https.html: Added.
3:23 PM Changeset in webkit [223934] by achristensen@apple.com
  • 4 edits in trunk

Selecting and right-clicking URL-like strings with IDNA-disallowed characters in host or authority causes rendering engine crash
https://bugs.webkit.org/show_bug.cgi?id=174267

Reviewed by Tim Horton.

Source/WebKit:

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

(WKBundlePageCanHandleRequest):

Tools:

  • TestWebKitAPI/Tests/WebKit/CanHandleRequest_Bundle.cpp:

(TestWebKitAPI::runTest):

3:20 PM Changeset in webkit [223933] by achristensen@apple.com
  • 4 edits in trunk/Source/WebCore

Optionally store entire ResourceRequest for ping loads
https://bugs.webkit.org/show_bug.cgi?id=178756

Reviewed by Tim Horton.

No change in behavior.
This uses less memory in the common loading case.
This will be needed for moving appcache loading to the Networking Process.
See https://bugs.webkit.org/show_bug.cgi?id=178540

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::setOriginalRequest):
(WebCore::CachedResource::originalRequest const):
(WebCore::CachedResource::setOriginalRequestHeaders): Deleted.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

3:19 PM Changeset in webkit [223932] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Skipped imported/w3c/web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/011.html on High Sierra Release.
https://bugs.webkit.org/show_bug.cgi?id=178553

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:11 PM Changeset in webkit [223931] by Joseph Pecoraro
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Console Drawer resizing doesn't match cursor position
https://bugs.webkit.org/show_bug.cgi?id=178753
<rdar://problem/35160484>

Reviewed by Brian Burg.

  • UserInterface/Views/ConsoleDrawer.js:

(WI.ConsoleDrawer.prototype._updateDrawerHeight):
Drive-by fix an early return that would never have worked.

  • UserInterface/Views/Main.css:

(#content):
Give the #content a flex grow of 1. This causes the space to grow as it
already was but now it does not affect the size of the fixed height sibling.

3:05 PM Changeset in webkit [223930] by aestes@apple.com
  • 4 edits in trunk/Source/WebCore

[WebIDL] Support the ExportMacro attribute for dictionaries
https://bugs.webkit.org/show_bug.cgi?id=178752

Reviewed by Sam Weinig.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryHeaderContent):

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
  • bindings/scripts/test/TestStandaloneDictionary.idl:
3:00 PM Changeset in webkit [223929] by eric.carlson@apple.com
  • 43 edits
    1 copy
    2 adds in trunk

Web Inspector: Enable WebKit logging configuration and display
https://bugs.webkit.org/show_bug.cgi?id=177027
<rdar://problem/33964767>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/ConsoleMessage.cpp:

(Inspector::messageSourceValue): Inspector::Protocol::Console::ConsoleMessage ->

Inspector::Protocol::Console::ChannelSource.

  • inspector/agents/JSGlobalObjectConsoleAgent.cpp:

(Inspector::JSGlobalObjectConsoleAgent::getLoggingChannels): There are no logging channels

specific to a JSContext yet, so return an empty channel array.

(Inspector::JSGlobalObjectConsoleAgent::setLoggingChannelLevel): No channels, return an error.

  • inspector/agents/JSGlobalObjectConsoleAgent.h:
  • inspector/protocol/Console.json: Add ChannelSource, ChannelLevel, and Channel. Add getLoggingChannels

and setLoggingChannelLevel.

  • inspector/scripts/codegen/generator.py: Special case "webrtc"-> "WebRTC".
  • inspector/scripts/tests/generic/expected/enum-values.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
  • runtime/ConsoleTypes.h: Add Media and WebRTC.

Source/WebCore:

Test: inspector/console/webcore-logging.html

  • dom/Document.cpp:

(WebCore::Document::~Document): Stop observing the logger.
(WebCore::Document::logger): Observe the logger.
(WebCore::Document::didLogMessage): Forward logging messages to the inspector.

  • dom/Document.h:
  • inspector/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::getLoggingChannels): New, return the state of log runtime channels.
(WebCore::WebConsoleAgent::setLoggingChannelLevel): New, set the state of a channel.

  • inspector/WebConsoleAgent.h:
  • platform/Logging.cpp:

(WebCore::getLogChannel): New, get a log channel by name.

  • platform/Logging.h:

Source/WebCore/PAL:

  • pal/Logger.h:

(PAL::Logger::willLog const): Always return true for Always and Error so those messages are

always logged to the system.

(PAL::Logger::log): Always log Always and Error to the system, but pay strict attention to level

and channel state for logging to observers so logging only shows up in the inspector when
explicitly enabled by the user.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js: Add new localized strings.
  • UserInterface/Controllers/LogManager.js:

(WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels.
(WI.LogManager.supportsLogChannels): New.
(WI.LogManager.prototype.get customLoggingChannels): New.
(WI.LogManager.prototype.get logChannelSources): New.

  • UserInterface/Main.html:
  • UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC.
  • UserInterface/Models/IssueMessage.js:

(WI.IssueMessage): Add media and webrtc.

  • UserInterface/Models/LoggingChannel.js: Added.

(WI.LoggingChannel):
(WI.LoggingChannel.fromPayload):
(WI.LoggingChannel.prototype.get source):
(WI.LoggingChannel.prototype.get level):

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel

scope buttons once logging has started.

(WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary.
(WI.LogContentView.prototype._scopeFromMessageSource): New.
(WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug.
(WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log

message is added.

(WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons.
(WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New.
(WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus

for each log channel.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.mm:

(stringForMessageSource): Deal with Media and WebRTC message sources.

Tools:

Allow new 'dumpJSConsoleLogInStdErr' test header to redirect log console output to stderr.

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(runTest):

  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::runTest):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

  • inspector/console/webcore-logging-expected.txt: Added.
  • inspector/console/webcore-logging.html: Added.
  • platform/mac/TestExpectations: Skip new test on Yosemite and ElCapitan.
  • platform/win/TestExpectations: Skip new test.
2:58 PM Changeset in webkit [223928] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Attempted build fix for Sierra.

  • html/ImageBitmap.cpp:

(WebCore::croppedSourceRectangleWithFormatting):

2:55 PM Changeset in webkit [223927] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Uncaught Exception: TypeError: null is not an object (evaluating 'this.treeOutline.isXMLMimeType')
https://bugs.webkit.org/show_bug.cgi?id=178745

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-24
Reviewed by Brian Burg.

  • UserInterface/Views/DOMTreeUpdater.js:

(WI.DOMTreeUpdater.prototype._updateModifiedNodes):
An earlier tree element update might have caused this other tree element's
waiting to be updated to actually be removed. So just skip past them.

2:48 PM Changeset in webkit [223926] by msaboff@apple.com
  • 2 edits in trunk/Source/WTF

WTF: Eliminated PLATFORM checks for HAVE_MACH_EXCEPTIONS
https://bugs.webkit.org/show_bug.cgi?id=178747

Reviewed by Saam Barati.

Removed unnecessary PLATFORM checks as they can cause build failures
when the include file is present.

  • wtf/Platform.h:
2:46 PM Changeset in webkit [223925] by dino@apple.com
  • 7 edits
    1 move
    5 adds in trunk

Implement resizing options for ImageBitmap rendering
https://bugs.webkit.org/show_bug.cgi?id=178687
<rdar://problem/35135417>

Reviewed by Sam Weinig.

Source/WebCore:

Implement many of the sizing options for createImageBitmap.

Test: http/wpt/2dcontext/imagebitmap/createImageBitmap-sizing.html

  • html/ImageBitmap.cpp:

(WebCore::croppedSourceRectangleWithFormatting):

Implement the first bit of the algorithm from
the HTML specification.

(WebCore::outputSizeForSourceRectangle):

... and then the second bit. Leave the rest in
comments for now.

(WebCore::interpolationQualityForResizeQuality):

Helper function to map ImageBitmapOptions to
GraphicsContext.

(WebCore::ImageBitmap::createPromise):

Implement more of the sizing algorithm.

  • html/ImageBitmap.h: Origin tainting is defined to be false by default.

LayoutTests:

More ImageBitmap tests, this time focusing on sizing.

  • http/wpt/2dcontext/imagebitmap/common.js:

(createCanvasOfSize):
(create9x9CanvasWith2dContext):
(create18x18CanvasWith2dContext):

Helper functions.

  • http/wpt/2dcontext/imagebitmap/createImageBitmap-sizing-expected.txt: Added.
  • http/wpt/2dcontext/imagebitmap/createImageBitmap-sizing.html: Added.
  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap.html:
  • http/wpt/2dcontext/imagebitmap/resources/target-blue-dot-no-intrinsic.svg: Added.
  • http/wpt/2dcontext/imagebitmap/resources/target-blue-dot.png: Renamed from LayoutTests/http/wpt/2dcontext/imagebitmap/target-blue-dot.png.
  • http/wpt/2dcontext/imagebitmap/resources/target-blue-dot.svg: Added.
2:35 PM Changeset in webkit [223924] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add Recording.svg
https://bugs.webkit.org/show_bug.cgi?id=175045

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-24
Reviewed by Brian Burg.

  • UserInterface/Images/gtk/Recording.svg: Added.
2:31 PM Changeset in webkit [223923] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Allow OjbC Weak References when building TestAPI
https://bugs.webkit.org/show_bug.cgi?id=178748

Reviewed by Saam Barati.

Set TestAPI build flag Weak References in Manual Retain Release to true.

2:22 PM Changeset in webkit [223922] by Chris Dumez
  • 34 edits
    3 copies
    5 adds in trunk

Add initial implementation for serviceWorker.postMessage()
https://bugs.webkit.org/show_bug.cgi?id=178534

Reviewed by Youenn Fablet.

Source/WebCore:

Add initial implementation for serviceWorker.postMessage():

Test: http/tests/workers/service/basic-ServiceWorker-postMessage.https.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSExtendableMessageEvent.cpp: Added.

(WebCore::JSExtendableMessageEvent::data const):

  • bindings/js/WebCoreBuiltinNames.h:
  • dom/Document.h:
  • dom/EventNames.in:
  • dom/MessagePortChannel.h:
  • dom/ScriptExecutionContext.h:
  • workers/WorkerGlobalScope.h:
  • workers/service/ExtendableEvent.cpp:

(WebCore::ExtendableEvent::ExtendableEvent):
(WebCore::ExtendableEvent::~ExtendableEvent):

  • workers/service/ExtendableEvent.h:
  • workers/service/ExtendableMessageEvent.cpp: Added.

(WebCore::ExtendableMessageEvent::create):
(WebCore::ExtendableMessageEvent::ExtendableMessageEvent):
(WebCore::ExtendableMessageEvent::~ExtendableMessageEvent):

  • workers/service/ExtendableMessageEvent.h: Added.
  • workers/service/ExtendableMessageEvent.idl: Added.
  • workers/service/ServiceWorker.cpp:

(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::postMessage):
(WebCore::ServiceWorker::state const):
(WebCore::ServiceWorker::scriptExecutionContext const):

  • workers/service/ServiceWorker.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::controller const):

  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::thread):

  • workers/service/ServiceWorkerGlobalScope.h:

(isType):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::postMessageToServiceWorkerGlobalScope):

  • workers/service/context/ServiceWorkerThread.h:
  • workers/service/server/SWClientConnection.h:

Source/WebKit:

Add initial implementation for serviceWorker.postMessage():

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/ServiceWorkerContextManager.cpp:

(WebKit::ServiceWorkerContextManager::postMessageToServiceWorkerGlobalScope):

  • WebProcess/Storage/ServiceWorkerContextManager.h:
  • WebProcess/Storage/ServiceWorkerContextManager.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):

  • WebProcess/Storage/WebSWClientConnection.h:

LayoutTests:

Add layout test coverage.

  • http/tests/workers/service/basic-ServiceWorker-postMessage.https-expected.txt: Added.
  • http/tests/workers/service/basic-ServiceWorker-postMessage.https.html: Added.
  • http/tests/workers/service/resources/basic-ServiceWorker-postMessage-worker.js: Added.
  • http/tests/workers/service/resources/basic-ServiceWorker-postMessage.js: Added.
2:17 PM Changeset in webkit [223921] by webkit@devinrousso.com
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: allow ShaderProgram to be shown in CanvasContentView
https://bugs.webkit.org/show_bug.cgi?id=178714

Reviewed by Brian Burg.

  • UserInterface/Views/CanvasDetailsSidebarPanel.js:

(WI.CanvasDetailsSidebarPanel.prototype.inspect):
Allow ShaderProgram to show the related Canvas information.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView.prototype.canShowRepresentedObject):
(WI.CanvasTabContentView.prototype.showRepresentedObject):
(WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
If a ShaderProgram is selected in the path component, display a ShaderProgramContentView.

2:08 PM Changeset in webkit [223920] by webkit@devinrousso.com
  • 11 edits in trunk/Source/WebInspectorUI

Web Inspector: remove canvases from Resources and experimental setting/UI
https://bugs.webkit.org/show_bug.cgi?id=178711

Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WI.tabContentViewClassForRepresentedObject):

  • UserInterface/Base/Setting.js:
  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager.prototype.canvasAdded):
(WI.CanvasManager.prototype.canvasRemoved):

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

(WI.Frame):
(WI.Frame.prototype.get extraScriptCollection):
(WI.Frame.prototype.commitProvisionalLoad):
(WI.Frame.prototype.get canvasCollection): Deleted.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView.isTabAllowed):

  • UserInterface/Views/FrameTreeElement.js:

(WI.FrameTreeElement):
(WI.FrameTreeElement.prototype.onattach):
(WI.FrameTreeElement.prototype.ondetach):
(WI.FrameTreeElement.prototype.onpopulate):
(WI.FrameTreeElement.prototype._styleSheetAdded):
(WI.FrameTreeElement.prototype._canvasWasAdded): Deleted.
(WI.FrameTreeElement.prototype._canvasWasRemoved): Deleted.

  • UserInterface/Views/ResourceSidebarPanel.js:

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

  • UserInterface/Views/ResourcesTabContentView.js:

(WI.ResourcesTabContentView):
(WI.ResourcesTabContentView.prototype.canShowRepresentedObject):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

1:48 PM Changeset in webkit [223919] by Yusuke Suzuki
  • 5 edits
    1 add in trunk

[FTL] Support NewStringObject
https://bugs.webkit.org/show_bug.cgi?id=178737

Reviewed by Saam Barati.

JSTests:

  • stress/new-string-object.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

FTL should support NewStringObject and encourage use of NewStringObject in DFG pipeline.
After this change, we can convert CallObjectConstructor(String) to NewStringObject(String).

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewStringObject):

1:47 PM Changeset in webkit [223918] by webkit@devinrousso.com
  • 18 edits
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: Show recordings in CanvasTabContentView
https://bugs.webkit.org/show_bug.cgi?id=177606
<rdar://problem/34715819>

Reviewed by Brian Burg.

Original patch by Matt Baker <Matt Baker>.

This patch folds canvas recordings into the new Canvas tab, which now
supports showing both CanvasCollections and Recordings.

When viewing recordings, a back button is shown at the start of the
navigation bar, allowing the user to return to the overview. It has been
styled with a back arrow, to make its function as clear as possible.
Like other navigation path components, the item for the recording can
clicked to select another recording taken from the same canvas.

The recording action scrubber has been moved from the content browser's
navigation bar to a more prominent location in the recording content view.
Selecting a frame tree element in the navigation sidebar no longer selects
the last action for that frame. This was changed to prevent the scrubber
position from behaving non-monotonically when selecting actions in sequential
order.

While this patch retains support for importing recordings, the feature
is not polished. Currently it is not possible to return to an imported
recording after leaving closing the view. In the future we may want to
consider including a navigation sidebar panel for the overview, which
could list canvas recordings (and eventually shaders).

  • .eslintrc:

Drive-by: remove duplicate key.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Main.js:

(WI.contentLoaded):
(WI.tabContentViewClassForRepresentedObject):

  • UserInterface/Main.html:
  • UserInterface/Views/RecordingTabContentView.js: Removed.

Remove RecordingTabContentView.

  • UserInterface/Images/Recording.svg:

New recording icon, used for tree elements and canvas preview UI.

  • UserInterface/Models/Recording.js:

(WI.Recording):
(WI.Recording.prototype.get visualActionIndexes):
Visual action indexes should be computed by the recording.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):
(WI.CanvasContentView.prototype.refresh):
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype._recordingStopped):
(WI.CanvasContentView.prototype._handleRecordingSelectElementChange):
New UI for showing CanvasContentView as a CollectionView item. Includes
recordings button and select for choosing a recording to view.

  • UserInterface/Views/CanvasOverviewContentView.css:

(.content-view.canvas-overview .content-view.canvas > header):
Switch to 13px, which is more frequently used.

(.content-view.canvas-overview .content-view.canvas > header .subtitle::before):
Switch to literal em dash. Surrounding spaces were ignored when using
the backslash-escaped character.

(.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar):
(.content-view.canvas-overview .content-view.canvas > footer > .recordings):
(.content-view.canvas-overview .content-view.canvas > footer > .recordings::before):
(.content-view.canvas-overview .content-view.canvas > footer > .recordings > select):
(.content-view.canvas-overview .content-view.canvas > footer .recordings > select:focus):
(.content-view.canvas-overview .content-view.canvas > footer > .flexible-space):
(.popover-content > .tree-outline .item.recording > .icon):
(.popover-content > .tree-outline .item.recording:hover):
(.popover-content > .tree-outline .item.recording:hover > .icon):
(.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar): Deleted.
(.content-view.canvas-overview .content-view.canvas > footer): Deleted.
New styles for the recording picker.

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype.get selectionPathComponents):
(WI.CanvasOverviewContentView.prototype.contentViewAdded):
(WI.CanvasOverviewContentView.prototype.contentViewRemoved):
(WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
(WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged): Deleted.
(WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent): Deleted.
Canvas tree elements are now managed by CanvasTabContentView, which is
now responsible for maintaining the tree of canvas objects. For now the
tree holds canvases and recordings, but will eventually include shader programs.

  • UserInterface/Views/CanvasTabContentView.css:

(.content-view.tab.canvas .navigation-bar > .item .recording > .icon):
(.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon): Deleted.
Add styles for recording path components.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.treeElementForRepresentedObject):
(WI.CanvasTabContentView.prototype.canShowRepresentedObject):
(WI.CanvasTabContentView.prototype.showRepresentedObject):
(WI.CanvasTabContentView.prototype.shown):
(WI.CanvasTabContentView.prototype.restoreStateFromCookie):
(WI.CanvasTabContentView.prototype.attached):
(WI.CanvasTabContentView.prototype.detached):
(WI.CanvasTabContentView.prototype._canvasAdded):
(WI.CanvasTabContentView.prototype._canvasRemoved):
(WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
(WI.CanvasTabContentView.prototype._recordingStopped):
(WI.CanvasTabContentView.prototype._navigationSidebarImport):
(WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged):
(WI.CanvasTabContentView.prototype._recordingAdded):
(WI.CanvasTabContentView.prototype._recordingActionIndexChanged):
(WI.CanvasTabContentView.prototype._updateActionIndex):
(WI.CanvasTabContentView.prototype.restoreFromCookie): Deleted.
(WI.CanvasTabContentView.prototype._overviewPathComponentClicked): Deleted.

  • UserInterface/Views/ContentView.js:

(WI.ContentView.createFromRepresentedObject):

  • UserInterface/Views/RecordingActionTreeElement.css:

(body:not(.window-inactive, .window-docked-inactive) .tree-outline:matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,):
(body:not(.window-inactive, .window-docked-inactive) :matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): Deleted.

  • UserInterface/Views/RecordingContentView.css:

(.content-view:not(.tab).recording):
(.content-view:not(.tab).recording > header):
(.content-view:not(.tab).recording > header > .slider-container):
(.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
(.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-runnable-track):
(.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-thumb):
(.content-view:not(.tab).recording > .preview-container):

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.initialLayout):
(WI.RecordingContentView.prototype.async._generateContentCanvas2D):
(WI.RecordingContentView.prototype._updateSliderValue):
(WI.RecordingContentView.prototype._sliderChanged):
(WI.RecordingContentView.prototype.get supplementalRepresentedObjects): Deleted.

  • UserInterface/Views/RecordingNavigationSidebarPanel.js:

(WI.RecordingNavigationSidebarPanel.prototype.set recording):
(WI.RecordingNavigationSidebarPanel.prototype.updateActionIndex):

  • UserInterface/Views/ResourceIcons.css:

(.canvas .icon):
(.canvas.canvas-2d .icon): Deleted.
(.canvas:matches(.webgl, .webgl2, .webgpu) .icon): Deleted.

1:45 PM Changeset in webkit [223917] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening. Update inspector/network/har tests.

  • http/tests/inspector/network/har/har-page-expected.txt:

Size of the test file changed and results needed to be updated.

1:36 PM Changeset in webkit [223916] by guijemont@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

[mips] fix offsets of branches that have to go over a jump
https://bugs.webkit.org/show_bug.cgi?id=153464

The jump() function creates 8 instructions, but the offsets of branches
meant to go over them only account for 6. In most cases, this is not an
issue as the last two instructions of jump() would be nops, but in the
rarer case where the jump destination is in a different 256 MB segment,
MIPSAssembler::linkWithOffset() will rewrite the code in a way in which
the last 4 instructions would be a 2 instruction load (lui/ori) into
$t9, a "j $t9" and then a nop. The wrong offset will mean that the
previous branches meant to go over the whole jump will branch to the
"j $t9" instruction, which would jump to whatever is currently in $t9
(since lui/ori would not be executed).

Reviewed by Michael Catanzaro.

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::branchAdd32):
(JSC::MacroAssemblerMIPS::branchMul32):
(JSC::MacroAssemblerMIPS::branchSub32):
Fix the offsets of branches meant to go over code generated by jump().

1:21 PM Changeset in webkit [223915] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip fast/html/marquee-reparent-check.html on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=178465

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:11 PM Changeset in webkit [223914] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: Layer mutations should be purely based on layerId, not based on nodeId
https://bugs.webkit.org/show_bug.cgi?id=178554

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-24
Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • UserInterface/Controllers/LayerTreeManager.js:

(WI.LayerTreeManager.prototype.layerTreeMutations):
Looking for special cases involving nodeIds is incorrect, as nodeIds need not be unique in the layer list (such
as when an element and a pseudo-element thereof each give rise to a layer). A layer object marked "preserved" in
this way shares no data with its predecessor, meaning that no consumer can act upon this so-called preservation.
A preserved layer should be nothing more or less than a recycled layerId (the thing that *is* unique).

LayoutTests:

  • inspector/layers/layer-tree-manager-expected.txt:
  • inspector/layers/layer-tree-manager.html:
1:08 PM WebKitGTK/Gardening/Calendar edited by Adrian Perez de Castro
(diff)
1:06 PM Changeset in webkit [223913] by Adrian Perez de Castro
  • 2 edits
    2 adds in trunk/LayoutTests

[GTK] Unskip layout tests editing/deleting/delete-emoji-1.html & editing/deleting/delete-emoji-1.html
https://bugs.webkit.org/show_bug.cgi?id=178742

Unreviewed test gardening.

  • platform/gtk/TestExpectations: Updated expectations for the emoji deletion layout tests.
  • platform/gtk/editing/deleting/delete-emoji-1-expected.txt: Added.
  • platform/gtk/editing/deleting/delete-emoji-expected.txt: Added.
1:04 PM Changeset in webkit [223912] by Adrian Perez de Castro
  • 2 edits in trunk/LayoutTests

[WPE] Remove expectations for tests which do not exist anymore
https://bugs.webkit.org/show_bug.cgi?id=178717

Unreviewed WPE test gardening.

This avoids the following warning being emitted by run-webkit-tests:

--lint-test-files warnings:
LayoutTests/platform/wpe/TestExpectations:366 Path does not exist. fast/events/constructors/device-proximity-event-constructor.html
LayoutTests/platform/wpe/TestExpectations:902 Path does not exist. http/tests/dom/document-attributes-null-handling

  • platform/wpe/TestExpectations:
12:56 PM Changeset in webkit [223911] by Adrian Perez de Castro
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ test gardening.

  • platform/gtk/TestExpectations:
12:53 PM Changeset in webkit [223910] by aestes@apple.com
  • 16 edits
    6 adds in trunk

[Payment Request] Implement the "PaymentRequest updated" algorithm
https://bugs.webkit.org/show_bug.cgi?id=178689

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-update-event-updatewith-method.https-expected.txt:

Source/WebCore:

Implemented the "PaymentRequest updated" algorithm by firing shippingaddresschange and
shippingoptionchange events at the right times and implementing
PaymentRequestUpdateEvent.updateWith().

Tests: http/tests/paymentrequest/payment-request-change-shipping-address.https.html

http/tests/paymentrequest/payment-request-change-shipping-option.https.html
http/tests/paymentrequest/updateWith-method-pmi-handling.https.html

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::convertAndValidate): Added. Converts a PaymentDetailsInit to a
ApplePaySessionPaymentRequest::TotalAndLineItems.
(WebCore::ApplePayPaymentHandler::shippingAddressUpdated): Created a ShippingContactUpdate
and passed it to PaymentCoordinator::completeShippingContactSelection().
(WebCore::ApplePayPaymentHandler::shippingOptionUpdated): Created a ShippingMethodUpdate and
passed it to PaymentCoordinator::completeShippingMethodSelection().

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails): Moved the logic for checking and canonicalizing a
PaymentDetailsBase from PaymentRequest::create() to here.
(WebCore::PaymentRequest::create): Called checkAndCanonicalizeDetails().
(WebCore::PaymentRequest::abortWithException): Moved the body of stop() to here and
parameterized the Exception with which to abort m_showPromise.
(WebCore::PaymentRequest::stop): Called abortWithException() with an AbortError.
(WebCore::PaymentRequest::shippingAddressChanged): Called dispatchUpdateEvent() with
shippingaddresschangeEvent.
(WebCore::PaymentRequest::shippingOptionChanged): Ditto with shippingoptionchangeEvent.
(WebCore::PaymentRequest::dispatchUpdateEvent): Created a PaymentRequestUpdateEvent and
dispatched it.
(WebCore::PaymentRequest::updateWith): Added a settle handler to m_detailsPromise.
(WebCore::PaymentRequest::settleDetailsPromise): Updated the PaymentRequest with the new
details and called PaymentHandler::shippingAddressUpdated() or
PaymentHandler::shippingOptionUpdated().

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:

(WebCore::PaymentRequestUpdateEvent::PaymentRequestUpdateEvent):
(WebCore::PaymentRequestUpdateEvent::updateWith): Called PaymentRequest::updateWith().
(WebCore::PaymentRequestUpdateEvent::eventInterface const): Returned
PaymentRequestUpdateEventInterfaceType.

  • Modules/paymentrequest/PaymentRequestUpdateEvent.h:
  • Modules/paymentrequest/PaymentRequestUpdateEvent.idl:
  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::MockPaymentCoordinator::openPaymentSetup):
(WebCore::MockPaymentCoordinator::completeMerchantValidation): Stopped calling
PaymentCoordinator::didAuthorizePayment().
(WebCore::MockPaymentCoordinator::changeShippingOption): Called
PaymentCoordinator::didSelectShippingMethod().
(WebCore::MockPaymentCoordinator::acceptPayment): Called
PaymentCoordinator::didAuthorizePayment().

  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl:

LayoutTests:

  • http/tests/paymentrequest/payment-request-change-shipping-address.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-request-change-shipping-address.https.html: Copied from imported/w3c/web-platform-tests/payment-request/shipping-address-changed-manual.https.html.
  • http/tests/paymentrequest/payment-request-change-shipping-option.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-request-change-shipping-option.https.html: Copied from imported/w3c/web-platform-tests/payment-request/change-shipping-option-manual.https.html.
  • http/tests/paymentrequest/resources/helpers.js:

(async.getPaymentRequestResponse):

  • http/tests/paymentrequest/updateWith-method-pmi-handling.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-method-pmi-handling.https.html: Copied from imported/w3c/web-platform-tests/payment-request/updateWith-method-pmi-handling-manual.https.html.
12:33 PM Changeset in webkit [223909] by achristensen@apple.com
  • 5 edits in trunk

Apply custom header fields from WebsitePolicies to same-domain requests
https://bugs.webkit.org/show_bug.cgi?id=178356
Source/WebCore:

<rdar://problem/31073436>

Reviewed by Brady Eidson.

Covered by new API tests.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setCachePolicy):
(WebCore::ResourceRequestBase::setTimeoutInterval):
(WebCore::ResourceRequestBase::setHTTPMethod):
(WebCore::ResourceRequestBase::setHTTPHeaderField):
(WebCore::ResourceRequestBase::clearHTTPAuthorization):
(WebCore::ResourceRequestBase::clearHTTPContentType):
(WebCore::ResourceRequestBase::clearHTTPReferrer):
(WebCore::ResourceRequestBase::clearHTTPOrigin):
(WebCore::ResourceRequestBase::clearHTTPUserAgent):
(WebCore::ResourceRequestBase::clearHTTPAccept):
(WebCore::ResourceRequestBase::clearHTTPAcceptEncoding):
(WebCore::ResourceRequestBase::setResponseContentDispositionEncodingFallbackArray):
(WebCore::ResourceRequestBase::setHTTPBody):
(WebCore::ResourceRequestBase::setAllowCookies):
(WebCore::ResourceRequestBase::setPriority):
(WebCore::ResourceRequestBase::addHTTPHeaderFieldIfNotPresent):
(WebCore::ResourceRequestBase::addHTTPHeaderField):
(WebCore::ResourceRequestBase::setHTTPHeaderFields):
If we only update the platform request when headers are added (or other changes) for HTTP requests,
then the changes will not affect the NSURLRequest that is sent over IPC or visible to the API.
This is necessary for these new tests to work, but it's also of growing importance since our
introduction of WKURLSchemeHandler.

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(expectHeaders):

12:07 PM Changeset in webkit [223908] by Brent Fulgham
  • 20 edits
    1 add in trunk/Source

Adopt new secure coding APIs
https://bugs.webkit.org/show_bug.cgi?id=178484
<rdar://problem/34837193>

Reviewed by Tim Horton.

Source/WebCore:

Switch to new NSKeyed[Un]Archiver methods that active and use
NSSecureCoding by default.

Most of the new API is wrapped in a set of convenience methods so we can
build without the new API on older systems.

No change in behavior.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::archivedDataForAttributedString): Use new convenience method
to archive the string object.

  • loader/archive/cf/LegacyWebArchiveMac.mm:

(WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Update to
use secure coding where possible.
(WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write): Use new secure API.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto.

  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::createCFURLResponseFromResponseData): Update to
secure coding API where possible.

Source/WebCore/PAL:

Add new convenience methods (and SPI headers) so we can adopt new NSKeyedArchiver
API that uses secure coding by default.

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/NSKeyedArchiverSPI.h: Added.

(securelyArchivedDataWithRootObject): New convenience method.
(securelyUnarchiveRootObjectOfClassFromData): Ditto.
(secureArchiverFromMutableData): Ditto.
(secureUnarchiverFromData): Ditto.

Source/WebKit:

Switch to new NSKeyed[Un]Archiver methods that active and use
NSSecureCoding by default.

  • Platform/ios/AccessibilityIOS.mm:

(WebKit::newAccessibilityRemoteToken): Use secure-by-default API.

  • Shared/Cocoa/DataDetectionResult.mm:

(WebKit::DataDetectionResult::encode const): Ditto.
(WebKit::DataDetectionResult::decode): Ditto.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::Payment>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::Payment>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentContact>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentContact>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMethod>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMethod>::decode): Ditto.

  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const): Ditto.
(WebKit::InteractionInformationAtPosition::decode): Ditto.

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Ditto.
(IPC::ArgumentCoder<Credential>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<Credential>::decodePlatformData): Ditto.
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode): Ditto.
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode): Ditto.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.

  • Shared/mac/WebHitTestResultData.mm:

(WebKit::WebHitTestResultData::platformEncode const): Ditto.
(WebKit::WebHitTestResultData::platformDecode): Ditto.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setObject:forBundleParameter:]): Ditto.
(-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]): Ditto.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::startAssistingNode): Ditto.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Ditto.

  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:

(WebKit::InjectedBundle::initialize): Ditto.
(WebKit::InjectedBundle::setBundleParameter): Ditto.
(WebKit::InjectedBundle::setBundleParameters): Ditto.

11:55 AM Changeset in webkit [223907] by jfbastien@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

WebAssembly: NFC renames of things that aren't JS-specific
https://bugs.webkit.org/show_bug.cgi?id=178738

Reviewed by Saam Barati.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::embedderEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace): Deleted.

  • wasm/WasmFormat.h:
  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

11:52 AM Changeset in webkit [223906] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

HTMLMediaElement should iterate HTMLTrackElements consistently.
https://bugs.webkit.org/show_bug.cgi?id=178423
rdar://problem/35044967

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

No new tests because no expected behavior change.

HTMLMediaElement iterates HTMLTrackElements as children in every place but one, where it iterates them
as descendants. It should always iterate them as children.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::finishParsingChildren):

11:50 AM Changeset in webkit [223905] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

SerializedScriptValue::deserialize() should take ports as a const Vector&
https://bugs.webkit.org/show_bug.cgi?id=178727

Reviewed by Alex Christensen.

SerializedScriptValue::deserialize() should take ports as a const Vector&, not a Vector&.
It does not modify the input vector.

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::JSMessageEvent::data const):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::SerializedScriptValue::deserialize):

  • bindings/js/SerializedScriptValue.h:
11:46 AM Changeset in webkit [223904] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk

[Win][JSCOnly] Make jsconly build testapi and dlls and copy dlls when running tests
https://bugs.webkit.org/show_bug.cgi?id=177279

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2017-10-24
Reviewed by Yusuke Suzuki.

.:

  • Source/cmake/OptionsJSCOnly.cmake:

Source/JavaScriptCore:

  • shell/PlatformJSCOnly.cmake: Added.

Tools:

  • Scripts/build-jsc:
  • Scripts/run-jsc-stress-tests:
11:43 AM Changeset in webkit [223903] by commit-queue@webkit.org
  • 4 edits
    5 adds
    1 delete in trunk/Source/WebKit

[Settings] Add initial support for generating preferences related code
https://bugs.webkit.org/show_bug.cgi?id=178656

Patch by Sam Weinig <sam@webkit.org> on 2017-10-24
Reviewed by Dean Jackson.

As a first step towards getting off the macros in WebPreferencesDefinitions.h
and reducing the overhead of adding a preference, this change generates adds
WebPreferences.yaml where preference changes will go, and generates much of
WebPreferencesDefinitions.h from it (all the custom defaults moved to
WebPreferencesDefinitionsBase.h). Subsequent changes will remove the need for
the macros in WebPreferencesDefinitions.h entirely.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebKit.xcodeproj/project.pbxproj:

Add new files / rules to generate WebPreferencesDefinitions.h.

  • Scripts/GeneratePreferences.rb: Added.
  • Scripts/PreferencesTemplates: Added.
  • Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb: Added.

Add scripts and template to generate WebPreferencesDefinitions.h from
WebPreferences.yaml.

  • Shared/WebPreferences.yaml: Added.

Configuration file for preferences.

  • Shared/WebPreferencesDefinitions.h: Removed.
  • Shared/WebPreferencesDefinitionsBase.h: Copied from Source/WebKit/Shared/WebPreferencesDefinitions.h.

Moved custom defaults to new WebPreferencesDefinitionsBase.h. Removed the need for
FOR_EACH_WEBKIT_STRING_PREFERENCE by using custom defaults for the font family values.

11:40 AM Changeset in webkit [223902] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[MediaFoundation] Videos are always autoplaying for local files
https://bugs.webkit.org/show_bug.cgi?id=178693

Patch by Doug Massay.
Patch by Konstantin Tokarev <Konstantin Tokarev> on 2017-10-24
Reviewed by Alex Christensen.

r199114 fixes autoplay issue only if starting session invokes
buffering stage. However when local files are played, onBufferingStarted
and onBufferingStopped are not called, and video is not paused.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::onSessionStarted):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
11:19 AM Changeset in webkit [223901] by ddkilzer@apple.com
  • 1 edit
    2 copies
    1 delete in trunk

[Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=177345
<rdar://problem/32975942>

Unreviewed fix to move tests into LayoutTests.

If these tests start failing, please roll out this commit and
r223589.

  • fast/text/system-ui-chinese-bold-fallback-expected.html: Renamed from fast/text/system-ui-chinese-bold-fallback-expected.html.
  • fast/text/system-ui-chinese-bold-fallback.html: Renamed from fast/text/system-ui-chinese-bold-fallback.html.
11:14 AM Changeset in webkit [223900] by Matt Lewis
  • 20 edits
    1 delete in trunk/Source

Unreviewed, rolling out r223889.

This caused multiple crashes on all platforms

Reverted changeset:

"Adopt new secure coding APIs"
https://bugs.webkit.org/show_bug.cgi?id=178484
https://trac.webkit.org/changeset/223889

11:04 AM Changeset in webkit [223899] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening. Improved attempt to reduce flakiness of inspector/network/har tests.

  • http/tests/inspector/network/har/har-page-expected.txt:
  • http/tests/inspector/network/har/har-page.html:

Earlier filters were taking affect, so move these checks up.

10:50 AM Changeset in webkit [223898] by Antti Koivisto
  • 8 edits in trunk

Create inline wrappers for before/after pseudo elements that have display:contents
https://bugs.webkit.org/show_bug.cgi?id=178722

Reviewed by Ryosuke Niwa.

Source/WebCore:

We can handle before and after pseudo elements with display:contents by giving them
inline renderers with style inherited from display:contents style. This removes
need for complicated logic for this case and handles everything correctly.

This is a better approach and replaces the one taken in bug 178584.
It also fixes two display:contents WPTs.

  • dom/PseudoElement.h:

There is no need to track content renderers separately anymore. They always descendants of
pseudo element's renderer (which is an inline wrapper in case of display:contents).

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::copyContentFrom):

  • rendering/style/RenderStyle.h:
  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::createContentRenderers):
(WebCore::updateStyleForContentRenderers):
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
(WebCore::removeAndDestroyContentRenderers): Deleted.

Since content renderers are now always descendants of the pseudo renderer
there is no need for a separate destruction path.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolvePseudoStyle):

Create ElementUpdate with a style that will produce an inline wrapper.

LayoutTests:

Enable

imported/w3c/web-platform-tests/css/css-display-3/display-contents-dynamic-before-after-first-letter-001.html and
imported/w3c/web-platform-tests/css/css-display-3/display-contents-dynamic-before-after-001.html

10:49 AM WebKitGTK/Gardening/Calendar edited by Adrian Perez de Castro
(diff)
10:38 AM Changeset in webkit [223897] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] MediaPlayer::isAvailable() takes ~150 ms during web process initialization
https://bugs.webkit.org/show_bug.cgi?id=178713
<rdar://problem/35115906>

Reviewed by Eric Carlson.

Loading AVFoundation should not be required to answer the question of MediaPlayer::isAvailable() on iOS, where
both AVFoundation and CoreMedia frameworks should always exist. As such, we can bail early and return true to
avoid always dynamically loading AVFoundation and CoreMedia.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::isAvailable):

10:32 AM Changeset in webkit [223896] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

RenderThemeCocoa::mediaControlsFormattedStringForDuration may cause a crash due to unhandled Obj-C exception
https://bugs.webkit.org/show_bug.cgi?id=178716
<rdar://problem/35112900>

Patch by Antoine Quint <Antoine Quint> on 2017-10-24
Reviewed by Dean Jackson.

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):

10:24 AM Changeset in webkit [223895] by rniwa@webkit.org
  • 3 edits in trunk

SizesAttributeParser::SizesAttributeParser triggers layout
https://bugs.webkit.org/show_bug.cgi?id=178712

Reviewed by Antti Koivisto.

Revert r213711 as this change introduced an unwated synchronous layout inside Node::insertedIntoAncestor.

The test had been marked as timing out since r191379 and changed to failing expectation in r199225
as the test result's error message changes from run to run.

Disabled Tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html

had been marked failing since r199225, prior to which it was marked as timeout in r191379.
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html
is now marked as flaky.

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::SizesAttributeParser):

10:11 AM Changeset in webkit [223894] by Yusuke Suzuki
  • 4 edits in trunk

[JSC] modules can be visited more than once when resolving bindings through "star" exports as long as the exportName is different each time
https://bugs.webkit.org/show_bug.cgi?id=178308

Reviewed by Mark Lam.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

With the change of the spec[1], we now do not need to remember star resolution modules.
We reflect this change to our implementation. Since this change is covered by test262,
this patch improves the score of test262.

We also add logging to ResolveExport to debug it easily.

[1]: https://github.com/tc39/ecma262/commit/a865e778ff0fc60e26e3e1c589635103710766a1

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::ResolveQuery::dump const):
(JSC::AbstractModuleRecord::resolveExportImpl):

10:05 AM Changeset in webkit [223893] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix internal iOS build.

  • Sources.txt:
9:42 AM Changeset in webkit [223892] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Use emitDumbVirtualCall in 32bit JIT
https://bugs.webkit.org/show_bug.cgi?id=178644

Reviewed by Mark Lam.

This patch aligns 32bit JIT op_call_eval slow case to 64bit version by using emitDumbVirtualCall.

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):

9:36 AM Changeset in webkit [223891] by Yusuke Suzuki
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] Drop ArityCheckData
https://bugs.webkit.org/show_bug.cgi?id=178648

Reviewed by Mark Lam.

ArityCheckData is used to return a pair of slotsToAdd and thunkToCall.
However, use of thunkToCall is removed in 64bit environment at r189575.

We remove thunkToCall and align 32bit implementation to 64bit implementation.
Since we no longer need to have the above pair, we can remove ArityCheckData too.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):
(JSC::setupArityCheckData): Deleted.

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

(JSC::VM::VM):

  • runtime/VM.h:
9:33 AM Changeset in webkit [223890] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

ASSERTION FAILED: !m_serviceWorkerManager in WebProcess::getWorkerContextConnection() on API tests
https://bugs.webkit.org/show_bug.cgi?id=178586
<rdar://problem/35115902>

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

Covered by API tests no longer crashing.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::getWorkerContextProcessConnection): Sending a worker context process connection message only at creation of the service worker process.

9:21 AM Changeset in webkit [223889] by Brent Fulgham
  • 20 edits
    1 add in trunk/Source

Adopt new secure coding APIs
https://bugs.webkit.org/show_bug.cgi?id=178484
<rdar://problem/34837193>

Reviewed by Tim Horton.

Source/WebCore:

Switch to new NSKeyed[Un]Archiver methods that active and use
NSSecureCoding by default.

Most of the new API is wrapped in a set of convenience methods so we can
build without the new API on older systems.

No change in behavior.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::archivedDataForAttributedString): Use new convenience method
to archive the string object.

  • loader/archive/cf/LegacyWebArchiveMac.mm:

(WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Update to
use secure coding where possible.
(WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write): Use new secure API.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto.

  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::createCFURLResponseFromResponseData): Update to
secure coding API where possible.

Source/WebCore/PAL:

Add new convenience methods (and SPI headers) so we can adopt new NSKeyedArchiver
API that uses secure coding by default.

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/NSKeyedArchiverSPI.h: Added.

(securelyArchivedDataWithRootObject): New convenience method.
(securelyUnarchiveRootObjectOfClassFromData): Ditto.
(secureArchiverFromMutableData): Ditto.
(secureUnarchiverFromData): Ditto.

Source/WebKit:

Switch to new NSKeyed[Un]Archiver methods that active and use
NSSecureCoding by default.

  • Platform/ios/AccessibilityIOS.mm:

(WebKit::newAccessibilityRemoteToken): Use secure-by-default API.

  • Shared/Cocoa/DataDetectionResult.mm:

(WebKit::DataDetectionResult::encode const): Ditto.
(WebKit::DataDetectionResult::decode): Ditto.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::Payment>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::Payment>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentContact>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentContact>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMethod>::encode): Ditto.
(IPC::ArgumentCoder<WebCore::PaymentMethod>::decode): Ditto.

  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const): Ditto.
(WebKit::InteractionInformationAtPosition::decode): Ditto.

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Ditto.
(IPC::ArgumentCoder<Credential>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<Credential>::decodePlatformData): Ditto.
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode): Ditto.
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode): Ditto.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.

  • Shared/mac/WebHitTestResultData.mm:

(WebKit::WebHitTestResultData::platformEncode const): Ditto.
(WebKit::WebHitTestResultData::platformDecode): Ditto.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setObject:forBundleParameter:]): Ditto.
(-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]): Ditto.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::startAssistingNode): Ditto.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Ditto.

  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:

(WebKit::InjectedBundle::initialize): Ditto.
(WebKit::InjectedBundle::setBundleParameter): Ditto.
(WebKit::InjectedBundle::setBundleParameters): Ditto.

7:14 AM Changeset in webkit [223888] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark fast/css-generated-content/details-summary-before-after.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178724

Unreviewed test gardening.

  • platform/win/TestExpectations:
5:06 AM Changeset in webkit [223887] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

[GTK][X11] Windy.com shows always straight wind lines
https://bugs.webkit.org/show_bug.cgi?id=176718

Reviewed by Carlos Garcia Campos.

WebGL's GL_LUMINANCE_ALPHA format is not available in OpenGL when using a version >= 3.2
and a core profile. In that case, we need to replace it with GL_RG and swizzle the color
components appropriately.

No new behavior.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::texImage2D):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::texSubImage2D):

1:54 AM Changeset in webkit [223886] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

DocumentOrderedMap::add should release assert that tree scopes match
https://bugs.webkit.org/show_bug.cgi?id=178708

Reviewed by Antti Koivisto.

Assert that the tree scope of element matches the given tree scope instead of asserting that
element is in tree scope, and replaced the use of RELEASE_ASSERT by the newly added
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION to clarify the semantics of these assertions.

Also removed now redudnant early exits which would never execute due to release assertions.

  • dom/DocumentOrderedMap.cpp:

(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get const):

1:38 AM Changeset in webkit [223885] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

-Wsubobject-linkage warning in InspectorIndexedDBAgent.cpp
https://bugs.webkit.org/show_bug.cgi?id=178698

Reviewed by Joseph Pecoraro.

  • inspector/InspectorIndexedDBAgent.cpp:
1:20 AM Changeset in webkit [223884] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit

[GTK][WPE] generate-forwarding-headers.pl should also scan derived sources in WebKit framework
https://bugs.webkit.org/show_bug.cgi?id=178579

Reviewed by Carlos Garcia Campos.

  • PlatformGTK.cmake: When generating forwarding headers, derived sources

should be scanned as well. The DERIVED_SOURCES_WEBKIT_DIR value has to
be passed as an include path to the generate-forward-headers.pl script
to achieve that. This target then also has to depend on all the derived
source files to be generated before this can be performed.

  • PlatformWPE.cmake: Ditto.
12:51 AM Changeset in webkit [223883] by commit-queue@webkit.org
  • 10 edits
    10 copies
    12 adds in trunk

[Web Animations] Add basic timing and target properties
https://bugs.webkit.org/show_bug.cgi?id=178674

Patch by Antoine Quint <Antoine Quint> on 2017-10-24
Reviewed by Dean Jackson.

Source/WebCore:

We add three new interfaces to expose enough properties to establish basic timing properties,
a start time and duration, and the target of an animation. The startTime property is set on
the Animation object, the target is set on the KeyframeEffect set as the effect property on
the Animation object, and the duration is set on the AnimationEffectTiming set on the effect.

Tests: webanimations/animation-effect-timing.html

webanimations/animation-effect.html
webanimations/animation-interface-effect-property.html
webanimations/animation-interface-start-time-property.html
webanimations/keyframe-effect-interface-timing-duration.html
webanimations/keyframe-effect.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationEffect.cpp: Copied from Source/WebCore/animation/WebAnimation.idl.

(WebCore::AnimationEffect::AnimationEffect):
(WebCore::AnimationEffect::~AnimationEffect):

  • animation/AnimationEffect.h: Copied from Source/WebCore/animation/WebAnimation.h.

(WebCore::AnimationEffect::isKeyframeEffect const):
(WebCore::AnimationEffect::timing const):
(WebCore::AnimationEffect::classType const):

  • animation/AnimationEffect.idl: Copied from Source/WebCore/animation/WebAnimation.idl.
  • animation/AnimationEffectTiming.cpp: Copied from Source/WebCore/animation/WebAnimation.idl.

(WebCore::AnimationEffectTiming::create):
(WebCore::AnimationEffectTiming::AnimationEffectTiming):
(WebCore::AnimationEffectTiming::~AnimationEffectTiming):

  • animation/AnimationEffectTiming.h: Copied from Source/WebCore/animation/WebAnimation.h.
  • animation/AnimationEffectTiming.idl: Copied from Source/WebCore/animation/WebAnimation.idl.
  • animation/KeyframeEffect.cpp: Copied from Source/WebCore/animation/WebAnimation.idl.

(WebCore::KeyframeEffect::create):
(WebCore::KeyframeEffect::KeyframeEffect):

  • animation/KeyframeEffect.h: Copied from Source/WebCore/animation/WebAnimation.h.
  • animation/KeyframeEffect.idl: Copied from Source/WebCore/animation/WebAnimation.idl.
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setEffect):

  • animation/WebAnimation.h:
  • animation/WebAnimation.idl:
  • bindings/js/JSAnimationEffectCustom.cpp: Copied from Source/WebCore/animation/WebAnimation.cpp.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

  • bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

Add new tests to check the behavior of the newly exposed interfaces,
constructors and properties.

  • webanimations/animation-effect-expected.txt: Added.
  • webanimations/animation-effect-timing-expected.txt: Added.
  • webanimations/animation-effect-timing.html: Added.
  • webanimations/animation-effect.html: Added.
  • webanimations/animation-interface-effect-property-expected.txt: Added.
  • webanimations/animation-interface-effect-property.html: Added.
  • webanimations/animation-interface-start-time-property-expected.txt: Added.
  • webanimations/animation-interface-start-time-property.html: Added.
  • webanimations/keyframe-effect-expected.txt: Added.
  • webanimations/keyframe-effect-interface-timing-duration-expected.txt: Added.
  • webanimations/keyframe-effect-interface-timing-duration.html: Added.
  • webanimations/keyframe-effect.html: Added.
12:41 AM Changeset in webkit [223882] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

RenderSVGModelObject::checkIntersection triggers layout
https://bugs.webkit.org/show_bug.cgi?id=178710

Reviewed by Antti Koivisto.

Don't trigger a layout inside getElementCTM. Update the layout upfront in getEnclosureList.

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::getElementCTM):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::getEnclosureList):

12:25 AM Changeset in webkit [223881] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: Crash at -[WebAccessibilityObjectWrapper _accessibilityMinValue] + 24
https://bugs.webkit.org/show_bug.cgi?id=178697

Reviewed by Chris Fleizach.

Source/WebCore:

When we are calling _accessibilityMinValue and _accessibilityMaxValue on iOS,
it might cause crash if the AX object has already been detached. Fixed this
by adding the necessary checks.

Test: accessibility/ios-simulator/slider-min-value-crash.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityMinValue]):
(-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):

LayoutTests:

  • accessibility/ios-simulator/slider-min-value-crash-expected.txt: Added.
  • accessibility/ios-simulator/slider-min-value-crash.html: Added.

Oct 23, 2017:

10:13 PM Changeset in webkit [223880] by Brian Burg
  • 6 edits in trunk/Source/WebKit

[Cocoa] Web Automation: add SPI to tell whether the automation session is currently simulating user interactions
https://bugs.webkit.org/show_bug.cgi?id=178616

Reviewed by Joseph Pecoraro.

This is needed to disambiguate whether an action (such as selectAll:) came from
a user clicking on "Edit > Select All" in a menu or whether it was produced by
simulating the keystrokes to produce the chord for "Command + a". Some clients,
such as Safari, would allow the latter but not the former during automation.

  • UIProcess/API/Cocoa/_WKAutomationSession.h:
  • UIProcess/API/Cocoa/_WKAutomationSession.mm:

(-[_WKAutomationSession isSimulatingUserInteraction]):
Add new SPI property that's backed by the same WebAutomationSession method.

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

(WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
Set m_simulatingUserInteraction prior to sending the synthesized events. It will
be cleared when keyboardEventsFlushedForPage() is called by WebPageProxy.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didReceiveEvent):
Notify the automation session that the key event queue was flushed *after* giving
delegates a chance to do something with the key event. This is necessary so that
any actions that are created from the NSEvent by the delegates are handled prior
to the automation session finishing its keyboard interaction command.

9:23 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
9:21 PM Changeset in webkit [223879] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed WPE test gardening

  • platform/wpe/TestExpectations:
9:17 PM Changeset in webkit [223878] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, restore unneeded all in ones.

  • CMakeLists.txt:
8:32 PM Changeset in webkit [223877] by Michael Catanzaro
  • 2 edits in trunk/Source/bmalloc

Unreviewed, roll out r222731
https://bugs.webkit.org/show_bug.cgi?id=177745
<rdar://problem/34773148>

Unfortunately Gigacage has broken core dump generation.

  • bmalloc/Gigacage.h:
8:26 PM Changeset in webkit [223876] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r223870 and r223871.
https://bugs.webkit.org/show_bug.cgi?id=178702

broke the windows build (Requested by keith_miller on
#webkit).

Reverted changesets:

"Add html, inspector, loader to unified sources"
https://bugs.webkit.org/show_bug.cgi?id=178695
https://trac.webkit.org/changeset/223870

"Unrievwed, fix windows build."
https://trac.webkit.org/changeset/223871

8:20 PM Changeset in webkit [223875] by keith_miller@apple.com
  • 19 edits in trunk/Source/JavaScriptCore

Unreviewed, reland r223866

Didn't break the windows build...

Restored changeset:

"WebAssembly: topEntryFrame on Wasm::Instance"
https://bugs.webkit.org/show_bug.cgi?id=178690
https://trac.webkit.org/changeset/223866

7:33 PM Changeset in webkit [223874] by commit-queue@webkit.org
  • 19 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r223866.
https://bugs.webkit.org/show_bug.cgi?id=178699

Probably broke the windows build (Requested by keith_miller on
#webkit).

Reverted changeset:

"WebAssembly: topEntryFrame on Wasm::Instance"
https://bugs.webkit.org/show_bug.cgi?id=178690
https://trac.webkit.org/changeset/223866

6:44 PM Changeset in webkit [223873] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening. Try to reduce flakiness of inspector/network/har tests.

  • http/tests/inspector/network/har/har-page-expected.txt:
  • http/tests/inspector/network/har/har-page.html:

Remove properties which may sometimes be optional.
Filter contents which are shared across tests and might change.

6:42 PM Changeset in webkit [223872] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix initializeSupportedImageMIMETypes after r223860
https://bugs.webkit.org/show_bug.cgi?id=178618
<rdar://problem/35108852>

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):

6:31 PM Changeset in webkit [223871] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unrievwed, fix windows build.

  • CMakeLists.txt:
6:25 PM Changeset in webkit [223870] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Add html, inspector, loader to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178695

Rubber-stamped by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
6:16 PM Changeset in webkit [223869] by Brian Burg
  • 3 edits in trunk/Source/WebKit

[Mac] Web Automation: key modifiers for synthesized NSEvents are incorrect
https://bugs.webkit.org/show_bug.cgi?id=178615

Reviewed by Joseph Pecoraro.

In both PLATFORM(MAC) platform methods for simulating keyboard interactions,
we errantly relied on +[NSEvent modifierFlags] to get the current state of
sticky modifiers when creating synthesized events. This is incorrect for two reasons:
modifierFlags is never updated when simulating a sequence of events (because
all the events are synthesized before any are delivered); and the NSEvent class
method only reflects the modifier state of the primary physical keyboard, which
is not affected by synthesized NSEvents that happen to have modifier flags.

Instead, just keep our own m_currentModifiers state in the session and compute
the necessary NSEventModifierFlags to put on each synthesized event. This aligns
the implementation with the treatment of sticky keys in the iOS and GTK platform methods.

  • UIProcess/Automation/WebAutomationSession.h: Every port gets this variable now.
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::platformSimulateKeyStroke):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
Use and update m_currentModifiers.

5:55 PM Changeset in webkit [223868] by Brian Burg
  • 14 edits
    2 deletes in trunk/Source

Web Inspector: Remove unused Console.setMonitoringXHREnabled
https://bugs.webkit.org/show_bug.cgi?id=178617

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-23
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/JSGlobalObjectConsoleAgent.cpp: Removed.
  • inspector/agents/JSGlobalObjectConsoleAgent.h: Removed.
  • inspector/protocol/Console.json:

Removed files and method.

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
This can use the base ConsoleAgent now.

Source/WebCore:

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishXHRLoading):

  • inspector/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::setMonitoringXHREnabled): Deleted.
(WebCore::WebConsoleAgent::didFinishXHRLoading): Deleted.

  • inspector/WebConsoleAgent.h:

Remove XHR monitoring code.

  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber): Deleted.

  • xml/XMLHttpRequest.idl:

Remove now unused state on XHR and ExecState requirement for send().

5:35 PM Changeset in webkit [223867] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: Inline widgets don't hide when starting editing by tabbing from property name
https://bugs.webkit.org/show_bug.cgi?id=178638

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
Blur event on the property name text field caused WI.SpreadsheetStyleProperty.prototype._renderValue,
which displayed inline swatches. Display inline swatches only after blur event on the property value.

5:29 PM Changeset in webkit [223866] by jfbastien@apple.com
  • 19 edits in trunk/Source/JavaScriptCore

WebAssembly: topEntryFrame on Wasm::Instance
https://bugs.webkit.org/show_bug.cgi?id=178690

Reviewed by Saam Barati.

topEntryFrame is usually on VM, but for a no-VM WebAssembly we
need to hold topEntryFrame elsewhere, and generated code cannot
hard-code where topEntryFrame live. Do this at creation time of
Wasm::Instance, and then generated code will just load from
wherever Wasm::Instance was told topEntryFrame is. In a JavaScript
embedding this is still from VM, so all of the unwinding machinery
stays the same.

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBufferImpl):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBuffer):
The default parameter was never non-defaulted from any of the
callers. The new version calls the impl directly because it
doesn't have VM and doesn't hard-code the address of
topEntryFrame.

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::vmCalleeSaveRegisterOffsets): This was weird on
VM because it's not really VM-specific.

  • jit/RegisterSet.h:
  • runtime/VM.cpp:

(JSC::VM::getAllCalleeSaveRegisterOffsets): Deleted.

  • runtime/VM.h:

(JSC::VM::getCTIStub):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):

  • wasm/WasmInstance.h: topEntryFramePointer will eventually live

here for real. Right now it's mirrored in JSWebAssemblyInstance
because that's the acting Context.
(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::offsetOfTopEntryFramePointer):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):

  • wasm/js/JSWebAssemblyInstance.h: Mirror Wasm::Instance temporarily.

(JSC::JSWebAssemblyInstance::offsetOfCallee):
(JSC::JSWebAssemblyInstance::offsetOfTopEntryFramePointer):
(JSC::JSWebAssemblyInstance::offsetOfVM): Deleted.

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::instantiate):

5:27 PM Changeset in webkit [223865] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Add dom, editing, fileapi, and history to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178694

Rubber-stamped by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
5:22 PM Changeset in webkit [223864] by Dewei Zhu
  • 4 edits in trunk/Websites/perf.webkit.org

Update perf dashboard upload logic to support uploading binaries from owned commits.
https://bugs.webkit.org/show_bug.cgi?id=178610

Reviewed by Ryosuke Niwa.

Update build requests to 'completed' only when all commit set items are satisfied.
Extend 'repositoryList' parameter to be able to specified own commit information.
Items in 'repositoryList' can either be a string for top level repository,
or a dictionary with two keys: 'ownerRepository' and 'ownedRepository'.

  • public/api/upload-root.php: Extend upload logic for support uploading binaries from owned commits.
  • server-tests/api-upload-root-tests.js: Added unit tests.
  • server-tests/tools-sync-buildbot-integration-tests.js: Added unit tests.
5:08 PM Changeset in webkit [223863] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Move bridge, contentextensions, crypto, and css to unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178691

Reviewed by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
4:40 PM Changeset in webkit [223862] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the Windows build after r223860

UTIUtilities only exists on Cocoa platforms, so we need to guard it accordingly.

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):

4:23 PM Changeset in webkit [223861] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix ASAN test after r222824
https://bugs.webkit.org/show_bug.cgi?id=178688
<rdar://problem/35104706>

Reviewed by Tim Horton.

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::clear):
Resizing a list of Ref<T> after we've WTFMoved all the elements doesn't make ASAN happy.

4:17 PM AddingFiles edited by keith_miller@apple.com
(diff)
4:12 PM AddingFiles edited by keith_miller@apple.com
(diff)
4:11 PM AddingFiles edited by keith_miller@apple.com
(diff)
4:03 PM AddingFiles edited by keith_miller@apple.com
(diff)
3:37 PM Changeset in webkit [223860] by wenson_hsieh@apple.com
  • 3 edits in trunk/Source/WebCore

[iOS] DocumentWriter::createDocument can spend ~100ms unnecessarily converting image UTIs to MIME types
https://bugs.webkit.org/show_bug.cgi?id=178618
<rdar://problem/35108852>

Reviewed by Said Abou-Hallawa.

Currently, in setting up a new Document, DocumentWriter::createDocument() always asks whether or not the
Document should be a PDF document by calling MIMETypeRegistry::isPDFMIMEType(), which forces lazy initialization
of every MIME type dictionary (e.g. image types, PDF types, JavaScript types, etc.). As evidenced by traces,
this can be an expensive operation on certain devices.

This patch implements two optimizations. First, we refactor the initializeSupportedImageMIMETypes() helper to
stop asking for MIMETypeForImageSourceType for each of the supported UTIs. This is because the known MIME types
corresponding to these hard-coded UTI types is a fixed set anyways, so we can simply iterate over a constant
array of MIME types and populate the supported image (and image resource) types. Also, add assertions to ensure
that we keep allowed image MIME types in sync with allowed image UTIs.

The second optimization removes initializeMIMETypeRegistry() altogether in favor of calling just the
initialize*MIMETypes() functions needed to ensure the information required. For instance, getPDFMIMETypes()
currently calls initializeMIMETypeRegistry() if the pdfMIMETypes dictionary doesn't exist, when it really only
needs to ensure that the pdfMIMETypes is initialized, for which initializePDFMIMETypes() is sufficient.

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedJavaScriptMIMETypes):
(WebCore::initializePDFMIMETypes):
(WebCore::initializeSupportedNonImageMimeTypes):
(WebCore::initializeUnsupportedTextMIMETypes):

Move MIME type dictionary creation into initialize*MIMETypes() helpers. Additionally, remove
initializePDFAndPostScriptMIMETypes, which is no longer necessary.

(WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
(WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
(WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
(WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
(WebCore::MIMETypeRegistry::isUnsupportedTextMIMEType):
(WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType):

Tweak to check that the type isPDFMIMEType(), or that it's otherwise "application/postscript".

(WebCore::MIMETypeRegistry::isPDFMIMEType):
(WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
(WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
(WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
(WebCore::MIMETypeRegistry::getPDFMIMETypes):
(WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes):

Call only the relevant MIME type initializers when needed.

(WebCore::initializePostScriptMIMETypes): Deleted.
(WebCore::initializeMIMETypeRegistry): Deleted.
(WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Deleted.

Remove an unused and unexported function.

  • platform/MIMETypeRegistry.h:
3:30 PM Changeset in webkit [223859] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Multiple imported layout tests are crashing and timing out.
https://bugs.webkit.org/show_bug.cgi?id=178685

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-23

  • TestExpectations: skipping cache storage tests in service worker context until it is functional.
3:14 PM Changeset in webkit [223858] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

[Payment Request] Take the JSC API lock before creating the PaymentResponse.details object
https://bugs.webkit.org/show_bug.cgi?id=178686

Reviewed by Keith Miller.

This fixes several flaky crashes in http/tests/paymentrequest/ after r223855.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::didAuthorizePayment):

2:58 PM Changeset in webkit [223857] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Stop using _UIApplicationUsesLegacyUI()
https://bugs.webkit.org/show_bug.cgi?id=178680
<rdar://problem/35131949>

Reviewed by Dan Bernstein.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectPopover initWithView:hasGroups:]):
Resolve _UIApplicationUsesLegacyUI to false and simplify.

2:34 PM Changeset in webkit [223856] by Joseph Pecoraro
  • 22 edits
    6 adds in trunk

Web Inspector: Please support HAR Export for network traffic
https://bugs.webkit.org/show_bug.cgi?id=146692
<rdar://problem/7463672>

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Add a walltime to each send request.

Source/WebCore:

Tests: http/tests/inspector/network/har/har-basic.html

http/tests/inspector/network/har/har-page.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendRequest):
Include the wall time when sending a request. This is needed for HAR to
include a wall time, and can be used for Cookie expiration time calculation
as well.

Source/WebInspectorUI:

  • UserInterface/Main.html:
  • UserInterface/Test.html:

New resources.

  • UserInterface/Base/Platform.js:

Include a build number as well.

  • UserInterface/Base/URLUtilities.js:

(parseLocationQueryParameters): Deleted.
Remove unused function.

  • UserInterface/Controllers/FrameResourceManager.js:

(WI.FrameResourceManager.prototype.frameDidNavigate):
(WI.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WI.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WI.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
Pass along a walltime.

  • UserInterface/Protocol/NetworkObserver.js:

(WI.NetworkObserver.prototype.requestWillBeSent):
Pass along a walltime. This new parameter shifts old parameters.

  • UserInterface/Controllers/HARBuilder.js: Added.

(WI.HARBuilder.async.buildArchive):
(WI.HARBuilder.creator):
(WI.HARBuilder.pages):
(WI.HARBuilder.pageTimings):
(WI.HARBuilder.entry):
(WI.HARBuilder.request):
(WI.HARBuilder.response):
(WI.HARBuilder.cookies):
(WI.HARBuilder.headers):
(WI.HARBuilder.content):
(WI.HARBuilder.postData):
(WI.HARBuilder.cache):
(WI.HARBuilder.timings):
(WI.HARBuilder.ipAddress):
(WI.HARBuilder.date):
(WI.HARBuilder.fetchType):
HAR construction and helpers.

  • UserInterface/Models/Cookie.js:

(WI.Cookie.prototype.expirationDate):

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.get queryStringParameters):
(WI.Resource.prototype.get requestFormParameters):
(WI.Resource.prototype.get requestSentWalltime):
(WI.Resource.prototype.get requestSentDate):
(WI.Resource.prototype.hasRequestFormParameters):
Helpers for HAR generation and sub-sets of data.

  • UserInterface/Models/SourceCode.js:

(WI.SourceCode.prototype._processContent):
Capture the raw, unmodified, base64 encoded flag and content. This ends
up getting used by HAR generation and is otherwise lost.

  • UserInterface/Test/TestHarness.js:

(TestHarness.prototype.json):
Helper for just logging JSON data with a filter. This defaults to
a reasonable 2 space indent for JSON logs in our test output.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.get saveData):
(WI.DOMTreeContentView.get saveData.saveHandler): Deleted.
Drive-by simplify while looking at other save handlers.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.get supportsSave):
(WI.NetworkTableContentView.prototype.get saveData):
(WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
(WI.NetworkTableContentView.prototype._HARResources):
(WI.NetworkTableContentView.prototype._exportHAR):
Provide a context menu and save keyboard handler to export a HAR.
This matches other browsers.

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView.prototype._canShowRequestContentView):
Use code that is now available in Resource.

LayoutTests:

  • http/tests/inspector/network/har/har-basic-expected.txt: Added.
  • http/tests/inspector/network/har/har-basic.html: Added.
  • http/tests/inspector/network/har/har-page-expected.txt: Added.
  • http/tests/inspector/network/har/har-page.html: Added.

Tests with mock resources / data and real resources.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:

Skip on platforms that cannot provide complete metrics, so some optional
fields may be missing.

2:00 PM Changeset in webkit [223855] by aestes@apple.com
  • 23 edits
    6 copies
    14 adds in trunk

[Payment Request] Resolve PaymentRequest.show()'s accept promise when a payment is authorized
https://bugs.webkit.org/show_bug.cgi?id=178609
<rdar://problem/33542813>

Reviewed by Alex Christensen.

Source/WebCore:

This patch implements the logic for resolving PaymentRequest.show()'s accept promise when
the user authorizes a payment, and implements PaymentResponse.complete().

Tests: http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html

http/tests/paymentrequest/payment-response-complete-method.https.html
http/tests/paymentrequest/payment-response-methodName-attribute.https.html
http/tests/paymentrequest/payment-response-payerEmail-attribute.https.html
http/tests/paymentrequest/payment-response-payerName-attribute.https.html
http/tests/paymentrequest/payment-response-payerPhone-attribute.https.html

  • DerivedSources.make:
  • Modules/applepay/ApplePayPaymentContact.h:
  • Modules/applepay/Payment.h:

(WebCore::Payment::Payment): Deleted.
(WebCore::Payment::pkPayment const): Deleted.

  • Modules/applepay/PaymentContact.h:

(WebCore::PaymentContact::PaymentContact): Deleted.
(WebCore::PaymentContact::pkContact const): Deleted.

  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::convert):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::hasActiveSession):
(WebCore::ApplePayPaymentHandler::ApplePayPaymentHandler):
(WebCore::ApplePayPaymentHandler::document):
(WebCore::ApplePayPaymentHandler::paymentCoordinator):
(WebCore::ApplePayPaymentHandler::convertData):
(WebCore::ApplePayPaymentHandler::show):
(WebCore::ApplePayPaymentHandler::hide):
(WebCore::ApplePayPaymentHandler::canMakePayment):
(WebCore::ApplePayPaymentHandler::complete):
(WebCore::convert):
(WebCore::ApplePayPaymentHandler::didAuthorizePayment):
(WebCore::ApplePayPaymentHandler::didSelectShippingMethod):
(WebCore::ApplePayPaymentHandler::didSelectShippingContact):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/paymentrequest/PaymentAddress.h:
  • Modules/paymentrequest/PaymentAddress.idl:
  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::create):

  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::stop):
(WebCore::PaymentRequest::canMakePayment):
(WebCore::PaymentRequest::canSuspendForDocumentSuspension const):
(WebCore::PaymentRequest::shippingAddressChanged):
(WebCore::PaymentRequest::shippingOptionChanged):
(WebCore::PaymentRequest::accept):
(WebCore::PaymentRequest::complete):

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentResponse.cpp:

(WebCore::PaymentResponse::PaymentResponse):
(WebCore::PaymentResponse::complete):

  • Modules/paymentrequest/PaymentResponse.h:
  • WebCore.xcodeproj/project.pbxproj:
  • testing/Internals.cpp:

(WebCore::Internals::Internals):
(WebCore::Internals::mockPaymentCoordinator const):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/MockPayment.h: Added.
  • testing/MockPaymentAddress.h: Added.
  • testing/MockPaymentAddress.idl: Added.
  • testing/MockPaymentContact.h: Added.
  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::MockPaymentCoordinator::openPaymentSetup):
(WebCore::dispatchIfShowing):
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeMerchantValidation):
(WebCore::MockPaymentCoordinator::completePaymentSession):
(WebCore::MockPaymentCoordinator::abortPaymentSession):
(WebCore::MockPaymentCoordinator::cancelPaymentSession):
(WebCore::MockPaymentCoordinator::paymentCoordinatorDestroyed):

  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl: Added.

LayoutTests:

  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html: Copied from imported/w3c/web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html.
  • http/tests/paymentrequest/payment-response-complete-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-complete-method.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/complete-method-manual.https.html.
  • http/tests/paymentrequest/payment-response-methodName-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-methodName-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/methodName-attribute-manual.https.html.
  • http/tests/paymentrequest/payment-response-payerEmail-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-payerEmail-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/payerEmail-attribute-manual.https.html.
  • http/tests/paymentrequest/payment-response-payerName-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-payerName-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/payerName-attribute-manual.https.html.
  • http/tests/paymentrequest/payment-response-payerPhone-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-payerPhone-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/payerPhone-attribute-manual.https.html.
  • http/tests/paymentrequest/resources/helpers.js: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/helpers.js.

(test):
(async.getPaymentResponse):
(async.getPaymentRequestResponse):
(async.runTest):

1:59 PM Changeset in webkit [223854] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Attempt to stop iOS Simulator tests from failing because
we don't support Accelerated ImageBuffer.

  • html/ImageBitmap.cpp:
1:42 PM Changeset in webkit [223853] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Make m_subtreeLayoutRoot weak.
https://bugs.webkit.org/show_bug.cgi?id=178621
<rdar://problem/35110321>

Reviewed by Simon Fraser.

This patch turn m_subtreeLayoutRoot into a weak pointer to handle both the optional and the mutation cases.

Covered by existing cases.

  • page/FrameView.cpp:

(WebCore::FrameView::reset):
(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameView::canPerformLayout const):
(WebCore::FrameView::layout): WeakPtr<RenderElement> protects us from recursive layouts triggering UAF on layoutRoot.
(WebCore::FrameView::convertSubtreeLayoutToFullLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::needsLayout const):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/FrameView.h:
1:40 PM Changeset in webkit [223852] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix windows build.

  • CMakeLists.txt:
1:37 PM WebKitGTK/2.18.x edited by Adrian Perez de Castro
(diff)
1:32 PM Changeset in webkit [223851] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, suppress deprecation warnings to fix the build.
<rdar://problem/35131949>

  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectPopover initWithView:hasGroups:]):

1:23 PM Changeset in webkit [223850] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Move shared accessibility and animiations files to unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178677

Reviewed by Tim Horton.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
12:36 PM Changeset in webkit [223849] by Chris Dumez
  • 16 edits
    2 adds in trunk

Drop confusing Event::dispatched() method
https://bugs.webkit.org/show_bug.cgi?id=178670

Reviewed by Youenn Fablet.

Source/WebCore:

Drop confusing Event::dispatched() method. What the call sites want to do is check
that the Event's "dispatch" flag is set:

This flag gets set at the beginning of dispatchEvent() and unset at the end of
dispatchEvent():

See as an example event.initEvent():

The right way to check the Event's "dispatch" flag is the Event::isBeingDispatched()
method, so use this instead. One side effect of this change is that it is now
possible to call the init*Event() method on events that have already been dispatched
in order to dispatch them again, as per the specification.

Test: fast/events/initEvent-after-dispatching.html

  • dom/CompositionEvent.cpp:

(WebCore::CompositionEvent::initCompositionEvent):

  • dom/DeviceMotionEvent.cpp:

(WebCore::DeviceMotionEvent::initDeviceMotionEvent):

  • dom/DeviceOrientationEvent.cpp:

(WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):

  • dom/Event.h:
  • dom/HashChangeEvent.h:
  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::initKeyboardEvent):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::initMessageEvent):

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::initMouseEvent):

  • dom/OverflowEvent.cpp:

(WebCore::OverflowEvent::initOverflowEvent):

  • dom/TextEvent.cpp:

(WebCore::TextEvent::initTextEvent):

  • dom/TouchEvent.cpp:

(WebCore::TouchEvent::initTouchEvent):

  • dom/UIEvent.cpp:

(WebCore::UIEvent::initUIEvent):

  • dom/WheelEvent.cpp:

(WebCore::WheelEvent::initWheelEvent):

  • storage/StorageEvent.cpp:

(WebCore::StorageEvent::initStorageEvent):

LayoutTests:

Add layout test coverage.

  • fast/events/initEvent-after-dispatching-expected.txt: Added.
  • fast/events/initEvent-after-dispatching.html: Added.
11:59 AM Changeset in webkit [223848] by Antti Koivisto
  • 8 edits in trunk

Remember previous child renderer during render tree update
https://bugs.webkit.org/show_bug.cgi?id=178659

Reviewed by Zalan Bujtas.

Source/WebCore:

We shouldn't need to recompute the previous renderer, we know it already.

  • style/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::previousSiblingRenderer const): Deleted.

No longer needed. This was also subtly wrong as doesn't take display:contents into account.

  • style/RenderTreePosition.h:
  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::textRendererIsNeeded):

Use the saved previous renderer.

(WebCore::RenderTreeUpdater::updateTextRenderer):
(WebCore::RenderTreeUpdater::storePreviousRenderer):

Save the previous renderere as we walk the tree.

(WebCore::textRendererIsNeeded): Deleted.

  • style/RenderTreeUpdater.h:

LayoutTests:

  • fast/block/float/float-not-removed-from-pre-block-expected.txt:
  • platform/mac/fast/css-generated-content/details-summary-before-after-expected.txt:
11:57 AM Changeset in webkit [223847] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Add Shared Modules files to the unified source build.
https://bugs.webkit.org/show_bug.cgi?id=178675

Reviewed by Tim Horton.

This patch all the Modules sources files shared across all ports to
unified sources.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
11:42 AM Changeset in webkit [223846] by Lucas Forschler
  • 2 edits in trunk/Tools

<rdar://problem/35045445>
Update README to reference WebKit build archives, instead of 'nightly'

Reviewed by Aakash Jain.

  • WebKitArchiveSupport/README:
11:10 AM Changeset in webkit [223845] by dbates@webkit.org
  • 3 edits
    4 adds in trunk/LayoutTests

Add tests to ensure spelling error dots are drawn in the correct place in bottom-to-top
and right-to-left writing modes
https://bugs.webkit.org/show_bug.cgi?id=178671

Reviewed by Simon Fraser.

  • fast/writing-mode/english-bt-text-with-spelling-marker-expected.html: Added.
  • fast/writing-mode/english-bt-text-with-spelling-marker.html: Added.
  • fast/writing-mode/english-rl-text-with-spelling-marker-expected.html: Added.
  • fast/writing-mode/english-rl-text-with-spelling-marker.html: Added.
  • platform/ios/TestExpectations: Skip the test on iOS as it does not support spelling and grammar

marker painting.

10:56 AM Changeset in webkit [223844] by zandobersek@gmail.com
  • 2 edits in trunk/Source/bmalloc

bmalloc::api::tryLargeMemalignVirtual() shouldn't assert on a failed allocation
https://bugs.webkit.org/show_bug.cgi?id=178654

Reviewed by Geoffrey Garen.

  • bmalloc/bmalloc.h:

(bmalloc::api::tryLargeMemalignVirtual): Call Heap::tryAllocateLarge()
instead of Heap::allocateLarge(). The former will return a null pointer
upon a failed allocation, allowing the caller to fail gracefully just as
the API entrypoint implies, while the latter currently provokes a crash
in these circumstances.

10:51 AM Changeset in webkit [223843] by dino@apple.com
  • 9 edits
    4 adds in trunk

Implement drawImage(ImageBitmap) on 2d canvas
https://bugs.webkit.org/show_bug.cgi?id=178653
<rdar://problem/35104360>

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

Update expected results now that drawImage is implemented.

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:

Source/WebCore:

Implement CanvasRenderingContext2D::drawImage with ImageBitmap.
It's probably not going to be a very common operation, but
it importantly allows us to test the ImageBitmap creation
code.

Test: http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap.html

  • html/ImageBitmap.cpp:

(WebCore::taintsOrigin): New helper function to determine if a
CachedImage would provide a clean origin.
(WebCore::ImageBitmap::createPromise): Set the flag that records
if this ImageBitmap has a clean origin.

  • html/ImageBitmap.h:

(WebCore::ImageBitmap::buffer): Exposes the ImageBuffer backing
store, allowing access to the data for drawing.
(WebCore::ImageBitmap::originClean const): Is this ImageBitmap
going to taint a destination.

  • html/canvas/CanvasRenderingContext.cpp:

(WebCore::CanvasRenderingContext::wouldTaintOrigin): Implement
the ImageBitmap version of this template function.

  • html/canvas/CanvasRenderingContext.h:
  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawImage): Implement the
actual drawing of an ImageBitmap.

LayoutTests:

Add a new test that exercises drawImage(ImageBitmap)
that will be contributed back to Web Platform Tests.

  • http/wpt/2dcontext/imagebitmap/common.js: Copied (mostly) from WPT.

(create9x9CanvasWith2dContext): New helper function to create a canvas
and provide a rendering context.

  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap-expected.txt: Added.
  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap.html: Added.
  • http/wpt/2dcontext/imagebitmap/target-blue-dot.png: Added.
10:49 AM Changeset in webkit [223842] by dbates@webkit.org
  • 3 edits
    4 adds in trunk/LayoutTests

Add tests to ensure spelling error dots are drawn in the correct place for overlapping lines
https://bugs.webkit.org/show_bug.cgi?id=178611
<rdar://problem/35105805>

Reviewed by Zalan Bujtas.

Add tests to ensure that we paint the spelling error dots in the correct place for
overlapping lines.

  • editing/spelling/spelling-markers-in-overlapping-lines-expected.html: Added.
  • editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html: Added.
  • editing/spelling/spelling-markers-in-overlapping-lines-large-font.html: Added.
  • editing/spelling/spelling-markers-in-overlapping-lines.html: Added.
  • platform/ios/TestExpectations: Skip the test on iOS as it does not support spelling and grammar

marker painting.

10:35 AM Changeset in webkit [223841] by zandobersek@gmail.com
  • 2 edits
    839 adds in trunk/LayoutTests

Unreviewed WPE gardening. Unskip the SVG tests and generate the
required platform-specific baselines.

  • platform/wpe/TestExpectations:
  • platform/wpe/svg: Added ~800 baselines.
10:28 AM Changeset in webkit [223840] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r223699.

Caused regressions with right-to-left text selection and
painting of markers in flipped writing mode and in overlapping
lines. Will investigate offline.

Reverted changeset:

"Share logic in InlineTextBox to compute selection rect"
https://bugs.webkit.org/show_bug.cgi?id=178232
https://trac.webkit.org/changeset/223699

10:25 AM Changeset in webkit [223839] by commit-queue@webkit.org
  • 27 edits
    2 copies
    2 adds in trunk

Source/WebCore:
Create a Fetch event when ServiceWorker has to handle a fetch
https://bugs.webkit.org/show_bug.cgi?id=178491

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

Covered by existing test.

Updating FetchEvent to pass a FetchResponse* within its onResponse callback.
Making it a CompletionHandler.
Fixing a check on respondWith to ensure that event is dispatched when respondWith is called.

Adding ServiceWorkerFetch class to handle the creation of the fetch event, waiting for the fetch event to be responded
and processing when fetch event is responded.
ServiceWorkerFetchTask takes a client to which will be sent the response body or the error.
WebKit implementation of it will be to send the related IPC message back to the WebProcess that made the fetch request.

Adding a method to ServiceWorkerThread to create the fetch event on worker thread and dispatch on the global scope.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/network/ResourceResponseBase.h:
  • testing/Internals.cpp:

(WebCore::Internals::waitForFetchEventToFinish):

  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::~FetchEvent):
(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::onResponse):
(WebCore::FetchEvent::respondWithError):
(WebCore::FetchEvent::processResponse):
(WebCore::FetchEvent::promiseIsSettled):

  • workers/service/FetchEvent.h:
  • workers/service/context/ServiceWorkerFetch.cpp: Added.

(WebCore::ServiceWorkerFetch::dispatchFetchTask):
(WebCore::ServiceWorkerFetch::processResponse):

  • workers/service/context/ServiceWorkerFetch.h: Added.
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::m_workerObjectProxy):
(WebCore::ServiceWorkerThread::dispatchFetchEvent):

  • workers/service/context/ServiceWorkerThread.h:

Source/WebKit:
TestController should clear all fetch caches when resetting its state
https://bugs.webkit.org/show_bug.cgi?id=178486
<rdar://problem/35066305>

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

Adding a new DidNotHandle message to disambiguate with the DidFail fetch case.
With DidNotHandle, the loading should go the network process.
With DidFail, the loading should return a network error.

On receiving an order to start a fetch, ServiceWorkerThread will dispatch a fetch event.
The client of this event will retrieve the response and return it to the WebProcess through IPC.

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::didNotHandleFetch):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didNotHandleFetch):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::didFail):
(WebKit::ServiceWorkerClientFetch::didNotHandle):

  • WebProcess/Storage/ServiceWorkerClientFetch.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
  • WebProcess/Storage/ServiceWorkerContextManager.cpp:

(WebKit::ServiceWorkerContextManager::startFetch):

  • WebProcess/Storage/ServiceWorkerContextManager.h:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: Added.

(WebKit::WebServiceWorkerFetchTaskClient::~WebServiceWorkerFetchTaskClient):
(WebKit::WebServiceWorkerFetchTaskClient::WebServiceWorkerFetchTaskClient):
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveResponse):
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
(WebKit::WebServiceWorkerFetchTaskClient::didFail):
(WebKit::WebServiceWorkerFetchTaskClient::didFinish):

  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h: Added.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::startFetchInServiceWorker):

  • WebProcess/WebProcess.h:

LayoutTests:
TestController should clear all fetch caches when resetting its state
https://bugs.webkit.org/show_bug.cgi?id=178486
<rdar://problem/35066305>

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

Beefing up the test by using fetch event handler to return responses
previously hard coded in ServiceWorkerContextManager.

  • http/tests/workers/service/basic-fetch.https-expected.txt:
  • http/tests/workers/service/resources/basic-fetch-worker.js:

(event.event.request.url.indexOf):

  • http/tests/workers/service/resources/basic-fetch.js:
10:21 AM Changeset in webkit [223838] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Curl] Fix authentication related bugs
https://bugs.webkit.org/show_bug.cgi?id=178652

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-23
Reviewed by Alex Christensen.

  • platform/network/curl/AuthenticationChallengeCurl.cpp:

(WebCore::AuthenticationChallenge::protectionSpaceFromHandle):

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::setHttpAuthUserPass):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setUserPass):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didReceiveHeader):

  • platform/network/curl/CurlRequest.h:
10:10 AM Changeset in webkit [223837] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark compositing/visible-rect/iframe-no-layers.html as a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=178669

Unreviewed test gardening.

  • platform/ios/TestExpectations:
9:44 AM Changeset in webkit [223836] by Matt Lewis
  • 14 edits
    2 adds in trunk/Source

Unreviewed, rolling out r223820.

This caused a build break on Windows.

Reverted changeset:

"Web Inspector: Remove unused Console.setMonitoringXHREnabled"
https://bugs.webkit.org/show_bug.cgi?id=178617
https://trac.webkit.org/changeset/223820

8:57 AM Changeset in webkit [223835] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Call FrameView::scheduleSelectionUpdate when selection needs repainting after layout instead of setting the RenderView dirty.
https://bugs.webkit.org/show_bug.cgi?id=178651
<rdar://problem/35117448>

Reviewed by Antti Koivisto.

Calling setNeedsLayout() on the RenderView to trigger selection update is problematic in 2 different ways:

  1. marking the root renderer dirty does not trigger layout (this is very specific to the root,

other renderers do trigger layout). It means that it works as long as someone else schedules a layout.

  1. when a subtree layout is already scheduled and we mark the root renderer dirty, the root gets stuck with

the dirty flag (since the entry point for the subsequent layout is a descendant of the root and not the root itself).

This patch addresses these issues by scheduling/converting subtree layout when needed.

Covered by fast/dynamic/remove-invisible-node-inside-selection.html/remove-node-inside-selection.html

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::respondToNodeModification):

  • page/FrameView.cpp:

(WebCore::FrameView::scheduleSelectionUpdate):

  • page/FrameView.h:
4:50 AM Changeset in webkit [223834] by Yusuke Suzuki
  • 6 edits
    4 adds in trunk

[JSC] Use fastJoin in Array#toString
https://bugs.webkit.org/show_bug.cgi?id=178062

Reviewed by Darin Adler.

JSTests:

  • microbenchmarks/contiguous-array-to-string.js: Added.

(target):

  • microbenchmarks/double-array-to-string.js: Added.

(target):

  • microbenchmarks/int32-array-to-string.js: Added.

(target):

Source/JavaScriptCore:

Array#toString()'s fast path uses original join operation.
But this should use fastJoin if possible.
This patch adds a fast path using fastJoin in Array#toString.
And we also extend fastJoin to perform fast joining for int32
arrays.

baseline patched

double-array-to-string 126.6157+-5.8625 103.7343+-4.4968 definitely 1.2206x faster
int32-array-to-string 64.7792+-2.6524 61.2390+-2.1749 might be 1.0578x faster
contiguous-array-to-string 62.6224+-2.6388 56.9899+-2.0852 definitely 1.0988x faster

  • runtime/ArrayPrototype.cpp:

(JSC::fastJoin):
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):

  • runtime/JSStringJoiner.h:

(JSC::JSStringJoiner::appendWithoutSideEffects):
(JSC::JSStringJoiner::appendInt32):
(JSC::JSStringJoiner::appendDouble):

Source/WTF:

A bit cleaning up to use StringImpl::copyChars instead of
using for-loop directly.

  • wtf/text/StringView.h:

(WTF::StringView::getCharactersWithUpconvert const):

3:11 AM Changeset in webkit [223833] by magomez@igalia.com
  • 6 edits in trunk/Source/WebCore

[TexMap] Remove GraphicsContext3D usage from TextureMapperShaderProgram
https://bugs.webkit.org/show_bug.cgi?id=175425

Reviewed by Žan Doberšek.

Remove usage of the GraphicsContext3D class in TextureMapperShaderProgram.
Direct OpenGL API calls, types and constants are used instead.

By removing GraphicsContext3D, we don't use ANGLE anymore to perform the
shader adaptation to the used OpenGL/GLES2 version, so we need to do that
inside TextureMapperShaderProgram. The main changes required for this are
adding the #version directive and use in/out to define input/output parameters
when using OpenGL >= 3.2, and defining the default precision only when using
GLES2.

Besides that, now that VideoTextureCopierGStreamer doesn't have its own
GraphicsContext3D, we need to add a VAO to it when using OpenGL >= 3.2.

Based on a previous patch by Žan Doberšek <zdobersek@igalia.com>.

No behavior change.

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGLData::getShaderProgram):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawFiltered):

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(WebCore::TextureMapperShaderProgram::create):
(WebCore::getShaderLog):
(WebCore::getProgramLog):
(WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::setMatrix):
(WebCore::TextureMapperShaderProgram::getLocation):

  • platform/graphics/texmap/TextureMapperShaderProgram.h:

(WebCore::TextureMapperShaderProgram::programID const):

Oct 22, 2017:

10:27 PM Changeset in webkit [223832] by zandobersek@gmail.com
  • 2 edits in trunk/JSTests

stress/check-string-ident.js is improperly skipped
https://bugs.webkit.org/show_bug.cgi?id=178642

Reviewed by Saam Barati.

  • stress/check-string-ident.js: Drop the defaultNoEagerRun directive

since it enforces the run-jsc-stress-tests script to still set up the
test to run, despite the skip directive that's used before.

10:26 PM Changeset in webkit [223831] by zandobersek@gmail.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Remove !(OS(LINUX) && CPU(ARM64)) guards in RegisterState.h
https://bugs.webkit.org/show_bug.cgi?id=178452

Reviewed by Yusuke Suzuki.

  • heap/RegisterState.h: Re-enable the custom RegisterState and

ALLOCATE_AND_GET_REGISTER_STATE definitions on ARM64 Linux. These don't
cause any crashes nowadays.

8:38 PM Changeset in webkit [223830] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.4.5.1/Source

Versioning.

8:24 PM Changeset in webkit [223829] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.5.1

New tag.

8:13 PM Changeset in webkit [223828] by commit-queue@webkit.org
  • 5 edits
    8 adds
    3 deletes in trunk/Source/WebCore

[Settings] Replace current Settings generation with template file based approach
https://bugs.webkit.org/show_bug.cgi?id=178634

Patch by Sam Weinig <sam@webkit.org> on 2017-10-22
Reviewed by Joseph Pecoraro.

This replaces the recently added python based Settings generation with a generator
built in ruby, so we can take advantage of ERB for templating. The result has much
of the logic in the templates and as a result feels much easier to follow and cleaner.

Since I was moving things to ruby, I took the opertunity to switch the Settings definition
file from our .in format to yaml, which is quite a bit easier to read.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Scripts/GenerateSettings: Removed.
  • Scripts/GenerateSettings.py: Removed.
  • Scripts/GenerateSettings.rb: Added.
  • Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Removed.
  • Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Removed.
  • Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Removed.
  • Scripts/GenerateSettings/GenerateSettings.py: Removed.
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Removed.
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Removed.
  • Scripts/GenerateSettings/Settings.py: Removed.
  • Scripts/GenerateSettings/init.py: Removed.
  • Scripts/SettingsTemplates: Added.
  • Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb: Added.
  • Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb: Added.
  • Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: Added.
  • Scripts/SettingsTemplates/Settings.cpp.erb: Added.
  • Scripts/SettingsTemplates/Settings.h.erb: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreMacros.cmake:
  • page/Settings.in: Removed.
  • page/Settings.yaml: Added.
7:20 PM Changeset in webkit [223827] by wenson_hsieh@apple.com
  • 6 edits in trunk/Source/WebKit

[iOS] WebProcess::initializeWebProcess spends ~150ms spinning up AVSystemController on some devices
https://bugs.webkit.org/show_bug.cgi?id=178640
<rdar://problem/35113105>

Reviewed by Youenn Fablet.

In r213933, we added a mechanism to allow the web process to drive media capture, by setting an attribute on the
shared AVSystemController. This requires us to fault in the Celestial framework, which is a slight performance
hit on some hardware. Instead of doing this at the start of every web process launch, we can just do this work
lazily, the first time the web process requests permissions for user media access.

  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:

(WebKit::WebUserMediaClient::requestUserMediaAccess):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::prepareToSendUserMediaPermissionRequest):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::prepareToSendUserMediaPermissionRequest):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

5:43 PM Changeset in webkit [223826] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

REGRESSION(r219675): Web Inspector: CommandLineAPI getEventListeners does not work
https://bugs.webkit.org/show_bug.cgi?id=178650
<rdar://problem/35116347>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-22
Reviewed by Sam Weinig.

Source/WebCore:

Test: inspector/console/command-line-api-getEventListeners.html

  • inspector/CommandLineAPIHost.cpp:

(WebCore::listenerEntriesFromListenerInfo):
Fix typo.

(WebCore::CommandLineAPIHost::getEventListeners):
Fix incorrect early return.

  • inspector/CommandLineAPIHost.h:
  • inspector/CommandLineAPIHost.idl:

Add more attributes about the listener. These new attributes match output from Chrome.

LayoutTests:

  • inspector/console/command-line-api-getEventListeners-expected.txt: Added.
  • inspector/console/command-line-api-getEventListeners.html: Added.
2:31 PM Changeset in webkit [223825] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk

[Web Animations] Add animations to the timeline
https://bugs.webkit.org/show_bug.cgi?id=178643

Patch by Antoine Quint <Antoine Quint> on 2017-10-22
Reviewed by Dean Jackson.

Source/WebCore:

If a timeline is provided as a parameter to the Animation constructor,
add it to the timeline, and remove it when the object is destroyed.

We also start the basic mechanism to dump the contents of a timeline
as text for testing purposes, currently only logging the number of
animations in a timeline and just logging the class name for animation
themselves.

Test: webanimations/animation-creation-addition.html

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::description):

  • animation/AnimationTimeline.h:
  • animation/AnimationTimeline.idl:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::~WebAnimation):
(WebCore::WebAnimation::description):

  • animation/WebAnimation.h:
  • testing/Internals.cpp:

(WebCore::Internals::timelineDescription):

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

LayoutTests:

Add a new test that checks that animations created with a timeline
are added to the provided timeline.

  • webanimations/animation-creation-addition-expected.txt: Added.
  • webanimations/animation-creation-addition.html: Added.
11:28 AM Changeset in webkit [223824] by Yusuke Suzuki
  • 11 edits in trunk/Source/JavaScriptCore

[JSC][Baseline] Use linkAllSlowCasesForBytecodeOffset as much as possible to simplify slow cases handling
https://bugs.webkit.org/show_bug.cgi?id=178647

Reviewed by Saam Barati.

There is much code counting slow cases in fast paths to call linkSlowCase carefully. This is really error-prone
since the number of slow cases depends on values of instruction's metadata. We have linkAllSlowCasesForBytecodeOffset,
which drains all slow cases for a specified bytecode offset. In typical cases like just calling a slow path function,
this is enough. We use linkAllSlowCasesForBytecodeOffset as much as possible. It significantly simplifies the code.

  • jit/JIT.h:

(JSC::JIT::linkAllSlowCases):

  • jit/JITArithmetic.cpp:

(JSC::JIT::emitSlow_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emitSlow_op_inc):
(JSC::JIT::emitSlow_op_dec):
(JSC::JIT::emitSlow_op_mod):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emitSlow_op_bitand):
(JSC::JIT::emitSlow_op_bitor):
(JSC::JIT::emitSlow_op_bitxor):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emitSlow_op_div):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emitSlow_op_sub):

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emitSlow_op_unsigned):
(JSC::JIT::emitSlow_op_inc):
(JSC::JIT::emitSlow_op_dec):
(JSC::JIT::emitSlow_op_mod):

  • jit/JITCall.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITInlines.h:

(JSC::JIT::linkAllSlowCasesForBytecodeOffset):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emitSlow_op_create_this):
(JSC::JIT::emitSlow_op_check_tdz):
(JSC::JIT::emitSlow_op_to_this):
(JSC::JIT::emitSlow_op_to_primitive):
(JSC::JIT::emitSlow_op_not):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_stricteq):
(JSC::JIT::emitSlow_op_nstricteq):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emitSlow_op_to_number):
(JSC::JIT::emitSlow_op_to_string):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emitSlow_op_get_direct_pname):
(JSC::JIT::emitSlow_op_has_structure_property):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emitSlow_op_to_primitive):
(JSC::JIT::emitSlow_op_not):
(JSC::JIT::emitSlow_op_stricteq):
(JSC::JIT::emitSlow_op_nstricteq):
(JSC::JIT::emitSlow_op_to_number):
(JSC::JIT::emitSlow_op_to_string):
(JSC::JIT::emitSlow_op_create_this):
(JSC::JIT::emitSlow_op_to_this):
(JSC::JIT::emitSlow_op_check_tdz):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emitSlow_op_get_direct_pname):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitSlow_op_put_to_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitSlow_op_put_to_scope):

9:47 AM Changeset in webkit [223823] by Yusuke Suzuki
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] Clean up baseline slow path
https://bugs.webkit.org/show_bug.cgi?id=178646

Reviewed by Saam Barati.

If the given op is just calling a slow path function, we should use DEFINE_SLOW_OP instead.
It is good since (1) we can reduce the manual emitting code and (2) it can clarify which
function is implemented as a slow path call. This patch is an attempt to reduce 32bit specific
code in baseline JIT.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_pow): Deleted.

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emitSlow_op_mod):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_strcat): Deleted.
(JSC::JIT::emit_op_push_with_scope): Deleted.
(JSC::JIT::emit_op_assert): Deleted.
(JSC::JIT::emit_op_create_lexical_environment): Deleted.
(JSC::JIT::emit_op_throw_static_error): Deleted.
(JSC::JIT::emit_op_new_array_with_spread): Deleted.
(JSC::JIT::emit_op_spread): Deleted.
(JSC::JIT::emit_op_get_enumerable_length): Deleted.
(JSC::JIT::emit_op_has_generic_property): Deleted.
(JSC::JIT::emit_op_get_property_enumerator): Deleted.
(JSC::JIT::emit_op_to_index_string): Deleted.
(JSC::JIT::emit_op_create_direct_arguments): Deleted.
(JSC::JIT::emit_op_create_scoped_arguments): Deleted.
(JSC::JIT::emit_op_create_cloned_arguments): Deleted.
(JSC::JIT::emit_op_create_rest): Deleted.
(JSC::JIT::emit_op_unreachable): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_strcat): Deleted.
(JSC::JIT::emit_op_push_with_scope): Deleted.
(JSC::JIT::emit_op_assert): Deleted.
(JSC::JIT::emit_op_create_lexical_environment): Deleted.

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_by_val_with_this): Deleted.
(JSC::JIT::emit_op_get_by_val_with_this): Deleted.
(JSC::JIT::emit_op_put_by_id_with_this): Deleted.
(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval): Deleted.
(JSC::JIT::emit_op_define_data_property): Deleted.
(JSC::JIT::emit_op_define_accessor_property): Deleted.

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval): Deleted.
(JSC::JIT::emit_op_get_by_val_with_this): Deleted.
(JSC::JIT::emit_op_put_by_id_with_this): Deleted.
(JSC::JIT::emit_op_put_by_val_with_this): Deleted.

Oct 21, 2017:

8:41 PM Changeset in webkit [223822] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, silence a -Wunused-but-set-variable warning

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

7:05 PM Changeset in webkit [223821] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Drop allowSubtree parameter
https://bugs.webkit.org/show_bug.cgi?id=178623
<rdar://problem/35111012>

Reviewed by Sam Weinig.

This flag is only set through ::forceLayout(). Let's just convert the subtree layout
to full layout right before calling ::layout().

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
(WebCore::FrameView::forceLayout):

  • page/FrameView.h:
3:23 PM Changeset in webkit [223820] by commit-queue@webkit.org
  • 14 edits
    2 deletes in trunk/Source

Web Inspector: Remove unused Console.setMonitoringXHREnabled
https://bugs.webkit.org/show_bug.cgi?id=178617

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-21
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/JSGlobalObjectConsoleAgent.cpp: Removed.
  • inspector/agents/JSGlobalObjectConsoleAgent.h: Removed.
  • inspector/protocol/Console.json:

Removed files and method.

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
This can use the base ConsoleAgent now.

Source/WebCore:

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishXHRLoading):

  • inspector/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::setMonitoringXHREnabled): Deleted.
(WebCore::WebConsoleAgent::didFinishXHRLoading): Deleted.

  • inspector/WebConsoleAgent.h:

Remove XHR monitoring code.

  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber): Deleted.

  • xml/XMLHttpRequest.idl:

Remove now unused state on XHR and ExecState requirement for send().

2:48 PM Changeset in webkit [223819] by dino@apple.com
  • 4 edits
    9 adds in trunk

createImageBitmap with basic HTMLImageElement
https://bugs.webkit.org/show_bug.cgi?id=178619
<rdar://problem/35104118>

Reviewed by Antoine Quint.

Source/WebCore:

Implement the basic infrastructure for creating
an ImageBitmap from an HTMLImageElement.

Test: http/wpt/2dcontext/imagebitmap/createImageBitmap.html

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise): Create the image buffer
and draw the image into its backing store.

  • html/ImageBitmap.h:

LayoutTests:

Make a better test for createImageBitmap. This will be
submitted to Web Platform Tests.

  • http/wpt/2dcontext/imagebitmap/createImageBitmap-expected.txt: Added.
  • http/wpt/2dcontext/imagebitmap/createImageBitmap.html: Added.
  • http/wpt/common/canvas-tests.css: Added.
  • http/wpt/common/canvas-tests.js: Added.
  • http/wpt/images/pattern.png: Added.
2:42 PM Changeset in webkit [223818] by timothy_horton@apple.com
  • 5 edits
    1 copy
    1 add in trunk

Turn on ccache for Mac cmake builds by default
https://bugs.webkit.org/show_bug.cgi?id=177059

Reviewed by Sam Weinig.

.:

  • Source/cmake/WebKitCCache.cmake: Added.
  • Source/cmake/WebKitCommon.cmake:

Turn on ccache for Mac CMake builds (Makefile and Ninja generators only)
if it's installed, making use of CMake's ability to wrap the compiler invocation.

Tools:

  • ccache/ccache-clang:
  • ccache/ccache-wrapper: Added.

Add a pass-through ccache wrapper to be used with CMake, in addition
to the existing faux-clang wrappers.

  • Scripts/build-webkit:

Add --use-ccache and --no-use-ccache option, which will define
WK_USE_CCACHE to YES or NO, respectively, which the underlying
build systems respect. We do not define WK_USE_CCACHE if the option
is not specified, because the underlying build systems have different
default values.

12:23 PM Changeset in webkit [223817] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

12:19 PM Changeset in webkit [223816] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-604-branch

Cherry-pick r223731. rdar://problem/35100279

12:19 PM Changeset in webkit [223815] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-604-branch

Cherry-pick r223645. rdar://problem/34820875

12:19 PM Changeset in webkit [223814] by jmarcell@apple.com
  • 7 edits
    49 adds in branches/safari-604-branch

Cherry-pick r223578. rdar://problem/34891313

8:34 AM Changeset in webkit [223813] by Yusuke Suzuki
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Remove per-host-function CTI stub in 32bit environment
https://bugs.webkit.org/show_bug.cgi?id=178581

Reviewed by Saam Barati.

JIT::privateCompileCTINativeCall only exists in 32bit environment and it is almost the same to native call CTI stub.
The only difference is that it embed the address of the host function directly in the generated stub. This means
that we have per-host-function CTI stub only in 32bit environment.

This patch just removes it and use one CTI stub instead. This design is the same to the current 64bit implementation.

  • jit/JIT.cpp:

(JSC::JIT::compileCTINativeCall): Deleted.

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTINativeCall): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTINativeCall): Deleted.

  • jit/JITThunks.cpp:

(JSC::JITThunks::hostFunctionStub):

7:11 AM Changeset in webkit [223812] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Web Animations] Add bindings to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178620

Patch by Antoine Quint <Antoine Quint> on 2017-10-21
Reviewed by Dean Jackson.

Removing the Web Animations bindings from the WebCore target and adding them to the unified sources list instead.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
1:26 AM Changeset in webkit [223811] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the Mac CMake build

  • PlatformMac.cmake:
1:15 AM Changeset in webkit [223810] by Antti Koivisto
  • 7 edits in trunk

Support ::before/::after pseudo elements with display:contents
https://bugs.webkit.org/show_bug.cgi?id=178584

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is cases like

::before { display:contents; content:'foo' }

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustDisplayContentsStyle): Added.

Allow display:contents on pseudo elements.
Factor into function.

(WebCore::StyleResolver::adjustRenderStyle):

  • dom/PseudoElement.h:

Add a weak vector of content renderers.

  • style/RenderTreePosition.h:

(WebCore::RenderTreePosition::moveToLastChild):

Add a way to set a valid render tree position without a node.

  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::createContentRenderers):

Take RenderTreePosition.

(WebCore::updateStyleForContentRenderers):

Update based on the content renderer vector instead of doing a tree walk.

(WebCore::removeAndDestroyContentRenderers):

Helper for destroying content renderers.

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

In the normal case create a render tree position for the pseudo element renderer and
use RenderTreePosition::moveToLastChild to make it a valid position. (The existing
RenderTreePosition interface didn't have way to move to positions in anonymous boxes)

In the case of a non box generating display:contents pseudo element, use the current
render tree position instead.

Ensure that pseudo element renderers are destroyed before creating the new ones since in
display:contents case they are not descendants of the pseudo renderer and don't get cleared
automatically.

LayoutTests:

  • TestExpectations: Enable imported/w3c/web-platform-tests/css/css-display-3/display-contents-before-after-002.html

Oct 20, 2017:

11:52 PM Changeset in webkit [223809] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: Support async test() { ... } in Inspector Test Suites
https://bugs.webkit.org/show_bug.cgi?id=178614

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-20
Reviewed by Devin Rousso.

Add the ability to have test functions be async functions. A successful
async test function just needs to complete evaluation. To indicate
failure it should throw an exception.

suite.addTestCase({

name: "ExceptionOfNormal",
async test() {

InspectorTest.expectThat(...);

}

});

suite.addTestCase({

name: "ExampleOfRejection",
async test() {

let value = await SomeAgent.method();
if (value.error)

throw "Exception";

...

}

});

Using async test functions has the added benefit that a runtime exception
inside of asynchronous test code will reject the current test case instead
of timing out. For example...

suite.addTestCase({

name: "ExampleOfRejectionThroughRuntimeException",
async test() {

let arr = [];
arr.this.does.not.exist;

}

});

... should will lead to a failure instead of a timeout.

This should allow us to structure some common tests more naturally, like so:

suite.addTestCase({

name: "ExampleOfNormalAsyncTest",
async test() {

InspectorTest.evaluateInPage(...);
let event = await WI.Manager.awaitEvent(...);
let resource = event.data.resource;
InspectorTest.expectEqual(...);
InspectorTest.expectEqual(...);
InspectorTest.expectEqual(...);

}

});

  • inspector/unit-tests/async-test-suite-expected.txt:
  • inspector/unit-tests/async-test-suite.html:
  • inspector/unit-tests/target-manager.html:
11:16 PM Changeset in webkit [223808] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Add FIXME comment after r223803
https://bugs.webkit.org/show_bug.cgi?id=178418

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
We need some work to better support customized persistent data stores. Add a comment indicating such.

10:04 PM Changeset in webkit [223807] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: scrolling the editor while debugging shouldn't trigger popovers
https://bugs.webkit.org/show_bug.cgi?id=178325

Reviewed by Devin Rousso.

Ignore the next "mousemove" event immediately following a "mousewheel",
when determining the hovered item for purposes of triggering a popover.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WI.CodeMirrorTokenTrackingController):
(WI.CodeMirrorTokenTrackingController.prototype._startTracking):
(WI.CodeMirrorTokenTrackingController.prototype._stopTracking):
(WI.CodeMirrorTokenTrackingController.prototype.handleEvent):
(WI.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):

10:00 PM Changeset in webkit [223806] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: preview content view for MIME type application/json should be a collapsible tree outline
https://bugs.webkit.org/show_bug.cgi?id=158938
<rdar://problem/26891128>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-20
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New files and strings.

  • UserInterface/Views/JSONResourceContentView.css: Added.

(.content-view.resource.json):
(.content-view.resource.json .object-tree .prototype-property):
Some padding and scrolling for the JSON content view.

  • UserInterface/Views/JSONResourceContentView.js: Added.

(WI.JSONResourceContentView):
(WI.JSONResourceContentView.customContentViewDisplayName):
(WI.JSONResourceContentView.prototype.contentAvailable):
(WI.JSONResourceContentView.prototype.closed):
JSON view evaluates the JSON content on the page and shows an ObjectTree
for the resulting object.

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype.get customResponseContentView):
(WI.ResourceClusterContentView.prototype.get selectionPathComponents):
(WI.ResourceClusterContentView.prototype.restoreFromCookie):
(WI.ResourceClusterContentView.prototype.showResponse):
(WI.ResourceClusterContentView.prototype._canShowRequestContentView):
(WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._pathComponentForContentView):
(WI.ResourceClusterContentView.prototype._identifierForContentView):
(WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WI.ResourceClusterContentView.prototype._resourceTypeDidChange):
(WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource):
Allow a custom content view to be used for a resource based on the response.
Currently the only custom content view is the JSON content view.

9:31 PM Changeset in webkit [223805] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Use SetForScope to ensure layout state correctness
https://bugs.webkit.org/show_bug.cgi?id=178604
<rdar://problem/35101890>

Reviewed by Simon Fraser.

SetForScope guarantees state correctness even with nested layouts. This is a lot less
error prone than resetting the state value after each potential recursive call.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange): This layout state does
not look too useful.
(WebCore::FrameView::layout):

  • page/FrameView.h: While performPostLayoutTasks() is somewhat special since it can either be sync or async,

so painting should be allowed in both cases.

7:33 PM Changeset in webkit [223804] by commit-queue@webkit.org
  • 21 edits in trunk/Source/WebCore

SVGPathElement should cache the built-up Path of its non animating pathByteStream()
https://bugs.webkit.org/show_bug.cgi?id=178248

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

Instead of creating a Path object from the non animating pathByteStream()
every time we need to updatePathFromPathElement(), the Path object can be
cached once it is created and used for later calls.

  • html/canvas/Path2D.h: buildPathFromString() now returns a Path.
  • platform/graphics/Path.h:
  • platform/graphics/cairo/PathCairo.cpp:

(WebCore::Path::Path):
(WebCore::Path::operator=):

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::Path):
(WebCore::Path::operator=):

  • platform/graphics/win/PathDirect2D.cpp:

(WebCore::Path::Path):
(WebCore::Path::operator=):
Define the move constructor and the move assignment operator for the the
Path class so a statement like "Path path = buildPathFromString()" won't
go through the copy constructor and the copy assignment operator.

  • rendering/style/BasicShapes.cpp:

(WebCore::SVGPathTranslatedByteStream::path const):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::pathOnlyClipping):

  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::updateShapeFromElement):

  • rendering/svg/RenderSVGTextPath.cpp:

(WebCore::RenderSVGTextPath::layoutPath const):

  • rendering/svg/SVGPathData.cpp:

(WebCore::pathFromCircleElement):
(WebCore::pathFromEllipseElement):
(WebCore::pathFromLineElement):
(WebCore::pathFromPathElement):
(WebCore::pathFromPolygonElement):
(WebCore::pathFromPolylineElement):
(WebCore::pathFromRectElement):
(WebCore::pathFromGraphicsElement):
(WebCore::updatePathFromCircleElement): Deleted.
(WebCore::updatePathFromEllipseElement): Deleted.
(WebCore::updatePathFromLineElement): Deleted.
(WebCore::updatePathFromPathElement): Deleted.
(WebCore::updatePathFromPolygonElement): Deleted.
(WebCore::updatePathFromPolylineElement): Deleted.
(WebCore::updatePathFromRectElement): Deleted.
(WebCore::updatePathFromGraphicsElement): Deleted.

  • rendering/svg/SVGPathData.h:
  • svg/SVGAnimateMotionElement.cpp:

(WebCore::SVGAnimateMotionElement::parseAttribute):
(WebCore::SVGAnimateMotionElement::updateAnimationPath):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::toClipPath):

  • svg/SVGGraphicsElement.h:

Rename updatePathFromElement() to pathFromGraphicsElement().

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::parseAttribute): Clear the cache when
m_pathByteStream changes.
(WebCore::SVGPathElement::pathForByteStream const): Caches the m_cachedPath
if it is null.
(WebCore::SVGPathElement::pathSegListChanged): Clear the cache when
m_pathByteStream changes.

  • svg/SVGPathElement.h:
  • svg/SVGPathUtilities.cpp:

(WebCore::buildPathFromString):
(WebCore::buildPathFromByteStream):

  • svg/SVGPathUtilities.h:

Make thes buildPathFromString() and buildPathFromByteStream() return Paths.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::toClipPath):

  • svg/SVGUseElement.h:

Make these toClipPath() return Path.

6:11 PM Changeset in webkit [223803] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix API tests after r223791.
https://bugs.webkit.org/show_bug.cgi?id=178418

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
Whatever NetworkSessionInitializationParameters we send with the NetworkProcess initialization message,
that's the default session. This is needed for WebKit.WebsiteDataStoreCustomPaths.
(WebKit::WebProcessPool::createNewWebProcess):
Don't change behavior or NetworkProcess initialization like I did in r223791.

5:49 PM Changeset in webkit [223802] by rniwa@webkit.org
  • 90 edits in trunk/Source/WebCore

Rename insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor
https://bugs.webkit.org/show_bug.cgi?id=178605

Reviewed by Andy Estes.

Renamed insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor respectively
to make it clear that these functions can be called even when node's immediate parent didn't change.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyNodeRemovedFromDocument):
(WebCore::notifyNodeRemovedFromTree):
(WebCore::notifyChildNodeRemoved):

  • dom/ContainerNodeAlgorithms.h:
  • dom/Element.cpp:

(WebCore::Element::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::Element::removedFromAncestor): Renamed from removedFrom.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::insertedIntoAncestor):
(WebCore::Node::removedFromAncestor):
(WebCore::Node::removedFrom): Deleted.

  • dom/Node.h:
  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::ProcessingInstruction::removedFromAncestor): Renamed from removedFrom.

  • dom/ProcessingInstruction.h:
  • dom/ScriptElement.h:

(WebCore::ScriptElement::insertedIntoAncestor const): Renamed from insertedInto.

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::ShadowRoot::removedFromAncestor): Renamed from removedFrom.

  • dom/ShadowRoot.h:
  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::FormAssociatedElement::removedFromAncestor): Renamed from removedFrom.

  • html/FormAssociatedElement.h:
  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLBaseElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLBaseElement.h:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLBodyElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormControlElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLFormControlElement.h:
  • html/HTMLFormControlElementWithState.cpp:

(WebCore::HTMLFormControlElementWithState::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormControlElementWithState::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLFormControlElementWithState.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLFormElement.h:
  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLFrameElementBase.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFrameSetElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLFrameSetElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLImageElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLInputElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLInputElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLLinkElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLLinkElement.h:
  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLMapElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLMapElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLMediaElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLMediaElement.h:
  • html/HTMLMetaElement.cpp:

(WebCore::HTMLMetaElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLMetaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLObjectElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLObjectElement.h:
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLOptionElement.h:
  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLScriptElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLSelectElement.h:
  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLSlotElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLSlotElement.h:
  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLSourceElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLSourceElement.h:
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLStyleElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLStyleElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLTextFormControlElement.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLTitleElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLTitleElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLTrackElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLTrackElement.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::removedFromAncestor): Renamed from removedFrom.
(WebCore::SVGElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGElement::updateRelativeLengthsInformation):

  • svg/SVGElement.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGFEImageElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGFEImageElement.h:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGFontFaceElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGFontFaceElement.h:
  • svg/SVGFontFaceUriElement.cpp:

(WebCore::SVGFontFaceUriElement::insertedIntoAncestor): Renamed from insertedInto.

  • svg/SVGFontFaceUriElement.h:
  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::insertedIntoAncestor): Renamed from insertedInto.

  • svg/SVGImageElement.h:
  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGMPathElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGMPathElement.h:
  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGPathElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGPathElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGSVGElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGSVGElement.h:
  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::insertedIntoAncestor): Renamed from insertedInto.

  • svg/SVGScriptElement.h:
  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGStyleElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGStyleElement.h:
  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::buildPendingResource):
(WebCore::SVGTRefElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTRefElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGTRefElement.h:
  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTextPathElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGTextPathElement.h:
  • svg/SVGTitleElement.cpp:

(WebCore::SVGTitleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTitleElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGTitleElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGUseElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGUseElement.h:
  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGSMILElement::removedFromAncestor): Renamed from removedFrom.

  • svg/animation/SVGSMILElement.h:
5:03 PM Changeset in webkit [223801] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix conditions in HTMLSourceElement and HTMLTrackElement's insertedInto and removedFrom
https://bugs.webkit.org/show_bug.cgi?id=178607

Reviewed by Eric Carlson.

Fixed the conditions in insertedInto and removedFrom of HTMLSourceElement and HTMLTrackElement to be
semantically sensisble. Since these elements are only functional when their immediate parents are
HTMLMediaElement and HTMLPictureElement, we have to check that its immediate parent changed, not when
some of its ancestor had changed by insertion or removal.

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):

  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::insertedInto):
(WebCore::HTMLTrackElement::removedFrom):

4:55 PM Changeset in webkit [223800] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=178606

Reviewed by Wenson Hsieh.

The bug was caused by the race condition during the page loading of iframes.

Waiting for message event wasn't doing anything useful because it was receiving the message from
source iframe before the drag & drop had started.

Fixed the bug by waiting for the second message event. Also replaced the wait for load event
by the wait for the first message event for clarity.

  • http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html:
4:40 PM Changeset in webkit [223799] by Ryan Haddad
  • 11 edits
    3 moves
    24 adds
    1 delete in trunk/LayoutTests

[iOS] Rebaseline compositing tests
https://bugs.webkit.org/show_bug.cgi?id=178492

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/ios/compositing/backing/child-layer-no-backing-expected.txt: Added.
  • platform/ios/compositing/contents-scale/animating-expected.txt:
  • platform/ios/compositing/geometry/ancestor-overflow-change-expected.txt:
  • platform/ios/compositing/geometry/fixed-position-expected.txt:
  • platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt: Added.
  • platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: Added.
  • platform/ios/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt: Added.
  • platform/ios/compositing/geometry/preserve-3d-switching-expected.txt: Added.
  • platform/ios/compositing/geometry/tall-page-composited-expected.txt: Added.
  • platform/ios/compositing/geometry/video-fixed-scrolling-expected.txt: Added.
  • platform/ios/compositing/geometry/video-opacity-overlay-expected.txt: Added.
  • platform/ios/compositing/iframes/invisible-nested-iframe-show-expected.txt:
  • platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/iframes/overlapped-nested-iframes-expected.txt.
  • platform/ios/compositing/images/direct-image-object-fit-expected.txt: Added.
  • platform/ios/compositing/layer-creation/animation-overlap-with-children-expected.txt: Removed.
  • platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-and-transform-expected.txt.
  • platform/ios/compositing/overflow/ancestor-overflow-expected.txt:
  • platform/ios/compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt: Added.
  • platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: Added.
  • platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: Added.
  • platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
  • platform/ios/compositing/overflow/fixed-position-ancestor-clip-expected.txt:
  • platform/ios/compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor-expected.txt: Added.
  • platform/ios/compositing/reflections/direct-image-object-fit-reflected-expected.txt: Added.
  • platform/ios/compositing/reflections/load-video-in-reflection-expected.txt: Added.
  • platform/ios/compositing/reflections/nested-reflection-on-overflow-expected.txt:
  • platform/ios/compositing/repaint/page-scale-repaint-expected.txt: Added.
  • platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt.
  • platform/ios/compositing/rtl/rtl-overflow-scrolling-expected.txt: Added.
  • platform/ios/compositing/self-painting-layers-expected.txt: Added.
  • platform/ios/compositing/tiling/huge-layer-img-expected.txt: Added.
  • platform/ios/compositing/visible-rect/3d-transform-style-expected.txt: Added.
  • platform/ios/compositing/visible-rect/animated-expected.txt: Added.
  • platform/ios/compositing/visible-rect/iframe-no-layers-expected.txt: Added.
  • platform/ios/compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt: Added.
  • platform/ios/compositing/visible-rect/mask-layer-coverage-expected.txt: Added.
4:12 PM Changeset in webkit [223798] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix download tests on El Capitan after r223730
https://bugs.webkit.org/show_bug.cgi?id=178547

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
Revert to original behavior. This uses suggestedFilename, which may have come from places like
the download attribute, instead of always using the filename from CFNetwork.

4:09 PM Changeset in webkit [223797] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.5

Tag Safari-604.4.5.

2:56 PM Changeset in webkit [223796] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

Do not run binding tests on multiple EWSes
https://bugs.webkit.org/show_bug.cgi?id=178599

Reviewed by Alexey Proskuryakov.

Remove old code which runs bindings tests and ignore it's result. We now have
a dedicated bindings test EWS.

  • Scripts/webkitpy/tool/steps/runtests.py:

(RunTests.run): Removed bindings tests code.

  • Scripts/webkitpy/tool/steps/runtests_unittest.py: Updated unit-tests.

(RunTestsTest.test_webkit_run_unit_tests): Ditto.

  • Scripts/webkitpy/tool/steps/steps_unittest.py: Ditto.
  • Scripts/webkitpy/tool/commands/download_unittest.py: Ditto.
2:20 PM Changeset in webkit [223795] by keith_miller@apple.com
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix windows build.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
1:58 PM Changeset in webkit [223794] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Use "= default" for more default constructors and destructors in WebCore
https://bugs.webkit.org/show_bug.cgi?id=178585

Patch by Daniel Bates <dabates@apple.com> on 2017-10-20
Reviewed by Alex Christensen.

Also remove some destructors that would be implicitly generated.

  • Modules/applepay/PaymentMerchantSession.h:

(WebCore::PaymentMerchantSession::~PaymentMerchantSession): Deleted.

  • platform/ControlStates.h:

(WebCore::ControlStates::~ControlStates): Deleted.

  • platform/PlatformEvent.h:

(WebCore::PlatformEvent::~PlatformEvent): Use default.

  • platform/PlatformStrategies.h:

(WebCore::PlatformStrategies::PlatformStrategies): Ditto.

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFFrameContext::GIFFrameContext):
(GIFFrameContext::~GIFFrameContext): Deleted.
(GIFImageReader::~GIFImageReader): Deleted.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::RenderBlockFlowRareData::~RenderBlockFlowRareData): Deleted.

1:58 PM Changeset in webkit [223793] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked plugins/js-from-destroy.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=176881

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:40 PM Changeset in webkit [223792] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Scheduling layout should be disabled for FrameView::layout
https://bugs.webkit.org/show_bug.cgi?id=178562
<rdar://problem/35089015>

Reviewed by Simon Fraser.

This patch extends the scope of m_layoutSchedulingEnabled. Now layout scheduling is disabled for the entire FrameView::layout().
A scheduled layout at the end of FrameView::layout would indicated dirty tree (which is against FrameView::layout's contract).

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

1:39 PM Changeset in webkit [223791] by commit-queue@webkit.org
  • 38 edits
    1 add in trunk/Source

Expose _boundInterfaceIdentifier and _allowsCellularAccess to WKWebsiteDataStorePrivate
https://bugs.webkit.org/show_bug.cgi?id=178418
<rdar://problem/29599569>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-10-20
Reviewed by Tim Horton.
Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

In r213747 I introduced allowsCellularAccess to _WKProcessPoolConfiguration because there
was no way to add parameters to the default (and other) NetworkSession constructors. Since
clients have not adopted this SPI, we can introduce such a way in NetworkSessionCreationParameters
and move the SPI to WKWebsiteDataStore, which is where it and other NetworkSession properties
ought to be instead of making them WKProcessPool global.

We also need to expose access to NSURLRequest.boundInterfaceIdentifier. Instead of serializing and
deserializing that property for each NSURLRequest and then having subresources mysteriously jump back
to having no bound interface identifiers, I'm adding this to WKWebsiteDataStore, too, to make it a
session networking property.

I manually verified that these properties are being set properly with a custom test app and added logs.
Unfortunately, these properties don't do anything under circumstances anywhere close to what we test.
The architecture change of having NetworkSessionCreationParameters is verified to not have a change in
behavior by existing tests, such as any test that uses TestProtocol (which we should eventually remove).

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::create):
(WebKit::NetworkSession::defaultSession): Deleted.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSessionCreationParameters.h: Added.

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
(WebKit::NetworkSessionCocoa::create):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager): Deleted.
(WebKit::NetworkSessionCocoa::setAllowsCellularAccess): Deleted.
(WebKit::NetworkSessionCocoa::defaultSession): Deleted.

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/SessionTracker.cpp:

(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::setSession):

  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setBoundInterfaceIdentifier:]):
(-[WKWebsiteDataStore _boundInterfaceIdentifier]):
(-[WKWebsiteDataStore _setAllowsCellularAccess:]):
(-[WKWebsiteDataStore _allowsCellularAccess]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration allowsCellularAccess]):
(-[_WKProcessPoolConfiguration setAllowsCellularAccess:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::setBoundInterfaceIdentifier):
(WebKit::WebsiteDataStore::boundInterfaceIdentifier):
(WebKit::WebsiteDataStore::setAllowsCellularAccess):
(WebKit::WebsiteDataStore::allowsCellularAccess):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::clearCachedCredentials):

1:38 PM Changeset in webkit [223790] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Add ObjC SPI to _WKDownloadDelegate missing from WKContextDownloadClient
https://bugs.webkit.org/show_bug.cgi?id=178566
<rdar://problem/23041906>

Reviewed by Brady Eidson.

  • UIProcess/API/Cocoa/_WKDownloadDelegate.h:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didReceiveAuthenticationChallenge):
(WebKit::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadClient::didCreateDestination):
(WebKit::DownloadClient::processDidCrash):

1:34 PM Changeset in webkit [223789] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

When destroying a resource, register "only" the clients who are losing their resource as having pending resources
https://bugs.webkit.org/show_bug.cgi?id=178567
<rdar://problem/35064781>

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

SVGResources::resourceDestroyed() will return a bool indicating whether
it had a reference to the destroyed resource or not. If it returns true
SVGResourcesCache::resourceDestroyed() will register the client Element
as having pending resources.

  • rendering/svg/SVGResources.cpp:

(WebCore::paintingResourceFromSVGPaint):
(WebCore::SVGResources::removeClientFromCache const):
(WebCore::SVGResources::resourceDestroyed):
(WebCore::SVGResources::buildSetOfResources):
(WebCore::SVGResources::resetClipper):
(WebCore::SVGResources::resetFilter):
(WebCore::SVGResources::resetMarkerStart):
(WebCore::SVGResources::resetMarkerMid):
(WebCore::SVGResources::resetMarkerEnd):
(WebCore::SVGResources::resetMasker):
(WebCore::SVGResources::resetFill):
(WebCore::SVGResources::resetStroke):
(WebCore::SVGResources::resetLinkedResource):

  • rendering/svg/SVGResources.h:

(WebCore::SVGResources::isEmpty const):
(WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData): Deleted.
(WebCore::SVGResources::MarkerData::MarkerData): Deleted.
(WebCore::SVGResources::FillStrokeData::FillStrokeData): Deleted.

  • rendering/svg/SVGResourcesCache.cpp:

(WebCore::SVGResourcesCache::resourceDestroyed):

1:20 PM Changeset in webkit [223788] by rniwa@webkit.org
  • 7 edits in trunk/Source/WebCore

Unify the node removal code in ContainerNode and expand the coverage of NoEventDispatchAssertion
https://bugs.webkit.org/show_bug.cgi?id=178568

Reviewed by Antti Koivisto.

Consolidated the code to remove a child node in ContainerNode into removeAllChildrenWithScriptAssertion
and removeNodeWithScriptAssertion to share code and make the semantics of when it becomes unsafe to run scripts.

Also renamed getChildNodes to collectChildNodes, and made it return NodeVector instead of taking an out argument.

No new tests since there should be no behavioral changes.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Added.
(WebCore::ContainerNode::removeNodeWithScriptAssertion): Added.
(WebCore::collectChildrenAndRemoveFromOldParent):
(WebCore::ContainerNode::takeAllChildrenFrom): Deployed removeAllChildrenWithScriptAssertion.
(WebCore::ContainerNode::notifyChildRemoved): Deleted. Merged into removeNodeWithScriptAssertion.
(WebCore::willRemoveChild): Deleted. Ditto.
(WebCore::willRemoveChildren): Deleted. Merged into removeAllChildrenWithScriptAssertion.
(WebCore::ContainerNode::removeChild): Deployed removeNodeWithScriptAssertion.
(WebCore::ContainerNode::parserRemoveChild): Ditto.
(WebCore::ContainerNode::replaceAllChildren): Deployed removeAllChildrenWithScriptAssertion. Now removes the node
outside executeNodeInsertionWithScriptAssertion but that's okay since executeNodeInsertionWithScriptAssertion
doesn't execute any code with a side effect before invoking the callback.
(WebCore::ContainerNode::removeChildren):
(WebCore::dispatchChildRemovalEvents): Refactored to take Ref<Node>&.

  • dom/ContainerNode.h:

(WebCore::collectChildNodes): Renamed from getChildNodes. Also removed the useless comment about NodeVector's
initial size and instead prefer to webkit.org/b/80706 where the number 11 was picked.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):

  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::swapInNodePreservingAttributesAndChildren):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::clearShadowTree): Added an assertion exception while tearing down the UA shadow tree.

1:08 PM Changeset in webkit [223787] by mark.lam@apple.com
  • 1 edit
    1 add in trunk/JSTests

Add a test case for r214334.
https://bugs.webkit.org/show_bug.cgi?id=169941
<rdar://problem/31221258>

Reviewed by JF Bastien.

  • stress/regress-169941.js: Added.
12:56 PM Changeset in webkit [223786] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178536

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:42 PM Changeset in webkit [223785] by commit-queue@webkit.org
  • 15 edits in trunk

ResourceResponse should have a ServiceWorker source
https://bugs.webkit.org/show_bug.cgi?id=178593

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

Source/WebCore:

Covered by updated tests.

Added ResourceResponse::Source::ServiceWorker.
Added internals to get FetchResponse source.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::responseSource):

  • loader/ResourceLoader.cpp:

(WebCore::logResourceResponseSource):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::serviceWorkerKey):

  • page/DiagnosticLoggingKeys.h:
  • platform/network/ResourceResponseBase.h:
  • testing/Internals.cpp:

(WebCore::responseSourceToString):
(WebCore::Internals::fetchResponseSource):

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

Source/WebKit:

  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::didReceiveResponse): setting response source to ServiceWorker.

  • WebProcess/Storage/ServiceWorkerClientFetch.h:

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt:
  • http/tests/workers/service/resources/basic-fetch.js:

(async.test):

12:39 PM Changeset in webkit [223784] by dino@apple.com
  • 5 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223707 and r223711. rdar://problem/35099869

12:28 PM Changeset in webkit [223783] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.11.2/Source

Versioning.

12:27 PM Changeset in webkit [223782] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.11.2

New tag.

12:26 PM Changeset in webkit [223781] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

WebsiteDataStoreCustomPaths.mm is failing after r223718
https://bugs.webkit.org/show_bug.cgi?id=178596

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-20

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST): Making default web site data store creation expected at the end of the test.
We should probably not need need to create it.
This should be fixed as a follow-up.

12:21 PM Changeset in webkit [223780] by aestes@apple.com
  • 4 edits in trunk/Source/WebCore

Generated serializers do not properly handle optional interface attributes
https://bugs.webkit.org/show_bug.cgi?id=178542

Reviewed by Sam Weinig.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerDefinition):

  • bindings/scripts/test/JS/JSTestSerialization.cpp:

(WebCore::JSTestSerialization::serialize):

11:41 AM Changeset in webkit [223779] by commit-queue@webkit.org
  • 37 edits
    16 adds in trunk

[Web Animations] Provide basic timeline and animation interfaces
https://bugs.webkit.org/show_bug.cgi?id=178526

Patch by Antoine Quint <Antoine Quint> on 2017-10-20
Reviewed by Dean Jackson.

.:

Remove the WEB_ANIMATIONS compile-time flag.

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

Source/JavaScriptCore:

Remove the WEB_ANIMATIONS compile-time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

We're getting Web Animations work started by implementing a very minimal codebase which provides
a DocumentTimeline class which has an instance created for each Document. The parent class,
AnimationTimeline, allows for animations to be added and removed, and animations can be created
using the Animation class, with an optional timeline as parameter.

Tests: webanimations/animation-creation-basic.html

webanimations/document-timeline.html

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • PlatformWin.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationTimeline.cpp: Added.

(WebCore::AnimationTimeline::AnimationTimeline):
(WebCore::AnimationTimeline::~AnimationTimeline):
(WebCore::AnimationTimeline::addAnimation):
(WebCore::AnimationTimeline::removeAnimation):

  • animation/AnimationTimeline.h: Added.

(WebCore::AnimationTimeline::isDocumentTimeline const):
(WebCore::AnimationTimeline::classType const):

  • animation/AnimationTimeline.idl: Added.
  • animation/DocumentTimeline.cpp: Added.

(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):

  • animation/DocumentTimeline.h: Added.
  • animation/DocumentTimeline.idl: Added.
  • animation/WebAnimation.cpp: Added.

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::~WebAnimation):

  • animation/WebAnimation.h: Added.
  • animation/WebAnimation.idl: Added.
  • bindings/js/JSAnimationTimelineCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

  • bindings/js/WebCoreBuiltinNames.h:
  • dom/Document.cpp:

(WebCore::Document::timeline):

  • dom/Document.h:
  • dom/Document.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webAnimationsEnabled const):

Source/WebCore/PAL:

Remove the WEB_ANIMATIONS compile-time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Remove the WEB_ANIMATIONS compile-time flag.

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

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setWebAnimationsEnabled):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

Remove the WEB_ANIMATIONS compile-time flag.

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

(+[WebPreferences initialize]):

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Remove the WEB_ANIMATIONS compile-time flag.

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WTF:

Remove the WEB_ANIMATIONS compile-time flag.

  • wtf/FeatureDefines.h:

Tools:

Remove the WEB_ANIMATIONS compile-time flag.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Basic test coverage to check that we are exposing a DocumentTimeline instance on
the Document and that we can construct Animations, optionally associated with a timeline.

  • platform/mac-elcapitan/TestExpectations:
  • webanimations/animation-creation-basic-expected.txt: Added.
  • webanimations/animation-creation-basic.html: Added.
  • webanimations/document-timeline-expected.txt: Added.
  • webanimations/document-timeline.html: Added.
11:33 AM Changeset in webkit [223778] by commit-queue@webkit.org
  • 8 edits
    5 deletes in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy network tab
https://bugs.webkit.org/show_bug.cgi?id=178559
<rdar://problem/34985503>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-20
Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Main.js:

(WI.contentLoaded):

  • UserInterface/Base/Setting.js:
  • UserInterface/Main.html:
  • UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed.
  • UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed.
  • UserInterface/Views/LegacyNetworkTabContentView.js: Removed.
  • UserInterface/Views/NetworkGridContentView.css: Removed.
  • UserInterface/Views/NetworkGridContentView.js: Removed.
  • UserInterface/Views/TabBrowser.js:

(WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
Remove LegacyNetwork tab, its NetworkGridContentView, and associated content.

  • UserInterface/Views/NetworkTabContentView.js:

(WI.NetworkTabContentView.isTabAllowed):
Simplify now that this is the only Network tab.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Remove experimental setting.

10:58 AM Changeset in webkit [223777] by Matt Lewis
  • 18 edits in trunk

Unreviewed, rolling out r223744, r223750, and r223751.
https://bugs.webkit.org/show_bug.cgi?id=178594

These caused consistent failures in test that existed and were
added in the patches. (Requested by mlewis13 on #webkit).

Reverted changesets:

"[JSC] ScriptFetcher should be notified directly from module
pipeline"
https://bugs.webkit.org/show_bug.cgi?id=178340
https://trac.webkit.org/changeset/223744

"Unreviewed, fix changed line number in test expect files"
https://bugs.webkit.org/show_bug.cgi?id=178340
https://trac.webkit.org/changeset/223750

"Unreviewed, follow up to reflect comments"
https://bugs.webkit.org/show_bug.cgi?id=178340
https://trac.webkit.org/changeset/223751

Patch by Commit Queue <commit-queue@webkit.org> on 2017-10-20

10:54 AM Changeset in webkit [223776] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move can-enter-layout logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178546
<rdar://problem/35083894>

Reviewed by Antti Koivisto.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::canPerformLayout const):
(WebCore::FrameView::layout): We already assert on certain reentrancy conditions, loggig the reason
does not seem to have high value.

  • page/FrameView.h:
10:47 AM Changeset in webkit [223775] by dino@apple.com
  • 17 edits in trunk

Add createImageBitmap to Window and Worker
https://bugs.webkit.org/show_bug.cgi?id=178573
<rdar://problem/35092692>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Update the expected results now that createImageBitmap exists.

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-with-alpha-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/tranferFromImageBitmap-null-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/transferFromImageBitmap-detached-expected.txt:

Source/WebCore:

Implement the createImageBitmap functions that are exposed on the Window
and Worker objects.

Covered by the Web Platform Tests.

  • html/ImageBitmap.cpp: Make sure to call suspendIfNeeded since this is

an ActiveDOMObject.

  • html/ImageBitmap.h: Change the order of the classes in the Variant

to match the order of definitions in the IDL.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createImageBitmap): Call ImageBitmap::createPromise.

  • page/DOMWindow.h:
  • page/WindowOrWorkerGlobalScope.idl: Add the createImageBitmap methods.
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::createImageBitmap): Call ImageBitmap::createPromise.

  • workers/WorkerGlobalScope.h:
10:30 AM Changeset in webkit [223774] by Brian Burg
  • 7 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Move setup and delegates of the inspector frontend page into implementations of
WebInspectorProxy::platformCreateFrontendPage. The Mac implementation
will be subsumed by WKInspectorViewController, while the GTK implementation
is inherited from the cross-platform version that uses C API. Eventually the
GTK version should use GTK API rather than the soon to be deprecated C API.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::createFrontendPage):
(WebKit::webProcessDidCrash): Deleted.
(WebKit::decidePolicyForNavigationAction): Deleted.
(WebKit::getContextMenuFromProposedMenu): Deleted.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::exceededDatabaseQuota):
(WebKit::webProcessDidCrash):
(WebKit::decidePolicyForNavigationAction):
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::exceededDatabaseQuota):
(WebKit::webProcessDidCrash):
(WebKit::decidePolicyForNavigationAction):
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):

10:29 AM Changeset in webkit [223773] by Brian Burg
  • 6 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Introduce new platform methods to open and close the frontend page and window.
This matches how RemoteWebInspectorProxy divides work up into platform methods.
Move existing code from platformDidClose, platformOpen, and other methods into
the new platform methods. Move some identical platform code into WebInspectorProxy.cpp.

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::showConsole):
(WebKit::WebInspectorProxy::showResources):
(WebKit::WebInspectorProxy::showTimelines):
(WebKit::WebInspectorProxy::showMainResourceForFrame):
(WebKit::WebInspectorProxy::createFrontendPage):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::open):
(WebKit::WebInspectorProxy::didClose):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Renamed.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::updateInspectorWindowTitle const):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
Do everything necessary to set up the frontend page WebView.

(WebKit::WebInspectorProxy::platformCreateFrontendWindow):
Do everything necessary to set up the detached NSWindow for the frontend.

(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Deleted.
(WebKit::WebInspectorProxy::createInspectorWindow): Deleted.
(WebKit::WebInspectorProxy::platformOpen): Deleted.
(WebKit::WebInspectorProxy::platformDidClose): Deleted.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::updateInspectorWindowTitle const):
(WebKit::WebInspectorProxy::platformCreateFrontendPage): Added.
Do everything necessary to set up the frontend page WebView.

(WebKit::WebInspectorProxy::platformCreateFrontendWindow): Added.
Do everything necessary to set up the detached NSWindow for the frontend.

(WebKit::WebInspectorProxy::closeFrontendPage):
(WebKit::WebInspectorProxy::closeFrontendAfterInactivityTimerFired):
(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformDidCloseForCrash):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::platformBringToFront): Carry through renamings.

(WebKit::WebInspectorProxy::platformDetach):
Defer to the general open() method to create a window if needed and bring it to front.

(WebKit::WebInspectorProxy::platformCanAttach): Move this below open/close code.

(WebKit::WebInspectorProxy::closeFrontend): Deleted.
(WebKit::WebInspectorProxy::createInspectorWindow): Deleted.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Deleted.
(WebKit::WebInspectorProxy::platformOpen): Deleted.
(WebKit::WebInspectorProxy::platformDidClose): Deleted.
Defer to the general open() method to create a window if needed and bring it to front.

  • UIProcess/wpe/WebInspectorProxyWPE.cpp:

(WebKit::WebInspectorProxy::platformCreateFrontendPage):
(WebKit::WebInspectorProxy::platformCreateFrontendWindow):
(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Deleted.
(WebKit::WebInspectorProxy::createInspectorWindow): Deleted.
(WebKit::WebInspectorProxy::platformOpen): Deleted.
(WebKit::WebInspectorProxy::platformDidClose): Deleted.
Update stubs.

10:28 AM Changeset in webkit [223772] by Brian Burg
  • 4 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

This patch refactors some Cocoa code pathas.
Rename the timer that closes the WebView so it's more obvious what it is for.
Extract the common code to close the frontend window so its not implemented by
the timer callback.

In later patches, this will be extracted further into platform methods to open/close
the frontend and window, like how it is for RemoteWebInspectorProxy.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::WebInspectorProxy):

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::closeFrontendAfterInactivityTimerFired):
(WebKit::WebInspectorProxy::closeFrontend):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformDidCloseForCrash):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::closeTimerFired): Deleted.

10:28 AM Changeset in webkit [223771] by Brian Burg
  • 5 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Modernize the ObjC adapter and related code a bit before it is hooked
into WKInspectorViewController.

  • UIProcess/API/C/mac/WKInspectorPrivateMac.h: No need for the

ivar to be declared here, move to @implementation.

  • UIProcess/WebInspectorProxy.h: Simplify the name to match modern convention.
  • UIProcess/mac/WebInspectorProxyMac.mm:

(-[WKWebInspectorProxyObjCAdapter inspectorRef]):
(-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]):
(-[WKWebInspectorProxyObjCAdapter invalidate]):
(-[WKWebInspectorProxyObjCAdapter windowDidMove:]):
(-[WKWebInspectorProxyObjCAdapter windowDidResize:]):
(-[WKWebInspectorProxyObjCAdapter windowWillClose:]):
(-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
Remove unnecessary casts to and from void*.

(WebKit::WebInspectorProxy::attachmentViewDidChange):
(WebKit::WebInspectorProxy::setInspectorWindowFrame):
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Fix uses of member variable m_objCAdapter.

(-[WKWebInspectorProxyObjCAdapter close]): Deleted.
Rename this to invalidate to match modern convention. In this context,
'close' might trick someone into thinking that this closes a window/page.

10:28 AM Changeset in webkit [223770] by Brian Burg
  • 5 edits
    2 adds in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Move code that sets up and controls the inspector WebView into WKInspectorViewController.
This will be shared between RemoteWebInspectorProxy and WebInspectorProxy eventually,
but for now just pull out code from RemoteWebInspectorProxy. The next patch will move
over WebInspectorProxy.

WKInspectorViewController uses the ObjC API for setting up the WKWebView's delegates.
Previously, a WKWebView was used but the delegates were set up using the C API. In
a few cases it uses delegate methods to ask the owning [Remote]WebInspectorProxy some
things. In general, WKInspectorViewController doesn't dig into any internals of
WebPageProxy or WebInspectorProxy; that is delegated to the client.

  • UIProcess/RemoteWebInspectorProxy.h:

(WebKit::RemoteWebInspectorProxy::isUnderTest const): Add a method stub for now.
We might want to enable tests for a _WKRemoteWebInspectorViewController-based UI
in the future, and WebInspectorProxy has the same method. Add this and connect it
to the view controller delegate method.

(WebKit::RemoteWebInspectorProxy::webView const):
This returns a plain WKWebView type now.

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(-[WKRemoteWebInspectorProxyObjCAdapter inspectorViewControllerInspectorDidCrash:]):
(-[WKRemoteWebInspectorProxyObjCAdapter inspectorViewControllerInspectorIsUnderTest:]):
(-[WKRemoteWebInspectorProxyObjCAdapter webViewWebContentProcessDidTerminate:]): Deleted.
(-[WKRemoteWebInspectorProxyObjCAdapter webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
Make the ObjCAdapter forward view controller delegate calls to the C++ class.
It no longer needs to be the delegate of the WebView, as the view controller handles that.

(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
Clean up and move WKWebView setup code into the view controller.

(WebKit::RemoteWebInspectorProxy::platformCloseFrontendPageAndWindow):
The m_inspectorPage is closed by the caller before calling this method, so we don't need to do it here.

(WebKit::RemoteWebInspectorProxy::platformBringToFront):
(WebKit::RemoteWebInspectorProxy::platformSave):
(WebKit::RemoteWebInspectorProxy::platformAppend):
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag):
Use webView() instead of m_webView.

  • UIProcess/mac/WKInspectorViewController.h: Added.
  • UIProcess/mac/WKInspectorViewController.mm: Added.

(-[WKInspectorWKWebView tag]):
(-[WKInspectorViewController initWithInspectedPage:]):
(-[WKInspectorViewController dealloc]):
(-[WKInspectorViewController delegate]):
(-[WKInspectorViewController webView]):
(-[WKInspectorViewController setDelegate:]):
(-[WKInspectorViewController configuration]):
(-[WKInspectorViewController _webView:getWindowFrameWithCompletionHandler:]):
(-[WKInspectorViewController _webView:setWindowFrame:]):
(-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(-[WKInspectorViewController _webView:decideDatabaseQuotaForSecurityOrigin:currentQuota:currentOriginUsage:currentDatabaseUsage:expectedUsage:decisionHandler:]):
(-[WKInspectorViewController webViewWebContentProcessDidTerminate:]):
(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):
Move code from RemoteWebInspectorProxyMac into here.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::createFrontendWindow):
Remove commented out code left over from the last time that this method got moved around.

  • WebKit.xcodeproj/project.pbxproj:

Add new class.

10:22 AM Changeset in webkit [223769] by zandobersek@gmail.com
  • 3 edits
    6 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Adding GTK+-specific baselines for a bunch
of HTTP tests, and adding failure expectations for some others.

  • platform/gtk/TestExpectations:
  • platform/gtk/http/tests/security/contentSecurityPolicy/1.1: Added.
  • platform/gtk/http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: Added.
  • platform/gtk/http/tests/security/module-no-mime-type-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Added.
10:05 AM Changeset in webkit [223768] by Ms2ger@igalia.com
  • 3 edits in trunk/LayoutTests

[GTK] Update expectations for webkitConvertPoint.html
https://bugs.webkit.org/show_bug.cgi?id=178582

Reviewed by Michael Catanzaro.

This at least makes the test useful as a regression test.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/dom/Window/webkitConvertPoint-expected.txt:
10:00 AM Changeset in webkit [223767] by tpopela@redhat.com
  • 2 edits in trunk/Tools

Missing some perl packages in install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=178571

Reviewed by Žan Doberšek.

Install per-version and perl-Time-HiRes so we can use build-webkit
script. Also add missing backlashes.

  • wpe/install-dependencies:
9:30 AM Changeset in webkit [223766] by jdiggs@igalia.com
  • 7 edits
    4 adds in trunk

AX: [ATK] Events missing and state incorrect for aria-activedescendant
https://bugs.webkit.org/show_bug.cgi?id=178523

Reviewed by Chris Fleizach.

Source/WebCore:

When the aria-activedescendant of an element changes, emit object:state-changed:focused.
When a focused element has a valid active descendant, do not expose the focused state on
the element, but rather on the active descendant. Also expose the focusable state on the
active descendant.

Tests: accessibility/gtk/aria-activedescendant-changed-notification.html

accessibility/gtk/aria-activedescendant.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isActiveDescendantOfFocusedContainer const):
(WebCore::AccessibilityObject::ariaActiveDescendantReferencingElements const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const):

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

LayoutTests:

  • accessibility/gtk/aria-activedescendant-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-activedescendant-changed-notification.html: Added.
  • accessibility/gtk/aria-activedescendant-expected.txt: Added.
  • accessibility/gtk/aria-activedescendant.html: Added.
9:10 AM Changeset in webkit [223765] by commit-queue@webkit.org
  • 2 edits
    1 delete in trunk/Tools

Unreviewed, rolling out r222709 and r223572.
https://bugs.webkit.org/show_bug.cgi?id=178587

Still getting mac-wk2 EWS bots stuck (Requested by ap on
#webkit).

Reverted changesets:

"Log stack-trace for run-webkit-tests when interrupted"
https://bugs.webkit.org/show_bug.cgi?id=176393
https://trac.webkit.org/changeset/222709

"webkitpy: Hang when workers write to the same stack trace
file"
https://bugs.webkit.org/show_bug.cgi?id=178402
https://trac.webkit.org/changeset/223572

8:39 AM Changeset in webkit [223764] by jmarcell@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

Applied patch. rdar://problem/35041490

8:39 AM Changeset in webkit [223763] by jmarcell@apple.com
  • 19 edits in branches/safari-604-branch

Cherry-pick r223708. rdar://problem/34771406

8:15 AM Changeset in webkit [223762] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] Mark http/tests/navigation/keyboard-events-during-provisional-navigation.html and
http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html as failures.
https://bugs.webkit.org/show_bug.cgi?id=178549

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:02 AM Changeset in webkit [223761] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Tools

Apply patch. rdar://problem/34745623

Unreviewed build fix after merging r223427 and r223442.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Import the necessary header file, and guard the tests to only run on iOS because createTemporaryDirectory() only exists on iOS.
8:00 AM Changeset in webkit [223760] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch

Cherry-pick r223442. rdar://problem/34745623

8:00 AM Changeset in webkit [223759] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223438. rdar://problem/34745623

8:00 AM Changeset in webkit [223758] by jmarcell@apple.com
  • 6 edits
    1 add
    1 delete in branches/safari-604-branch

Cherry-pick r223427. rdar://problem/34745623

5:45 AM Changeset in webkit [223757] by Ms2ger@igalia.com
  • 5 edits in trunk

Add the MAX_CLIENT_WAIT_TIMEOUT_WEBGL constant to WebGL2RenderingContext.
https://bugs.webkit.org/show_bug.cgi?id=178572

Reviewed by Žan Doberšek.

Source/WebCore:

Test: fast/canvas/webgl/webgl2/constants.html

  • html/canvas/WebGL2RenderingContext.idl:

LayoutTests:

  • fast/canvas/webgl/webgl2/constants-expected.txt:
  • fast/canvas/webgl/webgl2/constants.html:
5:23 AM Changeset in webkit [223756] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

[WK2] Drop 'CoordinatedGraphics' as a platform prefix from generate-forwarding-headers.pl
https://bugs.webkit.org/show_bug.cgi?id=178575

Reviewed by Carlos Garcia Campos.

  • Scripts/generate-forwarding-headers.pl: Remove CoordinatedGraphics as

a supported platform prefix. No one invokes the script with this
argument anymore.

5:04 AM Changeset in webkit [223755] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed WPE gardening. Managing failure expectations for
a set of failing HTTP tests.

  • platform/wpe/TestExpectations:
4:08 AM Changeset in webkit [223754] by magomez@igalia.com
  • 4 edits in trunk

[GTK][WPE] Fix review comments on WEBPImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=178080

Reviewed by Said Abou-Hallawa.

Source/WebCore:

Properly free the demuxer in case of error, improve the code to detect the first
required frame to decode, fix the usage of the DecodingStatus and some styling
changes.

Covered by existent tests.

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::webpFrameAtIndex):
(WebCore::WEBPImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::WEBPImageDecoder::decode):
(WebCore::WEBPImageDecoder::decodeFrame):
(WebCore::WEBPImageDecoder::initFrameBuffer):
(WebCore::WEBPImageDecoder::clearFrameBufferCache):

LayoutTests:

Adjusted test duration.

  • fast/images/animated-webp.html:
2:23 AM Changeset in webkit [223753] by zandobersek@gmail.com
  • 11 edits in trunk/LayoutTests

Unreviewed WPE gardening. Rebaselining CSS tests that were affected
by recent font changes.

  • platform/wpe/css1/font_properties/font-expected.txt:
  • platform/wpe/css1/pseudo/firstline-expected.txt:
  • platform/wpe/css1/pseudo/multiple_pseudo_elements-expected.txt:
  • platform/wpe/css2.1/t051201-c23-first-line-00-b-expected.txt:
  • platform/wpe/css2.1/t051202-c26-psudo-nest-00-c-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-00-b-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-06-b-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-07-b-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-10-c-expected.txt:
2:22 AM Changeset in webkit [223752] by commit-queue@webkit.org
  • 26 edits in trunk/Source

[Curl] Clean up old style code in old curl files.
https://bugs.webkit.org/show_bug.cgi?id=178569

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-20
Reviewed by Ryosuke Niwa.

Source/WebCore:

  • platform/network/curl/AuthenticationChallenge.h:
  • platform/network/curl/CertificateInfo.h:
  • platform/network/curl/CookieJarCurl.h:
  • platform/network/curl/CurlCacheEntry.h:
  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::singleton):
(WebCore::CurlCacheManager::getInstance): Deleted.

  • platform/network/curl/CurlCacheManager.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlContext::singleton):

  • platform/network/curl/CurlContext.h:

(WebCore::CurlContext::singleton): Deleted.

  • platform/network/curl/CurlJobManager.cpp:

(WebCore::CurlJobManager::singleton):

  • platform/network/curl/CurlJobManager.h:

(WebCore::CurlJobManager::singleton): Deleted.

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/CurlRequestDelegate.h:
  • platform/network/curl/CurlResponse.h:

(WebCore::CurlResponse::isolatedCopy const):

  • platform/network/curl/CurlSSLHandle.h:
  • platform/network/curl/CurlSSLVerifier.h:
  • platform/network/curl/DownloadBundle.h:
  • platform/network/curl/MultipartHandle.h:
  • platform/network/curl/ResourceError.h:
  • platform/network/curl/ResourceHandleCurlDelegate.cpp:

(WebCore::ResourceHandleCurlDelegate::createCurlRequest):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveBuffer):
(WebCore::ResourceHandleCurlDelegate::curlDidComplete):
(WebCore::ResourceHandleCurlDelegate::curlDidFailWithError):

  • platform/network/curl/ResourceRequest.h:

(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
(WebCore::ResourceRequest::cfURLRequest const):
(WebCore::ResourceRequest::httpPipeliningEnabled):
(WebCore::ResourceRequest::setHTTPPipeliningEnabled):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceHTTPBody):
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):

  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::isAppendableHeader):
(WebCore::ResourceResponse::ResourceResponse):

Source/WebKitLegacy/win:

  • WebCache.cpp:

(WebCache::cacheFolder):
(WebCache::setCacheFolder):

  • WebView.cpp:

(WebView::setCacheModel):

2:02 AM Changeset in webkit [223751] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, follow up to reflect comments
https://bugs.webkit.org/show_bug.cgi?id=178340

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::notifyCompleted):

1:59 AM Changeset in webkit [223750] by Yusuke Suzuki
  • 3 edits in trunk/LayoutTests

Unreviewed, fix changed line number in test expect files
https://bugs.webkit.org/show_bug.cgi?id=178340

  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
  • http/tests/security/module-no-mime-type-expected.txt:
1:30 AM Changeset in webkit [223749] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

RenderLayerCompositor: Move implementation of simple methods into the header file.
https://bugs.webkit.org/show_bug.cgi?id=178514

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-20
Reviewed by Darin Adler.

No new tests, behavior unchanged.

1:29 AM Changeset in webkit [223748] by Antti Koivisto
  • 10 edits in trunk

Support ::before/::after pseudo elements on elements with display:contents
https://bugs.webkit.org/show_bug.cgi?id=178513

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt:

Source/WebCore:

Add support for

div { display:contents }
div::after { content:'foo' }

That is support non-box generating elements with generated content.

  • style/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::nextSiblingRenderer const):

Implement full pseudo-inclusive traversal starting from any element (including pseudo)
to locate the next rendering sibling. In case of display:content this may need to look
into descendants.

  • style/RenderTreeUpdater.cpp:

(WebCore::textRendererIsNeeded):

RenderTreePosition::nextSiblingRenderer can no longer be called with a node that already has a renderer.
Maintain the existing behavior.

  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):

Don't require for host to have a renderer.

  • style/RenderTreeUpdaterGeneratedContent.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolvePseudoStyle):

LayoutTests:

  • TestExpectations: Enable imported/w3c/web-platform-tests/css/css-display-3/display-contents-before-after-001.html
12:50 AM Changeset in webkit [223747] by keith_miller@apple.com
  • 5 edits in trunk/Source/WebCore

Move common bindings files to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178561

Rubber-stamped by Ryosuke Niwa.

This patch moves most of the common bindings files to unified sources.

Additionally, it adds a change to make_names to unique a struct
name that caused name conflicts that I missed when I made the
source changes before.

Lastly, add missing reference to WebCoreJSBuiltins.cpp in CMake build.

No new behavior no tests.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/make_names.pl:

(printFactoryCppFile):

12:50 AM Changeset in webkit [223746] by sbarati@apple.com
  • 34 edits in trunk/Source

Optimize accesses to how we get the direct prototype
https://bugs.webkit.org/show_bug.cgi?id=178548

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

This patch makes JSObject::getPrototypeDirect take VM& as a parameter
so it can use the faster version of the structure accessor function.
The reason for making this change is that JSObjet::getPrototypeDirect
is called on the hot path in property lookup.

  • API/JSObjectRef.cpp:

(JSObjectGetPrototype):

  • jsc.cpp:

(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::slowCall):
(WTF::DOMJITGetterBaseJSObject::customGetter):
(functionCreateProxy):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/JSArray.cpp:

(JSC::JSArray::isIteratorProtocolFastAndNonObservable):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::lastInPrototypeChain):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::finishCreation):

  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnPropertySlot):

  • runtime/JSMap.cpp:

(JSC::JSMap::isIteratorProtocolFastAndNonObservable):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::getPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::anyObjectInChainMayInterceptIndexedAccesses const):
(JSC::JSObject::prototypeChainMayInterceptStoreTo):

  • runtime/JSObject.h:

(JSC::JSObject::finishCreation):
(JSC::JSObject::getPrototypeDirect const):
(JSC::JSObject::getPrototype):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/JSSet.cpp:

(JSC::JSSet::isIteratorProtocolFastAndNonObservable):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/StructureInlines.h:

(JSC::Structure::isValid const):

Source/WebCore:

No new tests: no functionality change.

  • bindings/js/JSDOMAbstractOperations.h:

(WebCore::isVisibleNamedProperty):
(WebCore::accessVisibleNamedProperty):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::toJSDOMWindow):

  • bindings/js/JSDOMWindowProperties.cpp:

(WebCore::JSDOMWindowProperties::getOwnPropertySlot):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementCustomGetOwnPropertySlot):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut):
(GeneratePutByIndex):
(GenerateConstructorHelperMethods):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::JSTestGlobalObjectConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::put):
(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:

(WebCore::JSTestNamedAndIndexedSetterThrowingException::put):
(WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::put):
(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedSetterNoIdentifier::put):
(WebCore::JSTestNamedSetterNoIdentifier::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:

(WebCore::JSTestNamedSetterThrowingException::put):
(WebCore::JSTestNamedSetterThrowingException::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedSetterWithIdentifier::put):
(WebCore::JSTestNamedSetterWithIdentifier::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetter::put):
(WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::put):
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:

(WebCore::JSTestNamedSetterWithUnforgableProperties::put):
(WebCore::JSTestNamedSetterWithUnforgableProperties::putByIndex):

12:35 AM Changeset in webkit [223745] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[ARM64] static_cast<int32_t>() in BinaryOpNode::emitBytecode() prevents op_unsigned emission
https://bugs.webkit.org/show_bug.cgi?id=178379

Reviewed by Saam Barati.

We reuse jsNumber's checking mechanism here to precisely check the generated number is within uint32_t
in bytecode compiler. This is reasonable since the NumberNode will generate the exact this JSValue.

  • bytecompiler/NodesCodegen.cpp:

(JSC::BinaryOpNode::emitBytecode):

12:19 AM Changeset in webkit [223744] by Yusuke Suzuki
  • 18 edits in trunk

[JSC] ScriptFetcher should be notified directly from module pipeline
https://bugs.webkit.org/show_bug.cgi?id=178340

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Previously, we use JSStdFunction to let WebCore inform the module pipeline results.
We setup JSStdFunction to the resulted promise of the module pipeline. It is super
ad-hoc since JSStdFunction's lambda need extra-careful to make it non-cyclic-referenced.
JSStdFunction's lambda can capture variables, but they are not able to be marked by GC.

But now, we have ScriptFetcher. It is introduced after we implemented the module pipeline
notification mechanism by using JSStdFunction. But it is appropriate one to receive notification
from the module pipeline by observer style.

This patch removes the above ad-hoc JSStdFunction use. And now ScriptFetcher receives
completion/failure notifications from the module pipeline.

  • builtins/ModuleLoaderPrototype.js:

(loadModule):
(loadAndEvaluateModule):

  • runtime/Completion.cpp:

(JSC::loadModule):

  • runtime/Completion.h:
  • runtime/JSModuleLoader.cpp:

(JSC::jsValueToModuleKey):
(JSC::JSModuleLoader::notifyCompleted):
(JSC::JSModuleLoader::notifyFailed):

  • runtime/JSModuleLoader.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeNotifyCompleted):
(JSC::moduleLoaderPrototypeNotifyFailed):

  • runtime/ScriptFetcher.h:

(JSC::ScriptFetcher::notifyLoadCompleted):
(JSC::ScriptFetcher::notifyLoadFailed):

Source/WebCore:

No behavior change.

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::loadModule):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::jsValueToModuleKey): Deleted.
(WebCore::ScriptController::setupModuleScriptHandlers): Deleted.

  • bindings/js/ScriptController.h:
  • dom/LoadableModuleScript.cpp:

(WebCore::LoadableModuleScript::notifyLoadFailed):

  • dom/LoadableModuleScript.h:

LayoutTests:

  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
  • http/tests/security/module-no-mime-type-expected.txt:
  • js/dom/modules/module-execution-error-should-be-propagated-to-onerror-expected.txt:
Note: See TracTimeline for information about the timeline view.