Timeline



Apr 27, 2017:

11:30 PM Changeset in webkit [215922] by Carlos Garcia Campos
  • 42 edits
    2 moves in trunk

Move UUID from WebCore/platform to WTF
https://bugs.webkit.org/show_bug.cgi?id=171372

Reviewed by Michael Catanzaro.

Source/WebCore:

UUID only contains createCanonicalUUIDString() that is platform independent and doesn't depend on anything from
WebCore, only from WTF.

  • CMakeLists.txt:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
  • Modules/mediacontrols/MediaControlsHost.cpp:
  • Modules/mediastream/RTCPeerConnection.cpp:
  • Modules/webaudio/MediaStreamAudioSource.cpp:
  • Modules/webdatabase/DatabaseTracker.cpp:
  • WebCore.order:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/mac/EditorMac.mm:
  • fileapi/BlobURL.cpp:
  • loader/appcache/ApplicationCacheHost.cpp:
  • loader/appcache/ApplicationCacheStorage.cpp:
  • platform/URL.cpp:
  • platform/glib/FileSystemGlib.cpp:
  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
  • platform/mediastream/CaptureDeviceManager.cpp:
  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:
  • platform/mediastream/RealtimeMediaSource.cpp:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
  • platform/mock/MockRealtimeAudioSource.cpp:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:
  • testing/MockCDMFactory.cpp:

Source/WebKit2:

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::handleForWebPageProxy):
(WebKit::WebAutomationSession::handleForWebFrameID):

  • UIProcess/gtk/WaylandCompositor.cpp:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::createUUID):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::openWithNativeApplication):

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/UUID.cpp: Renamed from Source/WebCore/platform/UUID.cpp.
  • wtf/UUID.h: Renamed from Source/WebCore/platform/UUID.h.

Tools:

  • WebKitTestRunner/TestController.cpp:
11:00 PM Changeset in webkit [215921] by commit-queue@webkit.org
  • 6 edits in trunk

[INTL] Implement the caseFirst option for Intl.Collator
https://bugs.webkit.org/show_bug.cgi?id=158188

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-27
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Implements the caseFirst option and unicode locale extension.
The caseFirst option explicitly determines whether upper or lower case comes first.

  • runtime/IntlCollator.cpp:

(JSC::sortLocaleData): Added kf data.
(JSC::searchLocaleData): Added kf data.
(JSC::IntlCollator::initializeCollator): Set caseFirst option.
(JSC::IntlCollator::createCollator): Set new attributes on ICU collator.
(JSC::IntlCollator::caseFirstString): Added.
(JSC::IntlCollator::resolvedOptions): Added caseFirst property.

  • runtime/IntlCollator.h:

LayoutTests:

Updates the Intl.Collator tests to check caseFirst support.
The caseFirst option or unicode locale extension lets the user explicitly
set if lower or upper case characters should be first in order.

  • js/intl-collator-expected.txt:
  • js/script-tests/intl-collator.js:

(testCollator):

10:20 PM Changeset in webkit [215920] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add new GTK+ icons for different Script Timeline Views (Events and Call Trees)
https://bugs.webkit.org/show_bug.cgi?id=155077

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Joseph Pecoraro.

  • UserInterface/Images/gtk/CallTrees.svg: Added.
  • UserInterface/Images/gtk/Events.svg: Added.
  • UserInterface/Views/PathComponentIcons.css:

(body:not(.mac-platform, .windows-platform) .heap-snapshot-record .icon,):
(body:not(.mac-platform, .windows-platform) .events-icon .icon,): Deleted.

9:15 PM Changeset in webkit [215919] by mark.lam@apple.com
  • 8 edits
    1 add in trunk

Fix some RELEASE_ASSERT failures caused by OutOfMemoryErrors.
https://bugs.webkit.org/show_bug.cgi?id=171404
<rdar://problem/31876178>

Reviewed by Saam Barati.

JSTests:

  • stress/js-fixed-array-out-of-memory.js: Added.

Source/JavaScriptCore:

  1. Added some tryAllocate() functions in JSCellInlines.h.
  2. Consolidated the implementations of allocateCell() template functions into a single tryAllocateCellHelper() to reduce redundancy and eliminate needing to copy-paste for variations of allocateCell and tryAllocateCell.
  3. Changed JSFixedArray::createFromArray() and constructEmptyArray() to check for allocation failure and throw an OutOfMemoryError. It was already possible to throw errors from these functions for other reasons. So, their clients are already ready to handle OOMEs.
  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • runtime/JSCInlines.h:
  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::tryAllocateCellHelper):
(JSC::allocateCell):
(JSC::tryAllocateCell):

  • runtime/JSFixedArray.h:

(JSC::JSFixedArray::createFromArray):
(JSC::JSFixedArray::tryCreate):
(JSC::JSFixedArray::create): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::constructEmptyArray):

9:05 PM Changeset in webkit [215918] by achristensen@apple.com
  • 5 edits in trunk/Source/WebCore

Make navigation policy checking more robust
https://bugs.webkit.org/show_bug.cgi?id=171409
<rdar://problem/31489248>

Reviewed by Geoffrey Garen.

No change in behavior. Just added a protectedThis to a lambda and made the functions non-copyable.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

  • loader/PolicyCallback.cpp:

(WebCore::PolicyCallback::set):
(WebCore::PolicyCallback::clear): Deleted.

  • loader/PolicyCallback.h:
  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::cancelCheck):
(WebCore::PolicyChecker::stopCheck):
(WebCore::PolicyChecker::continueAfterNavigationPolicy):
(WebCore::PolicyChecker::continueAfterNewWindowPolicy):
(WebCore::PolicyChecker::continueAfterContentPolicy):

9:01 PM Changeset in webkit [215917] by Wenson Hsieh
  • 7 edits in trunk/Source/WebCore

Data interaction should not load pasteboard content before performing the data operation
https://bugs.webkit.org/show_bug.cgi?id=171414
<rdar://problem/31878197>

Reviewed by Tim Horton.

When interacting with a link, we should not try to fetch pasteboard contents for the URL UTI type before
performing the data operation. Teaches DragController to know whether it is allowed to load data from the
dragging pasteboard, and uses this information in DragController::dragOperation to determine whether to use
DragData::containsURLTypeIdentifier or DragData::containsURL.

  • page/DragController.cpp:

(WebCore::DragController::DragController):
(WebCore::DragController::performDragOperation):

  • page/DragController.h:

(WebCore::DragController::canLoadDataFromDraggingPasteboard):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::dragOperation):

  • platform/DragData.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):

  • platform/mac/DragDataMac.mm:

(WebCore::DragData::containsURLTypeIdentifier):

8:33 PM Changeset in webkit [215916] by Joseph Pecoraro
  • 106 edits
    1 copy
    21 adds in trunk

Support for promise rejection events (unhandledrejection)
https://bugs.webkit.org/show_bug.cgi?id=150358
<rdar://problem/28441651>

Reviewed by Saam Barati.

Patch by Joseph Pecoraro and Yusuke Suzuki.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/event_pause_noautoplay-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/event_play_noautoplay-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/paused_true_during_pause-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_adoption01-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt:
  • web-platform-tests/streams/piping/close-propagation-forward-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-backward-expected.txt:
  • web-platform-tests/streams/piping/error-propagation-forward-expected.txt:
  • web-platform-tests/streams/piping/flow-control-expected.txt:
  • web-platform-tests/streams/piping/general-expected.txt:
  • web-platform-tests/user-timing/measure_exceptions_navigation_timing-expected.txt:

Rebaseline expectations to include unhandled promise rejection messages.
Also change how the test harness reports success or failure to use the values
immediately on completion and then allow a run loop cycle before completing
the test to gather the output.

  • web-platform-tests/resource-timing/rt-resource-errors.html:

This is our own WPT test yet to be uploaded, so update the test to prevent
an unexpected unhandled rejection.

Source/JavaScriptCore:

Implement support for promise.PromiseIsHandled? and the
HostPromiseRejectionTracker hook for HTML to track promise rejections:
https://tc39.github.io/ecma262/#sec-host-promise-rejection-tracker
https://html.spec.whatwg.org/multipage/webappapis.html#unhandled-promise-rejections

  • builtins/BuiltinNames.h:

New private symbols.

  • builtins/PromiseOperations.js:

(globalPrivate.newHandledRejectedPromise):
Utility to create a rejected promise with PromiseIsHandled? to true.

(globalPrivate.rejectPromise):
(globalPrivate.initializePromise):

  • builtins/PromisePrototype.js:

(then):
Implement standard behavior of PromiseIsHandled? and the host hook.

  • runtime/JSPromise.cpp:

(JSC::JSPromise::isHandled):

  • runtime/JSPromise.h:

C++ accessors for the PromiseIsHandled? state.

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:

Expose private values for the Reject / Handle enum values in built-ins.

  • jsc.cpp:
  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::promiseResolveFunction):
Add a new GlobalObjectMethodTable hook matching the promise rejection hook.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncHostPromiseRejectionTracker):

  • runtime/JSGlobalObjectFunctions.h:

Plumb the builtin hook through to the optional GlobalObjectMethodTable hook.

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype.createFakeValueDescriptor):
Silence possible rejected promises created internally via Web Inspector.

Source/WebCore:

Implement support for the onunhandledrejection and rejectionhandled events.
They dispatch a new PromiseRejectionEvent using the ES6 HostPromiseRejectionTracker hook:
https://tc39.github.io/ecma262/#sec-host-promise-rejection-tracker
https://html.spec.whatwg.org/multipage/webappapis.html#unhandled-promise-rejections

This is currently implemented only for Documents and not yet Web Workers.

Tests: js/dom/unhandled-promise-rejection-basic.html

js/dom/unhandled-promise-rejection-bindings-type-error.html
js/dom/unhandled-promise-rejection-console-no-report.html
js/dom/unhandled-promise-rejection-console-report.html
js/dom/unhandled-promise-rejection-handle-during-event.html
js/dom/unhandled-promise-rejection-handle-in-handler.html
js/dom/unhandled-promise-rejection-handle.html
js/dom/unhandled-promise-rejection-order.html

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/DOMAllInOne.cpp:

New files.

  • bindings/scripts/CodeGenerator.pm:

(IsPromiseType):

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
(GetBaseIDLType):
Binding support for Promise<T> attributes.

  • bindings/js/JSDOMConvert.h:
  • bindings/js/JSDOMConvertPromise.h: Copied from Source/JavaScriptCore/runtime/JSPromise.h.

(WebCore::Converter<IDLPromise<T>>::convert):
(WebCore::JSConverter<IDLPromise<T>>::convert):
Promise<T> binding conversion is currently unimplemented, which only means
web developers creating their own PromiseRejectionEvent will not get
autowrapping of values assigned to promise in event initialization.
Engine generated events will have expected behavior.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::promiseRejectionTracker):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

Implement HostPromiseRejectionTracker hook for Document but not Worker.
Passes through to the ScriptExecutionContext's tracker.

  • bindings/js/JSMainThreadExecState.cpp:

(WebCore::JSMainThreadExecState::didLeaveScriptContext):

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::~JSMainThreadExecState):
When completing script execution and performing microtasks notify
about rejected promises. Technically this should go inside of
performing a microtask checkpoint, except lacking EventLoop
concepts we use ScriptExecutionState.

  • dom/EventNames.h:
  • dom/EventNames.in:
  • dom/PromiseRejectionEvent.cpp: Added.

(WebCore::PromiseRejectionEvent::PromiseRejectionEvent):
(WebCore::PromiseRejectionEvent::~PromiseRejectionEvent):

  • dom/PromiseRejectionEvent.h: Added.
  • dom/PromiseRejectionEvent.idl: Added.

New PromiseRejectionEvent event interface.

  • dom/GlobalEventHandlers.idl:

New onunhandledrejection and onrejectionhandled.

  • dom/RejectedPromiseTracker.cpp: Added.

(WebCore::RejectedPromise::RejectedPromise):
(WebCore::RejectedPromise::globalObject):
(WebCore::RejectedPromise::promise):
(WebCore::UnhandledPromise::UnhandledPromise):
(WebCore::UnhandledPromise::callStack):
(WebCore::RejectedPromiseTracker::RejectedPromiseTracker):
(WebCore::RejectedPromiseTracker::~RejectedPromiseTracker):
(WebCore::createScriptCallStackFromReason):
(WebCore::RejectedPromiseTracker::promiseRejected):
(WebCore::RejectedPromiseTracker::promiseHandled):
(WebCore::RejectedPromiseTracker::processQueueSoon):
(WebCore::RejectedPromiseTracker::reportUnhandledRejections):
(WebCore::RejectedPromiseTracker::reportRejectionHandled):

  • dom/RejectedPromiseTracker.h: Added.

Track and report rejected promises. The promises are tracked weakly
allowing them to be collected before they are reported. When reporting
we dispatch PromiseRejectionEvent events, and if the default is not
prevented we log a message to the console.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection):
(WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow):

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::ensureRejectedPromiseTracker):
Each ScriptExecutionContext can own a rejected promise tracker.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::pauseInternal):
https://html.spec.whatwg.org/multipage/embedded-content.html#internal-pause-steps
Internal pause steps say to timeupdate, pause, and rejecting pending play promises
should all happen in a queued task. Here the first two actions are already scheduled
on tasks, but rejecting play promises was not being done in a task, so this makes
that change.

  • Modules/streams/ReadableStream.js:

(pipeThrough):

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamReaderGenericInitialize):
(readableStreamError):
(readableStreamReaderGenericRelease):
Satisfy parts of the Streams specification which state to set the
PromiseIsHandled? internal state of promises created internally
by the Streams APIs. This prevents some internal promises from
appearing as unhandled promise rejections.

LayoutTests:

  • js/dom/unhandled-promise-rejection-basic-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-basic.html: Added.
  • js/dom/unhandled-promise-rejection-bindings-type-error-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-bindings-type-error.html: Added.
  • js/dom/unhandled-promise-rejection-console-no-report-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-console-no-report.html: Added.
  • js/dom/unhandled-promise-rejection-console-report-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-console-report.html: Added.
  • js/dom/unhandled-promise-rejection-handle-during-event-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-handle-during-event.html: Added.
  • js/dom/unhandled-promise-rejection-handle-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-handle-in-handler-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-handle-in-handler.html: Added.
  • js/dom/unhandled-promise-rejection-handle.html: Added.
  • js/dom/unhandled-promise-rejection-order-expected.txt: Added.
  • js/dom/unhandled-promise-rejection-order.html: Added.

New tests specific to the onunhandledrejection and onrejectionhandled events.

  • resources/testharnessreport.js:

(self.testRunner.add_completion_callback.sanitize):
(self.testRunner.add_completion_callback):
Report results immediately and then finish the test after a turn. This way
if the test ends with a pass, but may get unhandled rejections after
completing which should not make the test appear as if it failed. Some tests
have unhandled promise rejections but are expected to pass. Likewise some
tests perform cleanup in their own completion callbacks, which happen after
this initial completion callback, and we want to report results after all
the work is done as it may eliminate non-deterministic debug test output.

Mark some tests as flakey that have sometimes have unhandled promise rejections.
These tests are all various imported tests that use the testharness.

  • fast/mediastream/MediaStream-MediaElement-setObject-null-expected.txt:
  • http/tests/security/video-cross-origin-caching-expected.txt:
  • inspector/debugger/break-on-exception-throw-in-promise-expected.txt:
  • inspector/debugger/break-on-uncaught-exception-throw-in-promise-expected.txt:
  • inspector/worker/resources-in-worker-expected.txt:
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • js/promises-tests/promises-tests-2-2-6-expected.txt:
  • platform/mac/inspector/model/remote-object-expected.txt:
  • webrtc/libwebrtc/release-while-creating-offer-expected.txt:
  • webrtc/libwebrtc/release-while-setting-local-description-expected.txt:

Update tests with unhandled promise rejection messages.

  • media/W3C/audio/events/event_pause_manual.html:
  • media/audio-playback-restriction-play-expected.txt:
  • media/audio-playback-restriction-play.html:
  • media/click-volume-bar-not-pausing.html:
  • media/remote-control-command-is-user-gesture-expected.txt:
  • media/remote-control-command-is-user-gesture.html:
  • media/track/track-mode.html:
  • media/video-autoplay-allowed-but-fullscreen-required.html:
  • media/video-display-none-crash.html:
  • media/video-main-content-deny-display-none.html:
  • media/video-main-content-deny-not-in-dom.html:
  • media/video-main-content-deny-not-visible.html:
  • media/video-main-content-deny-obscured.html:
  • media/video-main-content-deny-too-small.html:
  • media/video-multiple-concurrent-playback-expected.txt:
  • media/video-play-audio-require-user-gesture-expected.txt:
  • media/video-play-audio-require-user-gesture.html:
  • media/video-play-pause-events-expected.txt:
  • media/video-play-pause-events.html:
  • media/video-play-pause-exception-expected.txt:
  • media/video-play-pause-exception.html:
  • media/video-play-require-user-gesture-expected.txt:
  • media/video-play-require-user-gesture.html:
  • media/video-preload-expected.txt:
  • media/video-preload.html:
  • media/video-test.js:

(handlePromise.handle):
Snuff many possible unhandled promise rejections in media via media.play().

  • streams/reference-implementation/pipe-to-expected.txt:
  • streams/reference-implementation/pipe-to-options-expected.txt:
  • streams/reference-implementation/readable-stream-templated-expected.txt:
  • streams/reference-implementation/writable-stream-abort-expected.txt:
  • streams/reference-implementation/writable-stream-expected.txt:

These stream tests are out of date and produce unhandled rejections.

  • streams/shadowing-Promise.html:

Update non-imported tests to prevent unhandled rejection messages.

7:07 PM Changeset in webkit [215915] by Nikita Vasilyev
  • 2 edits
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: Remove unused ToggleControlToolbarItem.js
https://bugs.webkit.org/show_bug.cgi?id=171401

Reviewed by Joseph Pecoraro.

  • UserInterface/Main.html:
  • UserInterface/Views/ToggleControlToolbarItem.js: Removed.
6:53 PM Changeset in webkit [215914] by Chris Dumez
  • 39 edits
    2 adds in trunk

Align colspan/rowspan limits with the latest HTML specification
https://bugs.webkit.org/show_bug.cgi?id=171322

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Re-sync some web-platform-tests from upstream to gain test coverage and
rebaseline.

  • resources/import-expectations.json:
  • web-platform-tests/html/dom/elements-tabular.js:
  • web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • web-platform-tests/html/dom/reflection-tabular-expected.txt:
  • web-platform-tests/html/dom/reflection.js:

(ReflectionTests.typeMap.string_appeared_here.toString):
(ReflectionTests.typeMap.string_appeared_here.valueOf):
(ReflectionTests.reflects):

  • web-platform-tests/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/processing-model-1/span-limits-expected.txt: Added.
  • web-platform-tests/html/semantics/tabular-data/processing-model-1/span-limits.html: Added.
  • web-platform-tests/html/semantics/tabular-data/processing-model-1/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/the-caption-element/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/the-table-element/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/the-tbody-element/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/the-tfoot-element/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/the-thead-element/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/the-tr-element/w3c-import.log:
  • web-platform-tests/html/semantics/tabular-data/w3c-import.log:

Source/WebCore:

Align colspan/rowspan limits with the latest HTML specification after:

The following changes were made:

  • Our rowspan limit was raised from 8190 to 65534
  • A colspan limit of 1000 was introduced. Blink has UseCounter data showing that colspans over 1000 are extremely rare and Gecko has data showing that when we get a colspan greater than 1000, it is usually a bug. Therefore, this change should be fine.
  • The limits are now properly reflected via the IDL attributes instead of lying to the Web about the colspan / rowspan we are using internally.

Test: imported/w3c/web-platform-tests/html/semantics/tabular-data/processing-model-1/span-limits.html

  • html/HTMLTableCellElement.cpp:

(WebCore::HTMLTableCellElement::colSpan):
(WebCore::HTMLTableCellElement::rowSpan):
(WebCore::HTMLTableCellElement::rowSpanForBindings):
(WebCore::HTMLTableCellElement::setColSpan):

  • html/HTMLTableCellElement.h:
  • html/HTMLTableCellElement.idl:
  • html/parser/HTMLParserIdioms.cpp:

(WebCore::parseHTMLIntegerInternal):
(WebCore::parseHTMLInteger):
(WebCore::parseHTMLNonNegativeInteger):
(WebCore::parseValidHTMLNonNegativeIntegerInternal):
(WebCore::parseHTTPRefreshInternal):

  • html/parser/HTMLParserIdioms.h:

(WebCore::parseHTMLInteger):
(WebCore::parseHTMLNonNegativeInteger):

(WebCore::clampHTMLNonNegativeIntegerToRange):
Add utility function to implement:

Source/WebKit/mac:

ObjC bindings build fix.

  • DOM/DOMHTMLTableCellElement.mm:

(-[DOMHTMLTableCellElement colSpan]):
(-[DOMHTMLTableCellElement setColSpan:]):

Source/WebKit2:

GTK build fix.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:

(webkit_dom_html_table_cell_element_get_col_span):
(webkit_dom_html_table_cell_element_set_col_span):

LayoutTests:

Rebaseline a couple of rowspan tests now that our max limit has changed.

  • fast/table/giantRowspan2-expected.txt:
  • platform/ios/fast/table/giantRowspan-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • platform/mac/fast/table/giantRowspan-expected.txt:
6:32 PM Changeset in webkit [215913] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/mediacapturefromelement/CanvasCaptureMediaStream-2d-events.html as a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=170835

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-04-27

6:23 PM Changeset in webkit [215912] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Mark imported/blink/paint/deprecatedpaintlayer/non-self-painting-layer-overrides-visibility.html as a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=171406

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-04-27

  • platform/mac/TestExpectations:
5:57 PM Changeset in webkit [215911] by msaboff@apple.com
  • 2 edits in trunk/PerformanceTests

Add back tests inadvertently deleted in r205032.

Rubber stamped by Geoffrey Garen.

  • MallocBench/run-malloc-benchmarks:
5:54 PM Changeset in webkit [215910] by Wenson Hsieh
  • 5 edits in trunk/Source

WKUIDelegatePrivate needs a hook to vend data used to initialize item providers for data interaction
https://bugs.webkit.org/show_bug.cgi?id=171386
<rdar://problem/31557237>

Reviewed by Beth Dakin.

Source/WebCore:

Teach WebItemProviderPasteboard to remember what WebItemProviderRegistrationInfoList it was initialized with
when beginning a drag. This information is cleared out the next time the list of item providers is set to
something different, which happens when the data interaction session concludes.

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard setItemsUsingRegistrationInfoLists:]):
(-[WebItemProviderPasteboard registrationInfoAtIndex:]):
(-[WebItemProviderPasteboard itemProviderAtIndex:]):

Source/WebKit2:

Add a new WKUIDelegate hook, _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
5:37 PM Changeset in webkit [215909] by msaboff@apple.com
  • 5 edits in trunk/Source/bmalloc

bmalloc scavenger should know what page classes are allocating
https://bugs.webkit.org/show_bug.cgi?id=171384

Reviewed by Geoffrey Garen.

This change replaces m_isAllocatingPages with a per page class flag to track which page
classes are currently allocating. When scavenging, we skip page classes that are actively
allocating and come back to them on a subsequent pass. This reduces the amount of time it
takes for scavenger to free up pages as well as the total time it takes to handle all
page classes.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeSmallPages):
(bmalloc::Heap::scavengeLargeObjects):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::deallocateLarge):

  • bmalloc/Heap.h:

(bmalloc::Heap::takeRequestedScavengerThreadQOSClass): Deleted.

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::deallocateSmallPage):

  • bmalloc/bmalloc.h:

(bmalloc::api::scavenge):

4:52 PM Changeset in webkit [215908] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

B3::FoldPathConstants does not consider the fall through case for Switch
https://bugs.webkit.org/show_bug.cgi?id=171390

Reviewed by Filip Pizlo.

foldPathConstants was not taking into account a Switch's default
case when it tried to constant propagate the switch's operand value.
e.g, we incorrectly transformed this code:

`
x = argumentGPR0;
switch (x) {
case 10: return 20;

case 0:
default: return x == 0;
}
`

into:
`
x = argumentGPR0;
switch (x) {
case 10: return 20;

case 0:
default: return 1;
}
`

Because we didn't take into account the default case, we incorrectly
optimized the code as if case 0's block was only reachable if x is
equal to zero. This is obviously not true, since it's the same block
as the default case.

This fix ensures that we can run the WebAssembly Tanks demo even when
we set webAssemblyBBQOptimizationLevel=2.

  • b3/B3FoldPathConstants.cpp:
  • b3/B3SwitchValue.cpp:

(JSC::B3::SwitchValue::fallThrough):
(JSC::B3::SwitchValue::removeCase): Deleted.

  • b3/B3SwitchValue.h:
  • b3/testb3.cpp:

(JSC::B3::testCallFunctionWithHellaArguments):
(JSC::B3::testSwitchSameCaseAsDefault):
(JSC::B3::testWasmBoundsCheck):
(JSC::B3::run):

4:48 PM Changeset in webkit [215907] by beidson@apple.com
  • 9 edits
    1 add in trunk/Source

Refactor SessionID to support multiple non-ephemeral (persistent) sessions.
https://bugs.webkit.org/show_bug.cgi?id=171367

Reviewed by Andy Estes.

Source/WebCore:

This is also a nice general cleanup of SessionID, including privatizing the "arbitrary number" constructor
and moving encode/decode into the class.

No new tests (Refactor, no behavior change yet).

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/SessionID.cpp: Added.

(WebCore::SessionID::generatePersistentSessionID):
(WebCore::SessionID::generateEphemeralSessionID):
(WebCore::SessionID::enableGenerationProtection):

  • page/SessionID.h:

(WebCore::SessionID::SessionID):
(WebCore::SessionID::emptySessionID):
(WebCore::SessionID::hashTableDeletedValue):
(WebCore::SessionID::defaultSessionID):
(WebCore::SessionID::legacyPrivateSessionID):
(WebCore::SessionID::isValid):
(WebCore::SessionID::isEphemeral):
(WebCore::SessionID::encode):
(WebCore::SessionID::decode):
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):

Source/WebKit2:

  • Shared/ChildProcess.cpp:

(WebKit::ChildProcess::initialize): Child processes should never be generating new SessionIDs,

so enable generation protection.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<SessionID>::encode): Deleted.
(IPC::ArgumentCoder<SessionID>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::generateNonPersistentSessionID): Deleted.

4:44 PM Changeset in webkit [215906] by BJ Burg
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: inherit system layout direction by default
https://bugs.webkit.org/show_bug.cgi?id=171402
<rdar://problem/30753626>

Reviewed by Joseph Pecoraro.

Web Inspector's layout direction should follow the system layout direction
by default now that most RTL bugs seem to be fixed. We are ready for more
feedback.

  • UserInterface/Base/Main.js:
  • UserInterface/Base/Setting.js:

Rename the existing "layout-direction" setting so that the new default
value is set properly even for people who have overridden the layout
direction while the setting was exposed to everyone.

  • UserInterface/Views/GeneralSettingsView.js:

(WebInspector.GeneralSettingsView.prototype.initialLayout):
(WebInspector.GeneralSettingsView.prototype.layout):
(WebInspector.GeneralSettingsView):
Make the layout direction override setting only visible when DebugUI
is turned on. This remains only for engineers to quickly check layout bugs.

  • UserInterface/Views/SettingsView.js:

(WebInspector.SettingsView.prototype.addGroupWithCustomSetting):
(WebInspector.SettingsView.prototype.addCustomSetting): Deleted.
Refactor the convenience method to return both the group and the
custom setting. This allows us to toggle .hidden on the entire
row for the Layout Direction setting (label and editor).

  • Localizations/en.lproj/localizedStrings.js:

Unlocalize the setting strings since they are only shown in engineering builds now.

4:36 PM Changeset in webkit [215905] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

Attempt to fix a PLT regression on Mac
<rdar://problem/31826998>

Unreviewed.

Disable passing the TypeIdentifierHint to CGImageSourceCreateIncremental()
on Mac for now.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::ImageDecoder):

4:24 PM Changeset in webkit [215904] by dbates@webkit.org
  • 7 edits in trunk/Source/WebCore

Rename callerDOMWindow()/CallerDocument to incumbentDOMWindow()/IncumbentDocument
https://bugs.webkit.org/show_bug.cgi?id=171145

Reviewed by Saam Barati.

Standardize on the terminology "incumbent" to refer to "most-recently-entered author
function or script on the stack, or the author function or script that originally
scheduled the currently-running callback" (1).

[1] <https://html.spec.whatwg.org/multipage/webappapis.html#realms-settings-objects-global-objects> (27 April 2017)

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::incumbentDOMWindow):
(WebCore::callerDOMWindow): Deleted.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgumentCaller):
(WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgumentCaller):

  • bindings/scripts/test/TestObj.idl:
  • page/DOMWindow.idl:
4:12 PM Changeset in webkit [215903] by BJ Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: fix alignment of "truncated call stack" message
https://bugs.webkit.org/show_bug.cgi?id=170477

Reviewed by Devin Rousso.

  • UserInterface/Views/ThreadTreeElement.css:

(.tree-outline > .item.thread + ol > .item.truncated-call-frames):
(body[dir=ltr] .tree-outline > .item.thread + ol > .item.truncated-call-frames):
(body[dir=rtl] .tree-outline > .item.thread + ol > .item.truncated-call-frames):
(.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
(body[dir=ltr] .tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
(body[dir=rtl] .tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):

4:09 PM Changeset in webkit [215902] by BJ Burg
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: RTL: layout issues in Open Resource Dialog
https://bugs.webkit.org/show_bug.cgi?id=170551

Reviewed by Matt Baker.

We need to flip the cancel and search icons, and flip padding
in the tree outline that contains search results.

I am still not happy with the title/subtitle ordering
(i.e., the domain vs the resource name), but this issue will
be solved primarily in the navigation sidebar first and then
adjusted for Open Resource Dialog if those changes are not
sufficient.

  • UserInterface/Views/OpenResourceDialog.css:

(.open-resource-dialog > .field):
(body[dir=ltr] .open-resource-dialog > .field):
(body[dir=rtl] .open-resource-dialog > .field):
(.open-resource-dialog > .field::before):
(body[dir=ltr] .open-resource-dialog > .field::before):
(body[dir=rtl] .open-resource-dialog > .field::before):
(.open-resource-dialog > .field > input):
(body[dir=ltr] .open-resource-dialog > .field > input):
(body[dir=rtl] .open-resource-dialog > .field > input):
(.open-resource-dialog > .field > img):
(body[dir=ltr] .open-resource-dialog > .field > img):
(body[dir=rtl] .open-resource-dialog > .field > img):
(.open-resource-dialog > .tree-outline .item):
(body[dir=ltr] .open-resource-dialog > .tree-outline .item):
(body[dir=rtl] .open-resource-dialog > .tree-outline .item):

3:58 PM Changeset in webkit [215901] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

LayoutTest webrtc/datachannel/datachannel-event.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=171092
<rdar://problem/31748066>

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

Covered by manual testing on iterating on the crashing tests.
With the patch, they appear to no longer crash.

The current RTCPeerConnection/RTCController was expecting that peer connections would be stopped before the controller.
This assumption is sometimes wrong.
Adding clean-up on both sides so that if controller goes away, it notifies its peer connections that they are unregistered.

  • Modules/mediastream/RTCController.cpp:

(WebCore::RTCController::~RTCController):

  • Modules/mediastream/RTCController.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::~RTCPeerConnection):
(WebCore::RTCPeerConnection::doStop):
(WebCore::RTCPeerConnection::registerToController):
(WebCore::RTCPeerConnection::unregisterFromController):
(WebCore::RTCPeerConnection::rtcController): Deleted.

  • Modules/mediastream/RTCPeerConnection.h:
3:57 PM Changeset in webkit [215900] by commit-queue@webkit.org
  • 13 edits in trunk/Source

REGRESSION(r213764): Async decoding of animated images is disabled for ImageDocument
https://bugs.webkit.org/show_bug.cgi?id=170333

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

Source/WebCore:

The way the image drawing settings are transfered from the Settings to
BitmapImage is problematic. The drawing settings are retrieved from the
CachedImageObserver which store them in the constructor only if the
CachedImage as a loader. In the case of ImageDocument, there isn't loader
set in CachedImage so the settings of ImageDocument are not set. Also
the CachedImage can be used after loading by another document which may
have a different drawing settings.

The fix is to make BitmapImage reads the drawing settings every time it
is drawn as a foreground or background image in a RenderElement.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawImage):

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):

  • loader/cache/CachedImage.h:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::setDrawingSettings):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages): I was
trying to disable the async image decoding temporarily but this way will
even prevent testing it until it is enabled. Disable it through WK1 and
WK2 preferences.
(WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImages):
(WebCore::BitmapImage::advanceAnimation):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageObserver.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

Source/WebKit/mac:

Disbale the async decoding for large images for now.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Disbale the async decoding for large images for now.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

3:45 PM Changeset in webkit [215899] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][macOS] Allow multi-touch related iokit-get-properties
https://bugs.webkit.org/show_bug.cgi?id=171355
<rdar://problem/31851928>

Reviewed by Alexey Proskuryakov.

During testing I've noticed Sandbox Violations being generated during some 'Force Touch' track pad use.
The sandbox should allow these IOKit properties to be accessed.

  • WebProcess/com.apple.WebProcess.sb.in:
3:39 PM Changeset in webkit [215898] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

WebAssembly: Don't tier up the same function twice
https://bugs.webkit.org/show_bug.cgi?id=171397

Reviewed by Filip Pizlo.

Because we don't CAS the tier up count on function entry/loop backedge and we use the least significant to indicate whether or not tier up has already started we could see the following:

Threads A and B are running count in memory is (0):

A: load tier up count (0)
B: load tier up count (0)
A: decrement count to -2 and see we need to check for tier up (0)
A: store -2 to count (-2)
A: exchangeOr(1) to tier up count (-1)
B: decrement count to -2 and see we need to check for tier up (-1)
B: store -2 to count (-2)
B: exchangeOr(1) to tier up count (-1)

This would cause us to tier up the same function twice, which we would rather avoid.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitTierUpCheck):

  • wasm/WasmTierUpCount.h:

(JSC::Wasm::TierUpCount::TierUpCount):
(JSC::Wasm::TierUpCount::loopDecrement):
(JSC::Wasm::TierUpCount::functionEntryDecrement):
(JSC::Wasm::TierUpCount::shouldStartTierUp):

3:37 PM Changeset in webkit [215897] by achristensen@apple.com
  • 10 edits in trunk

Add stub SPI for setting cookie storage path on _WKWebsiteDataStoreConfiguration
https://bugs.webkit.org/show_bug.cgi?id=171399

Reviewed by Brady Eidson.

Source/WebKit2:

This SPI isn't hooked up yet, but it has a test that will need to be updated once it works.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _initWithConfiguration:]):

  • UIProcess/API/Cocoa/_WKDraggableElementInfo.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration _cookieStorageDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setCookieStorageDirectory:]):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::resolvedCookieStorageDirectory):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.html:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

3:37 PM Changeset in webkit [215896] by keith_miller@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

REGRESSION (r215843): ASSERTION FAILED: !m_completionTasks[0].first in JSC::Wasm::Plan::tryRemoveVMAndCancelIfLast(JSC::VM &)
https://bugs.webkit.org/show_bug.cgi?id=171380

Reviewed by JF Bastien.

This patch fixes the association of VMs to Wasm::Plans. For validation
we want all the completion tasks to be associate with a VM. For BBQ,
we want the main task to not be associated with any VM.

  • jsc.cpp:

(functionTestWasmModuleFunctions):

  • wasm/WasmBBQPlan.cpp:

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

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

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

  • wasm/WasmCodeBlock.h:

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

  • wasm/WasmModule.cpp:

(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::compileAsync):

  • wasm/WasmModule.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::OMGPlan):
(JSC::Wasm::runOMGPlanForIndex):

  • wasm/WasmOMGPlan.h:
  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::runCompletionTasks):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::tryRemoveVMAndCancelIfLast):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::dontFinalize):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyValidateFunc):

2:52 PM Changeset in webkit [215895] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Add missing expected file for fast/inline/simple-line-layout-16bit-content.html.
https://bugs.webkit.org/show_bug.cgi?id=171379

Unreviewed test gardening.

  • fast/inline/simple-line-layout-16bit-content-expected-mismatch.html: Added.
2:29 PM Changeset in webkit [215894] by ddkilzer@apple.com
  • 17 edits in trunk

Enhance shouldBe()/shouldNotBe() to accept anonymous function arguments
<https://webkit.org/b/171362>
<rdar://problem/31867686>

Reviewed by Joseph Pecoraro.

JSTests:

  • stress/resources/standalone-pre.js:

(shouldBe):
(shouldNotThrow):
(shouldThrow):

  • Update shouldBe() to accept anonymous function arguments. (The shouldNotBe() function was never copied over.)
  • Also fix shouldThrow()/shouldNotThrow() to accept anonymous function arguments (which were missed in r202609 for Bug 159232).

LayoutTests:

This change makes it possible to pass either the first or second
argument (or both) as anonymous functions into shouldBe() and
shouldNotBe() to make it easy to capture local variables when
writing tests. This is similar to the change in r202609 for Bug
159232 for shouldThrow() and shouldNotThrow().

Note that shouldBe()/shouldNotBe() from the following files were
NOT updated since they were imported from other projects and did
share the full WebKit history of resources/js-test-pre.js:

http/tests/webgl/1.0.2/resources/webgl_test_files/resources/js-test-pre.js
js/mozilla/resources/js-test-pre.js
webgl/1.0.2/resources/webgl_test_files/resources/js-test-pre.js
webgl/1.0.3/resources/webgl_test_files/resources/js-test-pre.js

However, these files WERE brought up-to-date with the ability to
pass anonymous functions into shouldBe()/shouldNotBe() for this
bug, and shouldThrow()/shouldNotThrow() which should have
originally been fixed with Bug 159232:

http/tests/resources/js-test-pre.js
resources/standalone-pre.js

  • css3/scroll-snap/resources/iframe-content.html: Drive-by fix

to debug message for copy-paste error. Found by searching
LayoutTests directory for "expects string arguments".

  • fast/canvas/webgl/array-unit-tests-expected.txt: Update test

results.

  • fast/canvas/webgl/array-unit-tests.html: Fix warning by making

second argument to shouldBe() a string.

  • fast/css/script-tests/image-set-parsing.js:

(testImageSetRule): Remove comment by changing second argument
to shouldBe() into an anonymous function.

  • http/tests/resources/js-test-pre.js:

(evalAndLog):
(evalAndLogResult):
(shouldBe):
(shouldNotBe):
(shouldEvaluateTo):

  • Made a full copy of resources/js-test-pre.js to bring this up to speed. Needs a checker written for it to keep them in sync.
  • http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
  • http/tests/security/xssAuditor/block-does-not-leak-referrer-expected.txt:
  • Update line numbers after updating http/tests/resources/js-test-pre.js.
  • js/function-declarations-in-switch-statement-expected.txt:
  • Update results after fixing warnings.
  • js/script-tests/function-declarations-in-switch-statement.js:
  • Fix warnings by passing in strings to shouldBe().
  • js/script-tests/stack-unwinding.js:
  • Update results after fixing warnings.
  • js/stack-unwinding-expected.txt:
  • Fix warnings by passing in strings to shouldBe().
  • resources/js-test-pre.js:

(shouldBe):
(shouldNotBe):

  • resources/js-test.js:

(shouldBe):
(shouldNotBe):

  • Update shouldBe()/shouldNotBe() to accept anonymous function arguments.
  • resources/standalone-pre.js:

(shouldBe):
(shouldNotBe):
(shouldNotThrow):
(shouldThrow):

  • Update shouldBe()/shouldNotBe() to accept anonymous function arguments.
  • Also fix shouldThrow()/shouldNotThrow() to accept anonymous function arguments (which were missed in r202609 for Bug 159232).
2:17 PM Changeset in webkit [215893] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Performing data interaction with plain text into a contenteditable does not insert any content
https://bugs.webkit.org/show_bug.cgi?id=171381

Reviewed by Tim Horton.

Attempt to read plain-text-conformant UTI types as kUTTypePlainText before reading them as kUTTypeText.
This allows WebItemProviderPasteboard to properly materialize an NSString in -valuesForPasteboardType:
inItemSet: using a pre-loaded NSData blob.

This scenario is covered by DataInteractionTests.ExternalSourceUTF8PlainTextOnly, but DataInteractionTests
are temporarily disabled due to incompatibilities with the current internal SDK.

  • platform/ios/PasteboardIOS.mm:

(WebCore::readPasteboardWebContentDataForType):

2:00 PM Changeset in webkit [215892] by Chris Dumez
  • 26 edits
    7 adds
    5 deletes in trunk

Element.getBoundingClientRect() / getClientRects() should return a DOMRect types
https://bugs.webkit.org/show_bug.cgi?id=171226

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add baseline for web-platform-tests that is now passing and unskipped.

  • web-platform-tests/cssom-view/cssom-getBoundingClientRect-002-expected.txt: Added.

Source/WebCore:

Element.getBoundingClientRect() / getClientRects() should return a DOMRect types
as per:

DOMRect is compatible with ClientRect, which we used to return so the risk should
be low.

Tests: fast/css/DOMRect-attributes-prototype.html

fast/css/DOMRect-serialization.html
fast/dom/Element/getClientRects-return-type.html

  • dom/ClientRectList.cpp:

(WebCore::ClientRectList::ClientRectList):

  • dom/ClientRectList.h:

(WebCore::ClientRectList::create):

  • dom/DOMRect.h:

(WebCore::DOMRect::create):

  • dom/DOMRectReadOnly.h:
  • dom/Element.cpp:

(WebCore::toDOMRectVector):
(WebCore::Element::getClientRects):
(WebCore::Element::getBoundingClientRect):

  • dom/Element.h:
  • dom/Element.idl:
  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::displayLastTextTrackCueBox):

Source/WebKit2:

GTK build fix.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:

(toClientRect):
(webkit_dom_element_get_bounding_client_rect):
(webkit_dom_element_get_client_rects):

LayoutTests:

Update existing tests to reflect behavior change.

  • TestExpectations:
  • css3/flexbox/align-absolute-child-expected.txt:
  • fast/css/ClientRect-attributes-prototype-expected.txt: Removed.
  • fast/css/ClientRect-attributes-prototype.html: Removed.
  • fast/css/ClientRect-serialization-expected.txt: Removed.
  • fast/css/ClientRect-serialization.html: Removed.
  • fast/css/DOMRect-attributes-prototype-expected.txt: Added.
  • fast/css/DOMRect-attributes-prototype.html: Added.
  • fast/css/DOMRect-serialization-expected.txt: Added.
  • fast/css/DOMRect-serialization.html: Added.
  • fast/dom/Element/getClientRects-return-type-expected.txt: Added.
  • fast/dom/Element/getClientRects-return-type.html: Added.
  • fast/dom/collection-iterators-expected.txt:
  • fast/dom/collection-iterators.html:
  • fast/visual-viewport/zoomed-fixed-expected.txt:
  • fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
  • fast/zooming/client-rect-in-fixed-zoomed-expected.txt:
  • fast/zooming/client-rect-in-fixed-zoomed.html:
  • js/resources/JSON-stringify.js:
1:58 PM Changeset in webkit [215891] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Restore some caching functionality that got accidentally removed when doing Wasm PIC patches
https://bugs.webkit.org/show_bug.cgi?id=171382

Reviewed by Keith Miller.

When I created Wasm::CodeBlock, I accidentally removed caching
the creation of JSWebAssemblyCodeBlocks. This patch restores it.
It's worth keeping JSWebAssemblyModule's JSWebAssemblyCodeBlock
cache because creating a JSWebAssemblyCodeBlock does non trivial
work by creating the various IC call stubs.

  • wasm/js/JSWebAssemblyCodeBlock.h:

(JSC::JSWebAssemblyCodeBlock::codeBlock):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::create):

  • wasm/js/JSWebAssemblyModule.h:
1:47 PM Changeset in webkit [215890] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/fullscreen-button/fullscreen-button.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171391

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:20 PM Changeset in webkit [215889] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/security/contentSecurityPolicy/source-list-parsing-05.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171389

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:14 PM Changeset in webkit [215888] by Ryan Haddad
  • 2 edits in trunk/Tools

Disable flaky API test WKWebView.SetOverrideContentSecurityPolicyWithEmptyStringForPageWithCSP.
https://bugs.webkit.org/show_bug.cgi?id=167914

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WebKit2Cocoa/OverrideContentSecurityPolicy.mm:

(TEST):

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

Mark http/tests/xmlhttprequest/workers/methods.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170181

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:38 PM Changeset in webkit [215886] by jdiggs@igalia.com
  • 10 edits in trunk

AX: Expose elements with the ARIA "feed" role
https://bugs.webkit.org/show_bug.cgi?id=171184

Reviewed by Chris Fleizach.

Source/WebCore:

Map elements with the "feed" role to the internal ApplicationGroupRole
AccessibilityRole. This prevents them from being unexpectedly pruned from
the accessibility tree, and causes them to be exposed with ATK_ROLE_PANEL
in WebKitGtk and AXGroup in Safari.

No new tests needed. Instead, add the "feed" role to roles-exposed.html,
xml-roles-exposed.html, and roles-computedRoleString.html.

  • accessibility/AccessibilityObject.cpp:

(WebCore::initializeRoleMap):

LayoutTests:

Add "feed" role to roles-exposed.html, xml-roles-exposed.html, and
roles-computedRoleString.html. Update expectations accordingly.

  • accessibility/gtk/xml-roles-exposed-expected.txt:
  • accessibility/gtk/xml-roles-exposed.html:
  • accessibility/roles-computedRoleString.html:
  • accessibility/roles-exposed.html:
  • platform/gtk/accessibility/roles-exposed-expected.txt:
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:
12:24 PM Changeset in webkit [215885] by mark.lam@apple.com
  • 21 edits
    5 adds in trunk/Source/JavaScriptCore

Audit and fix incorrect uses of JSArray::tryCreateForInitializationPrivate().
https://bugs.webkit.org/show_bug.cgi?id=171344
<rdar://problem/31352667>

Reviewed by Filip Pizlo.

JSArray::tryCreateForInitializationPrivate() should only be used in performance
critical paths, and should always be used with care because it creates an
uninitialized object that needs to be initialized by its client before the object
can be released into the system. Before the object is fully initialized:

  1. the client should not re-enter the VM to execute JS code, and
  2. GC should not run.

This is because until the object is fully initialized, it is an inconsistent
state that the GC and JS code will not be happy about.

In this patch, we do the following:

  1. Renamed JSArray::tryCreateForInitializationPrivate() to JSArray::tryCreateUninitializedRestricted() because "private" is a bit ambiguous and can be confused with APIs that are called freely within WebKit but are not meant for clients of WebKit. In this case, we intend for use of this API to be restricted to only a few carefully considered and crafted cases.
  1. Introduce the ObjectInitializationScope RAII object which covers the period when the uninitialized object is created and gets initialized.

ObjectInitializationScope will asserts that either the object is created
fully initialized (in the case where the object structure is not an "original"
structure) or if created uninitialized, is fully initialized at the end of
the scope.

If the object is created uninitialized, the ObjectInitializationScope also
ensures that we do not GC nor re-enter the VM to execute JS code. This is
achieved by enabling DisallowGC and DisallowVMReentry scopes.

tryCreateUninitializedRestricted() and initializeIndex() now requires an
ObjectInitializationScope instance. The ObjectInitializationScope replaces
the VM& argument because it can be used to pass the VM& itself. This is a
small optimization that makes passing the ObjectInitializationScope free even
on release builds.

  1. Factored a DisallowScope out of DisallowGC, and make DisallowGC extend it. Introduce a DisallowVMReentry class that extends DisallowScope.
  1. Fixed a bug found by the ObjectInitializationScope. The bug is that there are scenarios where the structure passed to tryCreateUninitializedRestricted() that may not be an "original" structure. As a result, initializeIndex() would end up allocating new structures, and therefore trigger a GC.

The fix is to detect that the structure passed to tryCreateUninitializedRestricted()
is not an "original" one, and pre-initialize the array with 0s.

This bug was detected by existing tests. Hence, no new test needed.

  1. Replaced all inappropriate uses of tryCreateUninitializedRestricted() with tryCreate(). Inappropriate uses here means code that is not in performance critical paths.

Similarly, replaced accompanying uses of initializeIndex() with putDirectIndex().

This patch is performance neutral (according to the JSC command line benchmarks).

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGOperations.cpp:
  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • heap/DeferGC.cpp:
  • heap/DeferGC.h:

(JSC::DisallowGC::DisallowGC):
(JSC::DisallowGC::initialize):
(JSC::DisallowGC::scopeReentryCount):
(JSC::DisallowGC::setScopeReentryCount):
(JSC::DisallowGC::~DisallowGC): Deleted.
(JSC::DisallowGC::isGCDisallowedOnCurrentThread): Deleted.

  • heap/GCDeferralContextInlines.h:

(JSC::GCDeferralContext::~GCDeferralContext):

  • heap/Heap.cpp:

(JSC::Heap::collectIfNecessaryOrDefer):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoPrivateFuncConcatMemcpy):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createWithInlineFrame):
(JSC::ClonedArguments::createByCopyingFrom):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/DisallowScope.h: Added.

(JSC::DisallowScope::DisallowScope):
(JSC::DisallowScope::~DisallowScope):
(JSC::DisallowScope::isInEffectOnCurrentThread):
(JSC::DisallowScope::enable):
(JSC::DisallowScope::enterScope):
(JSC::DisallowScope::exitScope):

  • runtime/DisallowVMReentry.cpp: Added.
  • runtime/DisallowVMReentry.h: Added.

(JSC::DisallowVMReentry::DisallowVMReentry):
(JSC::DisallowVMReentry::initialize):
(JSC::DisallowVMReentry::scopeReentryCount):
(JSC::DisallowVMReentry::setScopeReentryCount):

  • runtime/InitializeThreading.cpp:

(JSC::initializeThreading):

  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitializedRestricted):
(JSC::JSArray::fastSlice):
(JSC::JSArray::tryCreateForInitializationPrivate): Deleted.

  • runtime/JSArray.h:

(JSC::JSArray::tryCreateUninitializedRestricted):
(JSC::JSArray::tryCreate):
(JSC::constructArray):
(JSC::constructArrayNegativeIndexed):
(JSC::JSArray::tryCreateForInitializationPrivate): Deleted.
(JSC::createArrayButterfly): Deleted.

  • runtime/JSCellInlines.h:

(JSC::allocateCell):

  • runtime/JSObject.h:

(JSC::JSObject::initializeIndex):
(JSC::JSObject::initializeIndexWithoutBarrier):

  • runtime/ObjectInitializationScope.cpp: Added.

(JSC::ObjectInitializationScope::ObjectInitializationScope):
(JSC::ObjectInitializationScope::~ObjectInitializationScope):
(JSC::ObjectInitializationScope::notifyAllocated):
(JSC::ObjectInitializationScope::verifyPropertiesAreInitialized):

  • runtime/ObjectInitializationScope.h: Added.

(JSC::ObjectInitializationScope::ObjectInitializationScope):
(JSC::ObjectInitializationScope::vm):
(JSC::ObjectInitializationScope::notifyAllocated):

  • runtime/Operations.h:

(JSC::isScribbledValue):
(JSC::scribble):

  • runtime/RegExpMatchesArray.cpp:

(JSC::createEmptyRegExpMatchesArray):

  • runtime/RegExpMatchesArray.h:

(JSC::tryCreateUninitializedRegExpMatchesArray):
(JSC::createRegExpMatchesArray):

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):

12:08 PM Changeset in webkit [215884] by mmaxfield@apple.com
  • 5 edits in trunk/LayoutTests

REGRESSION(r214572): Update fast/text/variations/advances.html to understand normalized variation widths
https://bugs.webkit.org/show_bug.cgi?id=171356
<rdar://problem/28670085>

Reviewed by Dean Jackson.

Unspecified 'wdth' axis values are being normalized because the font is a GX font. However, this
font assumes no normalization, which means one of the comparisons in the test is bogus.

  • fast/text/variations/advances-expected.txt:
  • fast/text/variations/advances.html:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
11:40 AM Changeset in webkit [215883] by beidson@apple.com
  • 9 edits in trunk/Source

Update NetworkStorageSession to support multiple persistent sessions and explicitly set cookie storages.
https://bugs.webkit.org/show_bug.cgi?id=171365

Reviewed by Andy Estes.

Source/WebCore:

No new tests (No testable behavior change yet).

  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::destroySession):

  • platform/network/NetworkStorageSession.h:
  • platform/network/NetworkStorageSessionStub.cpp:

(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::ensureSession):

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::createCFStorageSessionForIdentifier):
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::ensureSession):
(WebCore::NetworkStorageSession::cookieStorage):

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::ensureSession):

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

11:11 AM Changeset in webkit [215882] by Antti Koivisto
  • 2 edits in trunk/LayoutTests

Skip css3/viewport-percentage-lengths/vh-auto-size.html on WK1.

Looks like use of auto-sizing leaves state behind in DRT.

  • platform/mac-wk1/TestExpectations:
10:59 AM Changeset in webkit [215881] by BJ Burg
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: fix tooltip wording for Reload button
https://bugs.webkit.org/show_bug.cgi?id=171073
<rdar://problem/31378524>

Reviewed by Joseph Pecoraro.

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

(WebInspector.contentLoaded):

10:39 AM Changeset in webkit [215880] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/buttons-container/buttons-container-buttons-property.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167371

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:32 AM Changeset in webkit [215879] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark webgl/1.0.2/conformance/glsl/misc/shader-with-reserved-words.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170877

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:11 AM Changeset in webkit [215878] by Alan Bujtas
  • 4 edits
    1 delete in trunk

Use text-shadow to visualize simple line layout coverage.
https://bugs.webkit.org/show_bug.cgi?id=171379

Reviewed by Antti Koivisto.

Source/WebCore:

It's more subtle (for everyday use).

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::paintDebugBorders): Deleted.

LayoutTests:

  • fast/inline/simple-line-layout-16bit-content-expected-mismatch.html: Added.
  • fast/inline/simple-line-layout-16bit-content-expected.html: Removed.
  • fast/inline/simple-line-layout-16bit-content.html:
10:04 AM Changeset in webkit [215877] by jdiggs@igalia.com
  • 6 edits in trunk

[ATK] ARIA alertdialogs should be exposed with ROLE_DIALOG
https://bugs.webkit.org/show_bug.cgi?id=171187

Reviewed by Chris Fleizach.

Source/WebCore:

Map ApplicationAlertDialogRole to ATK_ROLE_DIALOG. While ATK_ROLE_ALERT is
appropriate as far as ATK is concerned, the Core Accessibility API Mappings
map ARIA's alertdialog role to ATK_ROLE_DIALOG. We should be consistent
with the spec. The fact that this is an alert dialog can still be obtained
via the AtkObject attributes.

No new tests needed. Update the expectations for roles-exposed.html,
xml-roles-exposed.html, and aria-mappings.html to reflect the change.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

  • accessibility/aria-mappings-expected.txt: Updated.
  • accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
10:02 AM Changeset in webkit [215876] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-604.1.19/Source/WebCore

Cherry-pick r215870. rdar://problem/31845349

9:55 AM Changeset in webkit [215875] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests

Make fast/text/complex-small-caps-non-bmp-capitalize.html more robust
https://bugs.webkit.org/show_bug.cgi?id=171366
<rdar://problem/30060323>

Reviewed by Alex Christensen.

This test needs a font which supports Deseret but doesn't support small caps.
Geneva is a better choice for such a font.

  • fast/text/complex-small-caps-non-bmp-capitalize-expected.html:
  • fast/text/complex-small-caps-non-bmp-capitalize.html:
9:51 AM Changeset in webkit [215874] by Antti Koivisto
  • 5 edits
    2 adds in trunk

Repeated layouts in Mail due to viewport units being used with auto-sizing
https://bugs.webkit.org/show_bug.cgi?id=171371
<rdar://problem/28780084>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/viewport-percentage-lengths/vh-auto-size.html

Auto-sizing code would adjust the size of the view in the beginning of layout(). This would
end up invalidating style for elements that use vh units and we would perform main layout
with unclean style. This would result in endless layout loops and hit assert on debug.

  • page/FrameView.cpp:

(WebCore::FrameView::availableContentSizeChanged):

Ensure we heve clean style after resize if we are in pre-layout.

LayoutTests:

  • css3/viewport-percentage-lengths/vh-auto-size-expected.html: Added.
  • css3/viewport-percentage-lengths/vh-auto-size.html: Added.
9:47 AM Changeset in webkit [215873] by jdiggs@igalia.com
  • 1 edit
    1 move
    2 adds
    1 delete in trunk/LayoutTests

AX: Inconsistent exposure of ARIA "button" role with non-false value of aria-haspopup
https://bugs.webkit.org/show_bug.cgi?id=171204

Reviewed by Chris Fleizach.

It turns out that this bug was fixed as a side effect of the changes made
to fix WebKitGtk bug 171164 (r215821). But we didn't realize it due to the
lack of an existing layout test covering the mappings for other platforms.
The test created for the WebKitGtk port was modified and moved to the shared
tests. Shared expectations are based on the Mac's mappings.

  • accessibility/button-with-aria-haspopup-role-expected.txt: Added.
  • accessibility/button-with-aria-haspopup-role.html: Renamed from LayoutTests/accessibility/gtk/button-with-aria-haspopup-is-not-a-combobox.html.
  • accessibility/gtk/button-with-aria-haspopup-is-not-a-combobox-expected.txt: Removed.
  • platform/gtk/accessibility/button-with-aria-haspopup-role-expected.txt: Added.
9:42 AM Changeset in webkit [215872] by achristensen@apple.com
  • 30 edits in trunk/Source

Modernize Frame.h
https://bugs.webkit.org/show_bug.cgi?id=171357

Reviewed by Andy Estes.

Source/WebCore:

Frame.h has several std::unique_ptrs that are created in the constructor, never null,
and destroyed in the destructor. This is what WTF::UniqueRef is for, and using UniqueRef
allows us to not check for null values because a UniqueRef can never be null.
An interesting case was the EventHandler, which we explicitly set to nullptr in the destructor
of MainFrame, a subclass of Frame. We added this in r199181 to fix a crash tested by
fast/events/wheel-event-destroys-frame.html and this improved lifetime also does not crash
or assert in that test.

Using UniqueRef also requires const correctness, which this patch adds when necessary.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::dispatchTouchEvent):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):

  • editing/Editor.cpp:

(WebCore::Editor::isSelectTrailingWhitespaceEnabled):
(WebCore::Editor::computeAndSetTypingStyle):

  • editing/Editor.h:
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::contains):
(WebCore::FrameSelection::copyTypingStyle):

  • editing/FrameSelection.h:

(WebCore::FrameSelection::setTypingStyle):

  • loader/EmptyClients.cpp:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::clear):

  • page/EditorClient.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::hitTestResultAtPoint):

  • page/EventHandler.h:
  • page/Frame.cpp:

(WebCore::Frame::Frame):
(WebCore::Frame::setView):
(WebCore::Frame::injectUserScripts):

  • page/Frame.h:

(WebCore::Frame::editor):
(WebCore::Frame::eventHandler):
(WebCore::Frame::selection):
(WebCore::Frame::animation):
(WebCore::Frame::script):
(WebCore::Frame::eventHandlerPtr): Deleted.

  • page/MainFrame.cpp:

(WebCore::MainFrame::~MainFrame):

  • replay/UserInputBridge.cpp:

(WebCore::UserInputBridge::handleContextMenuEvent):

  • replay/UserInputBridge.h:

Source/WebKit/mac:

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::isSelectTrailingWhitespaceEnabled):

Source/WebKit/win:

  • WebCoreSupport/WebEditorClient.cpp:

(WebEditorClient::isSelectTrailingWhitespaceEnabled):

  • WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled):

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::contextMenuAtPointInWindow):
(WebKit::handleContextMenuEvent):
(WebKit::WebPage::isSelectTrailingWhitespaceEnabled):

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

(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::rangeForGranularityAtPoint):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPage::updateSelectionWithExtentPoint):

9:03 AM Changeset in webkit [215871] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/local/blob/send-hybrid-blob-using-open-panel.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171353

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:56 AM Changeset in webkit [215870] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the macOS build.

  • platform/mac/WebPlaybackControlsManager.h:
8:53 AM Changeset in webkit [215869] by commit-queue@webkit.org
  • 2 edits
    6 adds
    14 deletes in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add new GTK+ icons for instrument icons
https://bugs.webkit.org/show_bug.cgi?id=153892
<rdar://problem/24510460>

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Joseph Pecoraro.

Add more free icons from art-libre symbolic and removed some
unused ones for the Web Inspector in GTK+.

  • UserInterface/Images/gtk/Colors.png: Removed.
  • UserInterface/Images/gtk/Colors@2x.png: Removed.
  • UserInterface/Images/gtk/ColorsLarge.png: Removed.
  • UserInterface/Images/gtk/ColorsLarge@2x.png: Removed.
  • UserInterface/Images/gtk/Frames.png: Removed.
  • UserInterface/Images/gtk/Frames@2x.png: Removed.
  • UserInterface/Images/gtk/HeapAllocationsInstrument.svg: Added.
  • UserInterface/Images/gtk/LayoutInstrument.svg: Added.
  • UserInterface/Images/gtk/MemoryInstrument.svg: Added.
  • UserInterface/Images/gtk/Network.png: Removed.
  • UserInterface/Images/gtk/Network@2x.png: Removed.
  • UserInterface/Images/gtk/NetworkInstrument.svg: Added.
  • UserInterface/Images/gtk/NetworkLarge.png: Removed.
  • UserInterface/Images/gtk/NetworkLarge@2x.png: Removed.
  • UserInterface/Images/gtk/RenderingFramesInstrument.svg: Added.
  • UserInterface/Images/gtk/Script.png: Removed.
  • UserInterface/Images/gtk/Script@2x.png: Removed.
  • UserInterface/Images/gtk/ScriptLarge.png: Removed.
  • UserInterface/Images/gtk/ScriptLarge@2x.png: Removed.
  • UserInterface/Images/gtk/ScriptsInstrument.svg: Added.
  • UserInterface/Views/TimelineIcons.css:

(body:not(.mac-platform, .windows-platform) .network-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .network-icon.large .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .layout-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .layout-icon.large .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .script-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .script-icon.large .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .memory-icon .icon): Deleted.
(body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon): Deleted.

8:52 AM Changeset in webkit [215868] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

[GTK] Web Inspector: gtk/NavigationItemCurleyBraces.svg is licensed under NonCommercial CC
https://bugs.webkit.org/show_bug.cgi?id=170902

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Michael Catanzaro.

  • UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:

Replaced with new one created by me.

8:39 AM Changeset in webkit [215867] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

[GTK] Web Inspector: some SVG images are specified 'currentColor' incorrectly
https://bugs.webkit.org/show_bug.cgi?id=170977

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-27
Reviewed by Michael Catanzaro.

The keyword 'currentColor' is specifed manually in Bug 150602.
But, some SVG images are specified incorrectly.

  • UserInterface/Images/gtk/NavigationItemTypes.svg: Do not stroke

with currentColor, but fill.

  • UserInterface/Images/gtk/UpDownArrows.svg: Ditto.
8:31 AM Changeset in webkit [215866] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit/mac

[WK1] Tweak the data interaction SPI to indicate whether or not a data interaction was handled
https://bugs.webkit.org/show_bug.cgi?id=171369
<rdar://problem/31858853>

Reviewed by Dan Bernstein.

Introduce a new SPI hook intended to replace performDataInteraction:client:global:operation: that
returns whether or not the data interaction was handled. Due to the difference only in return type
and some staging constraints, this version is prefixed with "_tryTo".

  • WebView/WebView.mm:

(-[WebView _tryToPerformDataInteraction:client:global:operation:]):

  • WebView/WebViewPrivate.h:
8:28 AM Changeset in webkit [215865] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

8:11 AM Changeset in webkit [215864] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.19

Tag Safari-604.1.19.

8:01 AM Changeset in webkit [215863] by commit-queue@webkit.org
  • 6 edits
    1 add in trunk/LayoutTests

Fix some tests from platform-tests/cssom-view/cssom-view/
https://bugs.webkit.org/show_bug.cgi?id=171228

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-27
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Fixes for some tests are imported from the web-platform-test repository.
Expectations are updated accordingly.

  • web-platform-tests/cssom-view/cssom-view/media-query-list-interface-expected.txt: Added.
  • web-platform-tests/cssom-view/cssom-view/media-query-list-interface.xht:
  • web-platform-tests/cssom-view/cssom-view/window-interface-expected.txt:
  • web-platform-tests/cssom-view/cssom-view/window-interface.xht:

LayoutTests:

5:28 AM Changeset in webkit [215862] by Carlos Garcia Campos
  • 9 edits
    2 adds in trunk/Source

[GTK] Remote inspector should support inspecting targets with previous version of backend commands
https://bugs.webkit.org/show_bug.cgi?id=171267

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Rename GetTargetList DBus method as SetupInspectorClient since this method is actually called only once by
client right after connecting to the server. The method now receives the client backend commands hash as
argument and returns the contents of the backend commands file in case the hash doesn't match with the local
version.

  • PlatformGTK.cmake: Add RemoteInspectorUtils to compilation.
  • inspector/remote/glib/RemoteInspectorServer.cpp:

(Inspector::RemoteInspectorServer::setupInspectorClient):

  • inspector/remote/glib/RemoteInspectorServer.h:
  • inspector/remote/glib/RemoteInspectorUtils.cpp: Added.

(Inspector::backendCommands):
(Inspector::backendCommandsHash):

  • inspector/remote/glib/RemoteInspectorUtils.h: Added.

Source/WebInspectorUI:

Allow to use data URLs for script-src.

  • UserInterface/Main.html:

Source/WebKit2:

There's a FIXME for this in the code. The remote inspector proxy allows to pass a backend commands URL when
inspecting a target. That URL, if not empty, is used as Protocol/InspectorBackendCommands.js in the inspector
code instead of the local copy. We are currently assuming that both ends use the same version of that file.

  • UIProcess/glib/RemoteInspectorClient.cpp:

(WebKit::RemoteInspectorProxy::load): Pass RemoteInspectorClient::backendCommandsURL() to load().
(WebKit::RemoteInspectorClient::setupConnection): Get the local backend commands hash and pass it to
SetupInspectorClient method. Extract the server backend commands from the result and call setBackendCommands().
(WebKit::RemoteInspectorClient::setBackendCommands): Create a data URL for the server backend commands file
conents if needed.

  • UIProcess/glib/RemoteInspectorClient.h:

(WebKit::RemoteInspectorClient::backendCommandsURL):

4:02 AM Changeset in webkit [215861] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Text gets cut off when bailing out of simple line layout with widows.
https://bugs.webkit.org/show_bug.cgi?id=171370
<rdar://problem/31563414>

Reviewed by Antti Koivisto.

Source/WebCore:

Normal line layout requires an extra layout to handle widows. See RenderBlockFlow::relayoutToAvoidWidows.

Test: fast/multicol/simple-line-layout-widows-when-switching-over-to-normal-line-layout.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::ensureLineBoxes):

LayoutTests:

  • fast/multicol/simple-line-layout-widows-when-switching-over-to-normal-line-layout-expected.html: Added.
  • fast/multicol/simple-line-layout-widows-when-switching-over-to-normal-line-layout.html: Added.
1:59 AM Changeset in webkit [215860] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

[JSC] Handle PhantomSpread in LoadVarargs as the same to the others
https://bugs.webkit.org/show_bug.cgi?id=171262

Reviewed by Saam Barati.

JSTests:

  • stress/spread-outer-create-rest.js: Added.

(assert):
(foo):
(bar):
(baz):

Source/JavaScriptCore:

This is follow-up patch after r215720. In that patch, accidentally
we did not apply the same change to LoadVarargs in argument elimination
phase. This patch just does the same rewriting to handle PhantomSpread
correctly.

  • dfg/DFGArgumentsEliminationPhase.cpp:
1:06 AM Changeset in webkit [215859] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Use the correct modern-media-controls
https://bugs.webkit.org/show_bug.cgi?id=171358

Reviewed by Antoine Quint.

  • WebCore.xcodeproj/project.pbxproj:

Apr 26, 2017:

11:21 PM Changeset in webkit [215858] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Reverted r215774.

It was not doing what it was intended to do and was inappropriate for WebCore.

  • WebCore.xcodeproj/project.pbxproj:
10:55 PM Changeset in webkit [215857] by sbarati@apple.com
  • 2 edits in trunk/Tools

Add some more testing modes for Wasm tests now that we have tier up
https://bugs.webkit.org/show_bug.cgi?id=171360

Reviewed by Keith Miller.

Lets enable the FTL on all Wasm tests. Let's also run each
test with and without CJIT.

  • Scripts/run-jsc-stress-tests:
10:45 PM Changeset in webkit [215856] by Chris Dumez
  • 2 edits
    1 delete in trunk/LayoutTests

Unreviewed, remove unnecessary expected result in platform/ios-wk2

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
10:12 PM Changeset in webkit [215855] by commit-queue@webkit.org
  • 6 edits in trunk

Web Inspector: Uint8ClampedArray should be treated like an array, not an object
https://bugs.webkit.org/show_bug.cgi?id=171364
<rdar://problem/10873037>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-26
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::subtype):
Treat Uint8ClampedArray (like other Typed Arrays) as an array.

LayoutTests:

  • inspector/model/remote-object-expected.txt:
  • inspector/model/remote-object.html:
  • platform/mac/inspector/model/remote-object-expected.txt:

Test a Uint8ClampedArray is treated like an array.

8:38 PM Changeset in webkit [215854] by sbarati@apple.com
  • 14 edits
    1 add in trunk

Print Wasm function index in stack trace
https://bugs.webkit.org/show_bug.cgi?id=171349

Reviewed by JF Bastien.

JSTests:

  • wasm/function-tests/stack-trace.js: Added.

(import.Builder.from.string_appeared_here.assert):
(let.imp):

  • wasm/function-tests/trap-after-cross-instance-call.js:

(wasmFrameCountFromError):

  • wasm/function-tests/trap-load-2.js:

(wasmFrameCountFromError):

  • wasm/function-tests/trap-load.js:

(wasmFrameCountFromError):

Source/JavaScriptCore:

This patch prints a Callee's index in the function index
space in Error.stack.

This will lead to stack traces that have lines of text like:
wasm function index: 4@[wasm code]

We don't ascribe indices to everything in wasm. Specifically, the
Wasm->JS call stub callee does not get a name, and neither does
the JS -> Wasm entrypoint.

  • interpreter/Interpreter.cpp:

(JSC::GetStackTraceFunctor::operator()):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::Frame::functionName):

  • interpreter/StackVisitor.h:

(JSC::StackVisitor::Frame::wasmFunctionIndex):

  • runtime/StackFrame.cpp:

(JSC::StackFrame::functionName):

  • runtime/StackFrame.h:

(JSC::StackFrame::StackFrame):
(JSC::StackFrame::wasm):
(JSC::StackFrame::hasBytecodeOffset):
(JSC::StackFrame::bytecodeOffset):

  • wasm/WasmBBQPlanInlines.h:

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmCallee.cpp:

(JSC::Wasm::Callee::Callee):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::create):
(JSC::Wasm::Callee::index):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

7:57 PM Changeset in webkit [215853] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Follow up to r215843
https://bugs.webkit.org/show_bug.cgi?id=171361

Reviewed by Saam Barati.

This patch fixes some style comments Saam didn't get a chance to
request before I landed: https://bugs.webkit.org/show_bug.cgi?id=170134.

It renames Wasm::CodeBlock::m_wasmEntrypoints to
m_wasmIndirectCallEntrypoints, as well as fixes some copyrights and
indentation.

  • wasm/WasmBBQPlan.cpp:
  • wasm/WasmCodeBlock.cpp:

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

  • wasm/WasmCodeBlock.h:

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

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmTierUpCount.h:

(JSC::Wasm::TierUpCount::TierUpCount):
(JSC::Wasm::TierUpCount::loopDecrement):
(JSC::Wasm::TierUpCount::functionEntryDecrement):
(JSC::Wasm::TierUpCount::shouldStartTierUp):
(JSC::Wasm::TierUpCount::count):

7:28 PM Changeset in webkit [215852] by sbarati@apple.com
  • 10 edits
    2 adds in trunk

ASSERTION FAILED: inIndex != notFound in JSC::invalidParameterInSourceAppender()
https://bugs.webkit.org/show_bug.cgi?id=170924
<rdar://problem/31721052>

Reviewed by Mark Lam.

JSTests:

  • stress/error-message-for-function-base-not-found.js: Added.

(assert):
(throw.new.Error):

  • stress/error-messages-for-in-operator-should-not-crash.js: Added.

(catch):

LayoutTests/imported/w3c:

  • web-platform-tests/css-timing-1/cubic-bezier-timing-functions-output-expected.txt:
  • web-platform-tests/css-timing-1/frames-timing-functions-output-expected.txt:
  • web-platform-tests/css-timing-1/step-timing-functions-output-expected.txt:

Source/JavaScriptCore:

The error message handler for "in" was searching for the literal
string "in". However, our parser incorrectly allows escaped characters
to be part of keywords. So this is parsed as "in" in JSC: "i\u006E".
It should not be parsed that way. I opened https://bugs.webkit.org/show_bug.cgi?id=171310
to address this issue.

Regardless, the error message handlers should handle unexpected text gracefully.
All functions that try to augment error messages with the goal of
providing a more textual context for the error message should use
the original error message instead of crashing when they detect
unexpected text.

This patch also changes the already buggy code that tries to find
the base of a function call. That could would fail for code like this:
"zoo.bar("/abc\)*/");". See https://bugs.webkit.org/show_bug.cgi?id=146304
It would think that the base is "z". However, the algorithm that tries
to find the base can often tell when it fails, and when it does, it should
happily return the approximate text error message instead of thinking
that the base is "z".

  • runtime/ExceptionHelpers.cpp:

(JSC::functionCallBase):
(JSC::notAFunctionSourceAppender):
(JSC::invalidParameterInSourceAppender):

LayoutTests:

  • js/let-syntax-expected.txt:
6:26 PM Changeset in webkit [215851] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

Attempt to fix a PLT regression.
<rdar://problem/31826998>

Unreviewed.

Disable passing the TypeIdentifierHint to CGImageSourceCreateIncremental()
on iOS for now.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::ImageDecoder):

6:17 PM Changeset in webkit [215850] by jdiggs@igalia.com
  • 3 edits
    2 adds in trunk

[ATK] ARIA buttons which have a popup should be ATK_ROLE_PUSH_BUTTON; not ATK_ROLE_COMBO_BOX
https://bugs.webkit.org/show_bug.cgi?id=171182

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/gtk/button-with-aria-haspopup-is-not-a-combobox.html

WebCore Accessibility assigns PopUpButtonRole to collapsed select elements,
which the ATK code correctly maps to ATK_ROLE_COMBO_BOX. It turns out that
WebCore Accessibility also maps the ARIA button role to PopUpButtonRole if
it also has aria-haspopup. Add a check to atkRole() so that the latter case
is mapped to ATK_ROLE_PUSH_BUTTON.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

  • accessibility/gtk/button-with-aria-haspopup-is-not-a-combobox-expected.txt: Added.
  • accessibility/gtk/button-with-aria-haspopup-is-not-a-combobox.html: Added.
6:03 PM Changeset in webkit [215849] by timothy_horton@apple.com
  • 7 edits
    2 adds in trunk

Should not drag x-apple-data-detectors links
https://bugs.webkit.org/show_bug.cgi?id=171352
<rdar://problem/31309081>

Reviewed by Beth Dakin.

Test: fast/events/do-not-drag-and-drop-data-detectors-link.html

These links are only meaningful in the context of the original document,
so they should not be draggable.

  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::dataDetectorURLProtocol):
(WebCore::DataDetection::isDataDetectorURL):

  • page/DragController.cpp:

(WebCore::isDraggableLink):
Disallow dragging of <a href="x-apple-data-detectors://..."> links.

  • fast/events/do-not-drag-and-drop-data-detectors-link-expected.txt: Added.
  • fast/events/do-not-drag-and-drop-data-detectors-link.html: Added.
6:01 PM Changeset in webkit [215848] by timothy_horton@apple.com
  • 8 edits
    2 deletes in trunk

Revert accidentally smushed commit.

  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::dataDetectorURLProtocol): Deleted.
(WebCore::DataDetection::isDataDetectorURL): Deleted.

  • page/DragController.cpp:

(WebCore::isDraggableLink):

  • platform/mac/DragImageMac.mm:

(WebCore::createDragImageForLink):

  • TestExpectations:
  • fast/events/do-not-drag-and-drop-data-detectors-link-expected.txt: Removed.
  • fast/events/do-not-drag-and-drop-data-detectors-link.html: Removed.
  • platform/mac/TestExpectations:
5:53 PM Changeset in webkit [215847] by timothy_horton@apple.com
  • 8 edits
    2 adds in trunk

Should not drag x-apple-data-detectors links
https://bugs.webkit.org/show_bug.cgi?id=171352
<rdar://problem/31309081>

Reviewed by Beth Dakin.

Test: fast/events/do-not-drag-and-drop-data-detectors-link.html

These links are only meaningful in the context of the original document,
so they should not be draggable.

  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::dataDetectorURLProtocol):
(WebCore::DataDetection::isDataDetectorURL):

  • page/DragController.cpp:

(WebCore::isDraggableLink):
Disallow dragging of <a href="x-apple-data-detectors://..."> links.

  • fast/events/do-not-drag-and-drop-data-detectors-link-expected.txt: Added.
  • fast/events/do-not-drag-and-drop-data-detectors-link.html: Added.
5:15 PM Changeset in webkit [215846] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

JSC EWS Patch Relevance skips few JSC scripts
https://bugs.webkit.org/show_bug.cgi?id=171351

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/tool/steps/checkpatchrelevance.py:

(CheckPatchRelevance): Added few jsc related scripts.

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

REGRESSION (r215686): ASSERTION FAILED: data seen with webarchive/loading tests
https://bugs.webkit.org/show_bug.cgi?id=171340

Reviewed by Brady Eidson.

This fixes a flaky assertion in webarchive/loading/missing-data.html

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::append):
If there's no CFDataRef, there's no need to append data.
This happens sometimes.

5:10 PM Changeset in webkit [215844] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.18.1/Source

Versioning.

4:55 PM Changeset in webkit [215843] by keith_miller@apple.com
  • 34 edits
    6 copies
    1 move
    4 adds in trunk

WebAssembly: Implement tier up
https://bugs.webkit.org/show_bug.cgi?id=170134

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/trap-after-cross-instance-call.js:
  • wasm/tier-up/js-to-wasm.js: Added.

(async.test):

  • wasm/tier-up/wasm-to-wasm.js: Added.

(async.test):

Source/JavaScriptCore:

This patch implements tier up for wasm functions. Unlike with JS
code, wasm code needs to be able to tier up concurrently with the
running code. Since JS code is synchronous we can always link on
the running thread, wasm, however, can run the same code on more
than one thread. In order to make patching work correctly, we need
to ensure that all patches of callsites are aligned. On ARM we get
this for free since every call is a near call. On X86 we ensure
that the 32-bit relative offset is 32-bit aligned.

This patch also modifies how Wasm::Plan works. Now Plan is a
abstract super class and there are two subclasses, which
correspond to the different tiers of our wasm engine. The first,
Build Bytecode Quickly (BBQ) tier, roughly does what the old plan
code did before. The new tier, Optimized Machine code Generation
(OMG), can be called at any point by BBQ code and compiles exactly
one function. Once an OMGPlan finishes it will link it's code
internally then reset the instruction cache of all running wasm
threads, via, a ThreadMessage. Once the instruction caches have
been reset all the other functions will be patched to call the new
code.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::ensureCacheLineSpace):

  • assembler/CodeLocation.h:

(JSC::CodeLocationThreadSafeNearCall::CodeLocationThreadSafeNearCall):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::threadSafePatchableNearCall):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::threadSafeNearCall):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::threadSafePatchableNearCall):

  • b3/air/AirEmitShuffle.cpp:

(JSC::B3::Air::ShufflePair::inst):
(JSC::B3::Air::ShufflePair::opcode): Deleted.

  • b3/air/AirEmitShuffle.h:
  • jsc.cpp:

(functionTestWasmModuleFunctions):

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

  • runtime/Options.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::materializeWasmContext):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::constant):
(JSC::Wasm::B3IRGenerator::emitTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addTopLevel):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp: Copied from Source/JavaScriptCore/wasm/WasmPlan.cpp.

(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::stateString):
(JSC::Wasm::BBQPlan::moveToState):
(JSC::Wasm::BBQPlan::parseAndValidateModule):
(JSC::Wasm::BBQPlan::prepare):
(JSC::Wasm::BBQPlan::ThreadCountHolder::ThreadCountHolder):
(JSC::Wasm::BBQPlan::ThreadCountHolder::~ThreadCountHolder):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):
(JSC::Wasm::BBQPlan::work):

  • wasm/WasmBBQPlan.h: Copied from Source/JavaScriptCore/wasm/WasmPlan.h.
  • wasm/WasmBBQPlanInlines.h: Copied from Source/JavaScriptCore/wasm/WasmPlanInlines.h.

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::entrypoint):

  • wasm/WasmCodeBlock.cpp:

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

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmEntrypointLoadLocationFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::tierUpCount):
(JSC::Wasm::CodeBlock::mode):

  • wasm/WasmFormat.h:

(JSC::Wasm::CallableFunction::CallableFunction):
(JSC::Wasm::CallableFunction::offsetOfWasmEntrypointLoadLocation):

  • wasm/WasmMachineThreads.cpp: Copied from Source/JavaScriptCore/wasm/WasmPlanInlines.h.

(JSC::Wasm::wasmThreads):
(JSC::Wasm::startTrackingCurrentThread):
(JSC::Wasm::resetInstructionCacheOnAllThreads):

  • wasm/WasmMachineThreads.h: Copied from Source/JavaScriptCore/wasm/WasmCallee.h.
  • wasm/WasmModule.cpp:

(JSC::Wasm::makeValidationResult):
(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):

  • wasm/WasmModule.h:

(JSC::Wasm::Module::codeBlockFor):

  • wasm/WasmOMGPlan.cpp: Added.

(JSC::Wasm::OMGPlan::OMGPlan):
(JSC::Wasm::OMGPlan::work):
(JSC::Wasm::runOMGPlanForIndex):

  • wasm/WasmOMGPlan.h: Copied from Source/JavaScriptCore/wasm/WasmPlanInlines.h.
  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::runCompletionTasks):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::waitForCompletion):
(JSC::Wasm::Plan::tryRemoveVMAndCancelIfLast):
(JSC::Wasm::Plan::fail):
(JSC::Wasm::Plan::stateString): Deleted.
(JSC::Wasm::Plan::moveToState): Deleted.
(JSC::Wasm::Plan::parseAndValidateModule): Deleted.
(JSC::Wasm::Plan::prepare): Deleted.
(JSC::Wasm::Plan::ThreadCountHolder::ThreadCountHolder): Deleted.
(JSC::Wasm::Plan::ThreadCountHolder::~ThreadCountHolder): Deleted.
(JSC::Wasm::Plan::compileFunctions): Deleted.
(JSC::Wasm::Plan::complete): Deleted.

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::exports): Deleted.
(JSC::Wasm::Plan::internalFunctionCount): Deleted.
(JSC::Wasm::Plan::takeModuleInformation): Deleted.
(JSC::Wasm::Plan::takeCallLinkInfos): Deleted.
(JSC::Wasm::Plan::takeWasmToWasmExitStubs): Deleted.
(JSC::Wasm::Plan::hasWork): Deleted.
(JSC::Wasm::Plan::hasBeenPrepared): Deleted.

  • wasm/WasmTierUpCount.h: Renamed from Source/JavaScriptCore/wasm/WasmPlanInlines.h.

(JSC::Wasm::TierUpCount::TierUpCount):
(JSC::Wasm::TierUpCount::loopDecrement):
(JSC::Wasm::TierUpCount::functionEntryDecrement):
(JSC::Wasm::TierUpCount::shouldStartTierUp):
(JSC::Wasm::TierUpCount::count):

  • wasm/WasmWorklist.cpp:
  • wasm/WasmWorklist.h:

(JSC::Wasm::Worklist::nextTicket):

  • wasm/js/JSWebAssemblyCodeBlock.cpp:
  • wasm/js/JSWebAssemblyCodeBlock.h:

(JSC::JSWebAssemblyCodeBlock::wasmEntrypointLoadLocationFromFunctionIndexSpace):
(JSC::JSWebAssemblyCodeBlock::wasmToJsCallStubForImport):
(JSC::JSWebAssemblyCodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace): Deleted.

  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::setFunction):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::WebAssemblyFunction):

  • wasm/js/WebAssemblyFunction.h:

(JSC::WebAssemblyFunction::signatureIndex):
(JSC::WebAssemblyFunction::wasmEntrypointLoadLocation):
(JSC::WebAssemblyFunction::callableFunction):
(JSC::WebAssemblyFunction::offsetOfWasmEntrypointLoadLocation):
(JSC::WebAssemblyFunction::wasmEntrypoint): Deleted.
(JSC::WebAssemblyFunction::offsetOfWasmEntrypoint): Deleted.

  • wasm/js/WebAssemblyModuleRecord.cpp:

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

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyValidateFunc):

  • wasm/js/WebAssemblyWrapperFunction.cpp:

(JSC::WebAssemblyWrapperFunction::WebAssemblyWrapperFunction):
(JSC::WebAssemblyWrapperFunction::create):

  • wasm/js/WebAssemblyWrapperFunction.h:

(JSC::WebAssemblyWrapperFunction::signatureIndex):
(JSC::WebAssemblyWrapperFunction::wasmEntrypointLoadLocation):
(JSC::WebAssemblyWrapperFunction::callableFunction):
(JSC::WebAssemblyWrapperFunction::wasmEntrypoint): Deleted.

4:52 PM Changeset in webkit [215842] by Ryan Haddad
  • 4 edits in trunk

Unreviewed, rolling out r215814.

The LayoutTest for this change is failing on ios-simulator and
is flaky on macOS.

Reverted changeset:

"Response.blob() does not set the content-type based on the
header value."
https://bugs.webkit.org/show_bug.cgi?id=170849
http://trac.webkit.org/changeset/215814

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

Test importer should delete obsolete files based on w3c-import.log
https://bugs.webkit.org/show_bug.cgi?id=171348

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

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.do_import): Removing dangling -expected.txt files in regular import mode.
(TestImporter.remove_deleted_files): Fixing according w3c-import.log current format.

  • Scripts/webkitpy/w3c/test_importer_unittest.py:

(test_remove_obsolete_content):

4:33 PM Changeset in webkit [215840] by Wenson Hsieh
  • 21 edits in trunk/Source

WebItemProviderPasteboard should not synchronously load provided data
https://bugs.webkit.org/show_bug.cgi?id=171341
<rdar://problem/31614010>

Reviewed by Tim Horton.

Source/WebCore:

Refactors WebItemProviderPasteboard to not require asynchronously loading item provider data. To accomplish this,
we ensure that before performing data interaction, the UTI type that the data operation target should consume is
propagated to the UI process prior to the web process receiving the signal from the UI process to begin the
data operation itself. This information is sent via WebPlatformStrategies::updatePreferredTypeIdentifiers, a new
pasteboard helper function.

  • page/DragController.cpp:

(WebCore::DragController::DragController):
(WebCore::dragIsHandledByDocument):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::updatePreferredTypeIdentifiersForDragHandlingMethod):
(WebCore::DragController::tryDocumentDrag):

Give DragHandlingMethod a richer representation of what type of action will be performed. DragController::
updatePreferredTypeIdentifiersForDragHandlingMethod uses this to determine what kinds of UTIs are acceptable for
the current drop session.

  • page/DragController.h:

(WebCore::DragController::documentIsHandlingNonDefaultDrag):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::updatePreferredTypeIdentifiersForDragHandlingMethod):

Updates the data interaction pasteboard's list of preferred type identifiers it should load upon data operation.

  • platform/DragData.h:
  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::updatePreferredTypeIdentifiers):

  • platform/ios/WebItemProviderPasteboard.mm:

Introduce _preferredTypeIdentifiers, which -doAfterLoadingProvidedContentIntoFileURLs: uses as a hint when
determining which UTI to load for an item provider. In the absence of preferred type identifiers, the default
behavior is to use the highest fidelity type adhering to "public.content".

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard updatePreferredTypeIdentifiers:]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):

Remove calls to -createObjectOfClass: and -copyDataRepresentation:. Instead, rely solely on the loaded file URL
to read and initialize data and objects from the pasteboard.

(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):
(-[WebItemProviderPasteboard _tryToCreateObjectOfClass:usingProvider:]): Deleted.

  • platform/mac/DragDataMac.mm:

(WebCore::DragData::updatePreferredTypeIdentifiers):

Source/WebKit/mac:

Adds client-layer plumbing for updatePreferredTypeIdentifiers. See WebCore ChangeLog for more details.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::updatePreferredTypeIdentifiers):

Source/WebKit2:

Adds plumbing for updatePreferredTypeIdentifiers through the WebPasteboardProxy. This allows the web process to
signal to the UI process what UTIs the current drop target should accept and load. See WebCore ChangeLog for more
details.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::updatePreferredTypeIdentifiers):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::updatePreferredTypeIdentifiers):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
4:33 PM Changeset in webkit [215839] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Re-baseline inspector/dom/getAccessibilityPropertiesForNode.html after r215821
https://bugs.webkit.org/show_bug.cgi?id=171346

Unreviewed test gardening.

Patch by Matt Lewis <Matt Lewis> on 2017-04-26

  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
4:28 PM Changeset in webkit [215838] by Jonathan Bedard
  • 2 edits in trunk/Tools

REGRESSION (r213926): We're sometimes trying to start WebKitTestRunner without proper DYLD variables
<rdar://problem/31816459>

Unreviewed infrastructure fix.

Some of our iOS Simulator bots are slow and will register crashes due to an incorrect
DYLD_FRAMEWORK_PATH when installing an app.

  • Scripts/webkitpy/port/ios.py:

(IOSPort.setup_test_run): Pass DYLD_FRAMEWORK_PATH to app on install.

4:26 PM Changeset in webkit [215837] by jdiggs@igalia.com
  • 11 edits
    4 adds in trunk

[ATK] Elements with a defined, non-false value for aria-current should expose ATK_STATE_ACTIVE
https://bugs.webkit.org/show_bug.cgi?id=171163

Reviewed by Chris Fleizach.

Source/WebCore:

Add ATK_STATE_ACTIVE to the state set of elements which have a valid, non-false
value for aria-current, expose the value of via the "current" AtkObject attribute,
and emit state-change notifications when the value of aria-current changes from
non-false to false, or vice versa.

Tests: accessibility/gtk/aria-current-changed-notification.html

accessibility/gtk/aria-current.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChanged):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::supportsARIACurrent):
(WebCore::AccessibilityObject::ariaCurrentValue):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):
(setAtkStateSetFromCoreObject):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): Moved code returning
string value for aria-current into AccessibilityObject:ariaCurrentValue().

Tools:

Add support for state-change notifications for ATK_STATE_ACTIVE.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:

LayoutTests:

  • accessibility/gtk/aria-current-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-current-changed-notification.html: Added.
  • accessibility/gtk/aria-current-expected.txt: Added.
  • accessibility/gtk/aria-current.html: Added.
4:11 PM Changeset in webkit [215836] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Unauthenticated CORS preflight requests should not use client certificates
https://bugs.webkit.org/show_bug.cgi?id=171298

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

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Ensuring that session dedicated to requests that do not want to use credentials do not look for client credentials.

4:09 PM Changeset in webkit [215835] by Wenson Hsieh
  • 5 edits in trunk/Source/WebCore

WebItemProviderPasteboard should fetch preloaded assets from disk when possible
https://bugs.webkit.org/show_bug.cgi?id=171320
<rdar://problem/31614010>

Reviewed by Tim Horton.

Adds a mechanism to WebItemProviderPasteboard to remember the temporary file URLs of assets it has loaded using
doAfterLoadingProvidedContentIntoFileURLs:. When retrieving data from the pasteboard, we then see if we can
first fetch serialized data straight from disk instead of having to go through the item provider in both
-dataForPasteboardType:inItemSet: and -valuesForPasteboardType:inItemSet:.

See below annotations for more detail.

  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::filenamesForDataInteraction):

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

Introduces _typeToFileURLMaps, an array of dictionaries. A dictionary at the ith index of this array represents
a mapping of UTIs to loaded temo file URLs for the ith UIItemProvider in the _itemProviders array. Before data
interaction is performed, all entries in this array will be empty.

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):
(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):

Consult any loaded assets on disk before hitting UIItemProviders via the new
-_preLoadedDataConformingToType:forItemProviderAtIndex: helper method.

(-[WebItemProviderPasteboard _tryToCreateObjectOfClass:usingProvider:]):
(-[WebItemProviderPasteboard fileURLsForDataInteraction]):

Traverse _typeToFileURLMaps to collect all file URLs.

(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:]):

Refactored to populate and set _typeToFileURLMaps when loading completes, rather than an array of file URLs.

(-[WebItemProviderPasteboard _tryToCreateAndAppendObjectOfClass:toArray:usingProvider:]): Deleted.
(-[WebItemProviderPasteboard filenamesForDataInteraction]): Deleted.

Correct an erroneously named method (replaces filenames with fileURLs).

3:36 PM Changeset in webkit [215834] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebKit2

The current page is given a muted state when starting a media stream on iOS.
https://bugs.webkit.org/show_bug.cgi?id=171290
<rdar://problem/31821427>

Reviewed by Jer Noble.

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Don't mute the current
page on iOS either, that will prevent the new media stream from playing.

3:04 PM Changeset in webkit [215833] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

LayoutTest webrtc/datachannel/bufferedAmountLowThreshold.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170701

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

  • platform/mac-wk1/TestExpectations: Removing flaky expectation.
  • webrtc/datachannel/bufferedAmountLowThreshold-expected.txt:
  • webrtc/datachannel/bufferedAmountLowThreshold.html:
3:01 PM Changeset in webkit [215832] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

LayoutTest webrtc/datachannel/basic.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=170154
<rdar://problem/31288423>

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

Before the patch, we are setting the channel handler client to null and then unregistering from observer to
libwebrtc data channel. Since this happens in two different threads, there might be a timing issue.

Removing this risk by first unregistering (done synchronously on the other thread), before setting client to null.
Made some clean-up related refactoring.

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::close):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::close):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • platform/mediastream/RTCDataChannelHandler.h:
  • platform/mock/RTCDataChannelHandlerMock.cpp:

(WebCore::RTCDataChannelHandlerMock::setClient):

  • platform/mock/RTCDataChannelHandlerMock.h:
2:40 PM Changeset in webkit [215831] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Make user script injection more robust
https://bugs.webkit.org/show_bug.cgi?id=171339
<rdar://problem/30643691>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-04-26
Reviewed by Geoffrey Garen.

Source/WebCore:

  • loader/EmptyClients.cpp:
  • page/Frame.cpp:

(WebCore::Frame::injectUserScripts):

  • page/UserContentController.cpp:

(WebCore::UserContentController::forEachUserScript):
(WebCore::UserContentController::forEachUserStyleSheet):
(WebCore::UserContentController::forEachUserMessageHandler):

  • page/UserContentController.h:
  • page/UserContentProvider.h:

Source/WebKit2:

  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::forEachUserScript):
(WebKit::WebUserContentController::forEachUserStyleSheet):
(WebKit::WebUserContentController::forEachUserMessageHandler):

  • WebProcess/UserContent/WebUserContentController.h:
1:52 PM Changeset in webkit [215830] by Alan Bujtas
  • 6 edits in trunk/Source

RTL: recent searches popover is displayed in incorrect location
https://bugs.webkit.org/show_bug.cgi?id=171338
<rdar://problem/31377807>

Reviewed by Dean Jackson.

Source/WebCore:

Compute the absolute coordinates for the popup the same way we do for the select dropdown.

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::showPopup):

Source/WebKit/mac:

Add RTL support for the pop-under branch.

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::show):

Source/WebKit2:

Add RTL support for the pop-under branch.

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::showPopupMenu):

1:35 PM Changeset in webkit [215829] by commit-queue@webkit.org
  • 4 edits
    6 adds in trunk

Restrict WebKit image formats to a known whitelist
https://bugs.webkit.org/show_bug.cgi?id=170700

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-26
Reviewed by Tim Horton.

Source/WebCore:

If the image format is not supported, the load should be canceled and the
image is marked a broken image.

Test: fast/images/image-formats-support.html

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::setImageDataBuffer):
(WebCore::CachedImage::finishLoading):

  • loader/cache/CachedImage.h:

LayoutTests:

  • fast/images/image-formats-support-expected.txt: Added.
  • fast/images/image-formats-support.html: Added.
  • fast/images/resources/100x100-red-psd-renamed.png: Added.
  • fast/images/resources/100x100-red-tga-renamed.png: Added.
  • fast/images/resources/100x100-red.psd: Added.
  • fast/images/resources/100x100-red.tga: Added.
1:24 PM Changeset in webkit [215828] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.18.1/Source/WebCore

Cherry-pick 674c09519f93fe01f4a54b4b987b72cf3e13f62c.

1:23 PM Changeset in webkit [215827] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.18.1/Source/WebCore

Cherry-pick be0489fa24a2bb4c3ba95d5fc98cbbe72a5108a4.

1:23 PM Changeset in webkit [215826] by jmarcell@apple.com
  • 2 edits in tags/Safari-604.1.18.1/Source/WebKit2

Cherry-pick 6259a37cc6ee5e811df5a2d8c043ef0c9a2929bd
358c01809a1fefdd4606930f09b5acc8b8a007ed. rdar://problem/31827095

1:23 PM Changeset in webkit [215825] by jmarcell@apple.com
  • 8 edits
    4 adds in tags/Safari-604.1.18.1

Cherry-pick 9000840c460a566350f3532112bb13e684062b6f. rdar://problem/31634990

1:23 PM Changeset in webkit [215824] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Teardown iOS Simulators on exit if managed Simulators are still running
https://bugs.webkit.org/show_bug.cgi?id=171293

Reviewed by Aakash Jain.

We should make an effort to teardown simulators which we booted even when an exception is
thrown while booting. Make some IOSSimulatorPort functions into static methods and register
one of these functions to be run at exit to ensure any devices webkitpy is managing gets
torn down.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._set_up_run): Rely on exit handlers to teardown, not exceptions.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort._teardown_managed_simulators): Function run on exit which will kill all
iOS simulators and teardown and managed devices.
(IOSSimulatorPort._create_simulators): Register teardown function.
(IOSSimulatorPort.clean_up_test_run): Move device teardown to _teardown_managed_simulators.
(IOSSimulatorPort._remove_device): Deleted.

1:09 PM Changeset in webkit [215823] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Mark swipe/main-frame-pinning-requirement.html as a flaky failure on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=170484

Patch by Matt Lewis <Matt Lewis> on 2017-04-26
Reviewed by Alexey Proskuryakov.

  • platform/mac-wk2/TestExpectations:
12:38 PM Changeset in webkit [215822] by Chris Dumez
  • 17 edits
    1 copy
    2 moves
    57 adds
    1 delete in trunk/LayoutTests

Re-sync html/browsers/the-window-object web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=171313

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/common/PrefixedPostMessage.js: Added.

(PrefixedMessage):
(PrefixedMessage.prototype.url):
(PrefixedMessage.prototype.onMessage):
(PrefixedMessageTest):
(PrefixedMessageResource):
(PrefixedMessageResource.prototype.postToOpener):

  • web-platform-tests/html/browsers/the-window-object/accessing-other-browsing-contexts/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/non_automated/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-screenx-screeny-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-screenx-screeny.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-top-left-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-top-left.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-width-height-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-width-height.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-left-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-left.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screeny-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screeny.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-top-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-top.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-innerheight-innerwidth-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-innerheight-innerwidth.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-screenx-screeny-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-screenx-screeny.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-top-left-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-top-left.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-width-height.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/message-opener.html: Added.
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/resources/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/non-automated/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/garbage-collection-and-browsing-contexts/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/security-window/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/support/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict.html:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html:

LayoutTests:

  • tests-options.json:
12:30 PM Changeset in webkit [215821] by jdiggs@igalia.com
  • 9 edits
    2 adds in trunk

[ATK] Implement support for new ARIA 1.1 values of aria-haspopup
https://bugs.webkit.org/show_bug.cgi?id=171164

Reviewed by Chris Fleizach.

Source/WebCore:

In ARIA 1.1, aria-haspopup's value type changed from true/false to a token.
Values: true, false (default, unless it's a combobox), dialog, grid, listbox
(default for combobox), menu, and tree. Any value of aria-haspopup that is
not included in the list of allowed values, including an empty string, must
be treated as if the value false had been provided.

Add AccessibilityObject::ariaPopupValue() to validate the value, handle implicit
values, and give platform assistive technologies a means to access that value.

If there is a valid, non-false value of aria-haspopup, include ATK_STATE_HAS_POPUP
in the AtkStateSet. Lastly, expose the value (rather than true/false) via the "haspop"
AtkObject attribute.

Test: accessibility/gtk/aria-haspopup.html

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::ariaPopupValue):
(WebCore::AccessibilityObject::supportsARIAHasPopup):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::ariaHasPopup):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):
(setAtkStateSetFromCoreObject):

Tools:

hasPopup() should return whether or not ATK_STATE_HAS_POPUP is in the
AtkStateSet; not what is found in the AtkObject's attributes.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::hasPopup):

LayoutTests:

In addition to the new test, update xml-roles-exposed.html's expectations
because the implicit value of aria-haspopup for the combobox role is now
listbox, and that value should be exposed via an AtkObject attribute.

  • accessibility/gtk/aria-haspopup-expected.txt: Added.
  • accessibility/gtk/aria-haspopup.html: Added.
  • accessibility/gtk/xml-roles-exposed-expected.txt:
12:03 PM Changeset in webkit [215820] by Simon Fraser
  • 5 edits in trunk/LayoutTests

http/tests/frame-throttling tests failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=171314
rdar://problem/31691134

Reviewed by Chris Dumez.

The tests use UIHelper.activateAt(), which in DumpRenderTree dispatches mouse events via EventSender, and in iOS WK2 uses
UIScriptController to dispatch touch events. The former just use standard hit testing, which works fine.
The latter go via Frame::qualifyingNodeAtViewportLocation(), which calls ancestorRespondingToClickEvents()
and does area hit testing, and this fails to find anything clickable inside the <iframe>s.

Fix by putting a div with an onlick handler inside the iframes, and adjusting the click
locations.

  • http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html:
  • http/tests/frame-throttling/resources/requestAnimationFrame-frame.html:
  • http/tests/frame-throttling/resources/timer-throttling-frame.html:
  • http/tests/frame-throttling/timer-throttle-in-cross-origin-subframe.html:
12:01 PM Changeset in webkit [215819] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix CMake build.

  • PlatformMac.cmake:
11:46 AM Changeset in webkit [215818] by keith_miller@apple.com
  • 3 edits in trunk/Source/WTF

LocklessBag needs a destructor
https://bugs.webkit.org/show_bug.cgi?id=171334

Reviewed by Mark Lam.

Currently, if the bag is destructed any remaining nodes in the bag will
be leaked.

  • wtf/LocklessBag.h:

(WTF::LocklessBag::consumeAll):
(WTF::LocklessBag::~LocklessBag):

  • wtf/threads/Signals.cpp:

(WTF::jscSignalHandler):
(WTF::installSignalHandler):

11:28 AM Changeset in webkit [215817] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[ARM] Enable GCC visibility
https://bugs.webkit.org/show_bug.cgi?id=171296

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-04-26
Reviewed by Michael Catanzaro.

  • wtf/Platform.h:
11:22 AM Changeset in webkit [215816] by Antti Koivisto
  • 12 edits in trunk/Source

Enable expired-only reload policy on Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=171264
<rdar://problem/31807637>

Reviewed by Andreas Kling.

Source/WebCore:

Limit the behavior to http and data URLs (where we explicitly know about expiration).

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::setCSSStyleSheet):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::subresourceCachePolicy):

Pass the URL so we can test for protocol.

  • loader/FrameLoader.h:
  • loader/NavigationAction.cpp:

(WebCore::navigationType):

Test for reload navigation type correctly.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::cachePolicy):

  • loader/cache/CachedResourceLoader.h:

Source/WebKit2:

Enable the reload policy where only expired subresources are revalidated on Mac and iOS.
The behavor is enabled in Safari and for other clients based on SDK version check.

  • UIProcess/API/C/WKPage.cpp:

(WKPageReload):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView reload]):

  • UIProcess/Cocoa/VersionChecks.h:
11:17 AM Changeset in webkit [215815] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.18.1

New tag.

11:14 AM Changeset in webkit [215814] by commit-queue@webkit.org
  • 4 edits in trunk

Response.blob() does not set the content-type based on the header value.
https://bugs.webkit.org/show_bug.cgi?id=170849

Patch by WebKit Contributor <webkitcontrib@gmail.com> on 2017-04-26
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/response/response-consume-expected.txt:

Source/WebCore:

The Fetch API specification requires setting the blob contentType
using the Content-Type header value, if present. Previously the
FetchResponse class only called updateContentType() when first
created even though all the headers were not available. Call
updateContentType() again after the headers are populated.

This change allows WebKit to pass the "Consume response's body: from
fetch to blob" case in the WPT response-consume.html test.

Test: http://w3c-test.org/fetch/api/response/response-consume.html

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didReceiveResponse): Modified to
call FetchBodyOwner::updateContentType() after filling m_headers.

11:11 AM Changeset in webkit [215813] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Removing Flaky timeout expectation for swipe/main-frame-pinning-requirement.html.
https://bugs.webkit.org/show_bug.cgi?id=161887

Patch by Matt Lewis <Matt Lewis> on 2017-04-26
Reviewed by Tim Horton.

  • platform/mac-wk2/TestExpectations:
11:03 AM Changeset in webkit [215812] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the macOS Sierra build.

  • platform/mac/WebVideoFullscreenInterfaceMac.mm:
10:51 AM Changeset in webkit [215811] by aestes@apple.com
  • 16 edits in trunk/Source

[macOS] Add picture-in-picture support to WebPlaybackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=171328
<rdar://problem/29875010>

Reviewed by Jer Noble.

Source/WebCore:

  • platform/cocoa/WebPlaybackSessionModel.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::togglePictureInPicture): If the media element
is currently in PiP fullscreen mode, exit fullscreen. Otherwise, enter PiP fullscreen mode.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager canTogglePictureInPicture]): Added. Returns YES if
-allowsPictureInPicturePlayback returns YES.
(-[WebPlaybackControlsManager togglePictureInPicture]): Added. Calls
WebPlaybackSessionModel::togglePictureInPicture().

  • platform/mac/WebVideoFullscreenInterfaceMac.mm:

(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen): Added a call to
-[WebPlaybackControlsManager setPictureInPictureActive:YES].
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen): Added a call to
-[WebPlaybackControlsManager setPictureInPictureActive:NO].
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode): Ditto.

  • platform/spi/cocoa/AVKitSPI.h: Declared new SPI on AVTouchBarPlaybackControlsControlling.

Source/WebKit2:

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::togglePictureInPicture): Added. Calls
WebPlaybackSessionManagerProxy::togglePictureAndPicture().
(WebKit::WebPlaybackSessionManagerProxy::togglePictureInPicture): Added. Sends
TogglePictureInPicture to WebPlaybackSessionManager.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateMediaTouchBar): Called
-[WebPlaybackControlsManager setAllowsPictureInPicturePlayback:YES] if
WebPreferences::allowsPictureInPictureMediaPlayback() is true.

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.messages.in:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionManager::togglePictureInPicture): Added. Sets a
UserGestureIndicator and calls WebPlaybackSessionModel::togglePictureInPicture().

10:41 AM Changeset in webkit [215810] by caitp@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] fix RETURN_IF_EXCEPTION() placement in ownPropertyKeys()
https://bugs.webkit.org/show_bug.cgi?id=171330

Reviewed by Mark Lam.

Ensure RETURN_IF_EXCEPTION() following invokation of the
filterPropertyIfNeeded() lambda.

  • runtime/ObjectConstructor.cpp:

(JSC::ownPropertyKeys):

10:34 AM Changeset in webkit [215809] by dino@apple.com
  • 8 edits
    2 adds in trunk

[Color] Make gradients work with ExtendedColors
https://bugs.webkit.org/show_bug.cgi?id=171315
<rdar://problems/31830177>

Reviewed by Antoine Quint.

Source/WebCore:

Allow gradients to hold Color objects, and thus
handle ExtendedColor. Implement the backend for
CoreGraphics.

Test: css3/color/gradients.html

  • platform/graphics/Gradient.cpp:

(WebCore::Gradient::addColorStop): Just copy the Color now.
(WebCore::compareStops): Handle rename of stop to offset.
(WebCore::Gradient::hasAlpha): Use Color's helper.

  • platform/graphics/Gradient.h:

(WebCore::Gradient::ColorStop::ColorStop): Rename stop
to offset, and store a Color rather than four floating
point values.

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::platformGradient):

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::platformGradient): Use the CG method
that can handle CGColorRefs with ColorSpace values, and
pass the Extended sRGB space which should be no change for
all existing gradients but also handle ColorSpaces like
Display P3.

  • platform/graphics/win/GradientDirect2D.cpp:

(WebCore::Gradient::generateGradient):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::buildStops):

LayoutTests:

Test for gradients using the color() syntax. Unfortunately,
due to rounding errors, we can't use a ref test for some
transparent colors, so comment them out for the moment.
These can be re-enabled when we can specify a tolerance
value for image comparison in the testing framework.

  • css3/color/gradients-expected.html: Added.
  • css3/color/gradients.html: Added.
10:22 AM Changeset in webkit [215808] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

WebKit calls AppKit NSCell API from a background queue
https://bugs.webkit.org/show_bug.cgi?id=171318
<rdar://problem/31798317>

Reviewed by Anders Carlsson.

  • UIProcess/mac/ServicesController.mm:

(WebKit::ServicesController::refreshExistingServices):
Synchronously bounce to the main thread to do non-thread-safe NSCell related work.

10:08 AM Changeset in webkit [215807] by achristensen@apple.com
  • 6 edits
    1 move in trunk

Encoded filename should be decoded for WKContentExtension.identifier
https://bugs.webkit.org/show_bug.cgi?id=171316

Reviewed by Andy Estes.

Source/WebCore:

  • platform/FileSystem.h:

Source/WebKit2:

  • UIProcess/API/APIContentExtensionStore.cpp:

(API::createExtension):
(API::ContentExtensionStore::lookupContentExtension):
(API::ContentExtensionStore::getAvailableContentExtensionIdentifiers):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKContentExtensionStore.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm.

(TEST_F):

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm: Removed.
9:54 AM Changeset in webkit [215806] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix typo in RenderFrameBase
https://bugs.webkit.org/show_bug.cgi?id=171324

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-26
Reviewed by Zalan Bujtas.

No new tests, behavior unchanged.

  • rendering/RenderFrameBase.cpp:

(WebCore::RenderFrameBase::layoutWithFlattening):
(WebCore::RenderFrameBase::performLayoutWithFlattening):
(WebCore::RenderFrameBase::peformLayoutWithFlattening): Deleted.

  • rendering/RenderFrameBase.h:
9:34 AM Changeset in webkit [215805] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Forced page break on :after triggers infinite loop in column balancing
https://bugs.webkit.org/show_bug.cgi?id=171309
rdar://problem/26285884

Reviewed by David Hyatt.

Source/WebCore:

Stop trying to balance the columns when the forced page breaks >= the number of
columns even when this number is 1. Content will always overflow to the next page.
see https://chromium.googlesource.com/chromium/src/+/fbbebf38cefb2712c912581eccb046ef363ec84e%5E%21/#F2

Test: fast/multicol/infinite-loop-when-forced-break.html

  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::calculateBalancedHeight):

LayoutTests:

  • fast/multicol/infinite-loop-when-forced-break-expected.txt: Added.
  • fast/multicol/infinite-loop-when-forced-break.html: Added.
9:24 AM Changeset in webkit [215804] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

Attempt to fix a PLT regression.

Unreviewed.

Disable async decoding for large images till the flickering bug wk170640
is fixed.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages):

9:13 AM Changeset in webkit [215803] by Ryan Haddad
  • 4 edits
    6 deletes in trunk

Unreviewed, rolling out r215767.

The LayoutTest for this change is a flaky failure.

Reverted changeset:

"Restrict WebKit image formats to a known whitelist"
https://bugs.webkit.org/show_bug.cgi?id=170700
http://trac.webkit.org/changeset/215767

8:58 AM Changeset in webkit [215802] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

Improve wavy underline rendering
https://bugs.webkit.org/show_bug.cgi?id=171281

Reviewed by Sam Weinig.

Change wavy underline rendering to use font size instead of stroke
thickness as a way to tune it. Cut the extra offset from 2 to 1.
Change the parameters to make the line flatter and to make the proportion
of the wave that renders underneath a glyph the same.

  • rendering/TextDecorationPainter.cpp:

(WebCore::strokeWavyTextDecoration):
(WebCore::TextDecorationPainter::paintTextDecoration):

  • style/InlineTextBoxStyle.cpp:

(WebCore::getWavyStrokeParameters):
(WebCore::visualOverflowForDecorations):

  • style/InlineTextBoxStyle.h:

(WebCore::wavyOffsetFromDecoration):

8:55 AM Changeset in webkit [215801] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebKit2

Move mediaCaptureEnabled from WKWebViewConfiguration to WKPreferences
https://bugs.webkit.org/show_bug.cgi?id=171294

Patch by Andrew Gold <agold@apple.com> on 2017-04-26
Reviewed by Eric Carlson.

Since we now want the ability to toggle this setting dynamically, I have
moved it from WKWebViewConfiguration to WKPreferences.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _mediaStreamEnabled]):
(-[WKPreferences _setMediaStreamEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): No longer set mediaStream enabled from
the configuration.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _mediaStreamEnabled]): Deleted.
(-[WKWebViewConfiguration _setMediaStreamEnabled:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
8:34 AM Changeset in webkit [215800] by svillar@igalia.com
  • 8 edits in trunk

[css-grid] Remove most of the usage of SizingOperation
https://bugs.webkit.org/show_bug.cgi?id=171225

Reviewed by Darin Adler.

Source/WebCore:

SizingOperation was added as a way to modify the behaviour of the track sizing algorithm
with the specifics for intrinsic size computations. The problem is that although intrinsic
size computation does imply indefinite sizes, the opposite is not always true. For example,
a grid container with height:auto would compute the row sizes with an indefinite size but is
not part of the intrinsic size (preferred widths) computation.

That's why it was wrongly used in some parts of the current code, in most of the cases is
more than enough to check whether the available space is indefinite or not. In order to do
that we have to keep both available sizes (height & width) around all the time to properly
support orthogonal flows.

This change does not imply any change in behaviour.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithm::setAvailableSpace):
(WebCore::GridTrackSizingAlgorithm::computeTrackBasedSize):
(WebCore::GridTrackSizingAlgorithm::initialBaseSize):
(WebCore::GridTrackSizingAlgorithm::initialGrowthLimit):
(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::GridTrackSizingAlgorithm::assumedRowsSizeForOrthogonalChild):
(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild):
(WebCore::GridTrackSizingAlgorithm::gridTrackSize):
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction):
(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded):
(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
(WebCore::GridTrackSizingAlgorithm::setup):
(WebCore::GridTrackSizingAlgorithm::reset):

  • rendering/GridTrackSizingAlgorithm.h:

(WebCore::GridTrackSizingAlgorithmStrategy::availableSpace):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::availableSpaceForGutters):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::gridGap):
(WebCore::RenderGrid::guttersSize):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize):
(WebCore::RenderGrid::computeAutoRepeatTracksCount):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::trackSizesForComputedStyle):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::populateGridPositionsForDirection):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::gridGapForDirection): Deleted.

  • rendering/RenderGrid.h:

LayoutTests:

Added a new test case which was working correctly but that was not properly tested before.

  • fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows-expected.txt:
  • fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html:
7:56 AM Changeset in webkit [215799] by caitp@igalia.com
  • 5 edits in trunk

[JSC] Object.keys() must discard property names with no PropertyDescriptor
https://bugs.webkit.org/show_bug.cgi?id=171291

Reviewed by Yusuke Suzuki.

JSTests:

  • es6/Proxy_ownKeys_duplicates.js:
  • stress/proxy-own-keys.js:

(let.handler.getOwnPropertyDescriptor):
(let.handler.ownKeys):

Source/JavaScriptCore:

Proxy objects can produce an arbitrary list of property names from the
"ownKeys" trap, however the Object.keys() algorithm is required to
discard names which do not have a PropertyDescriptor. This also
applies to other uses of the EnumerableOwnProperties() algorithm
(https://tc39.github.io/ecma262/#sec-enumerableownproperties)

Related to https://bugs.chromium.org/p/v8/issues/detail?id=6290

  • runtime/ObjectConstructor.cpp:

(JSC::ownPropertyKeys):

6:34 AM Changeset in webkit [215798] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

sendMessageScoped's signal handler calls LocklessBag::consumeAll, which causes heap deallocation in signal handler and leads deadlock
https://bugs.webkit.org/show_bug.cgi?id=171319

Reviewed by Keith Miller.

In sendMessageScoped, we call LocklessBag<SignalHandler>::consumeAll thread->threadMessages().consumeAll().
In LocklessBag::consumeAll, we call delete on Nodes.
The problem is that this is called under the context of signal handler. Thus, when calling this, the original
thread may hold the lock in bmalloc. In that case, this delete call attempts to lock the heap lock recursively,
and causes deadlock.

Instead, this patch transfers the LocklessBag's Node to the sender thread. And the sender thread deletes it instead.

  • wtf/LocklessBag.h:

(WTF::LocklessBag::consumeAllWithNode):

  • wtf/ThreadMessage.cpp:

(WTF::ThreadMessageData::ThreadMessageData):
(WTF::sendMessageScoped):

1:50 AM Changeset in webkit [215797] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove Document::*FrameElementsShouldIgnoreScrolling
https://bugs.webkit.org/show_bug.cgi?id=171271

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-26
Reviewed by Chris Dumez.

setFrameElementsShouldIgnoreScrolling and frameElementsShouldIgnoreScrolling were
introduced bug 23072 in order to work around a bug in the Dictionary application.
However, this was removed in bug 132095 and hence the functions are no longer necessary.

No new tests.

  • dom/Document.h:

(WebCore::Document::setFrameElementsShouldIgnoreScrolling): Deleted.
(WebCore::Document::frameElementsShouldIgnoreScrolling): Deleted.

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::parseAttribute):

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

[GCrypt] CryptoKeyRSA: implement create(), keySizeInBits(), buildAlgorithm(), exportData()
https://bugs.webkit.org/show_bug.cgi?id=171213

Reviewed by Michael Catanzaro.

CryptoKeyRSA::create() validates the specified key type along with the
provided data. If everything is OK, it then proceeds to build the key
of the appropriate type through an s-expression that is constructed with
the necessary data. We don't currently support creating private keys
with any additional prime information (apart from p and q).

CryptoKeyRSA::keySizeInBits() calls the helper getRSAModulusLength()
function that find the modulus MPI in the key s-expression and returns
the modulus data length in bits.

CryptoKeyRSA::buildAlgorithm() returns KeyAlgorithm that's constructed
from the appropriate name, this key's modulus length, and this key's
public exponent data. It also specifies the hash if there is such a
restriction for this key.

CryptoKeyRSA::exportData() returns a properly-constructed
CryptoKeyDataRSAComponents object. The public modulus and exponent are
used in case the key is public. If the key is private, the secret
exponent and the p and q prime numbers are retrieved in MPI format.
They're then used to calculate the dp, dq and qi parameters that are
exported in the JWK format. Note that libgcrypt internally switches
the p and q prime numbers such that p < q, but the Web Crypto
specification and the dependant RFCs expect that q < p. We address
this by simply switching the roles of the two primes and follow the
usual q < p assumption when exporting the primes and computing the
dependant exponents and coefficients.

No new tests -- existing ones cover this but don't work yet due to missing
RSA-related CryptoAlgorithm implementations.

  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:

(WebCore::getRSAModulusLength):
(WebCore::getParameterMPIData):
(WebCore::getRSAKeyParameter):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::keySizeInBits):
(WebCore::CryptoKeyRSA::buildAlgorithm):
(WebCore::CryptoKeyRSA::exportData):

Apr 25, 2017:

11:39 PM Changeset in webkit [215795] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r209882): Web Inspector: Command-G does not work in the console
https://bugs.webkit.org/show_bug.cgi?id=170555
<rdar://problem/31481247>

Reviewed by Brian Burg.

Command-G didn't work in the console when the console content view was in focus. It only
worked when the search input field was focused.

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
(WebInspector.LogContentView.prototype.highlightPreviousSearchMatch): Added.
(WebInspector.LogContentView.prototype.findBannerRevealNextResult):
(WebInspector.LogContentView.prototype.highlightNextSearchMatch): Added.
Re-introduce highlightPreviousSearchMatch and highlightNextSearchMatch methods that were
removed in r209882.

11:38 PM Changeset in webkit [215794] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

[mac-wk1 Debug] LayoutTest http/tests/inspector/network/resource-sizes-network.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170953

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-25
Reviewed by Brian Burg.

  • http/tests/inspector/network/resource-sizes-disk-cache.html:
  • http/tests/inspector/network/resource-sizes-network.html:

Read the entire data to ensure the load is complete before we notify the frontend.

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

Unflake these tests, they should be more reliable now.

11:35 PM Changeset in webkit [215793] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Sorting by Priority Column hides all rows in the datagrid (uncaught exception)
https://bugs.webkit.org/show_bug.cgi?id=171312
<rdar://problem/31828554>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-25
Reviewed by Brian Burg.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.comparePriority):
Provide a helper for compariting NetworkPriority enum values.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.dataGridSortComparator):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
Custom sort handler for priority.

10:18 PM Changeset in webkit [215792] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unhandled enumeration values in IntlDateTimeFormat.cpp
https://bugs.webkit.org/show_bug.cgi?id=171241

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-25
Reviewed by JF Bastien.

Added some missing cases of the UDateFormatField to partTypeString,
and made them conditional to the ICU version that added them.
This should remove the warnings that appear on platform builds using the
newer system ICU headers.

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::partTypeString):

9:31 PM Changeset in webkit [215791] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

[WebCrypto] Enhance ways to convert an ECDSA signature binary into DER format
https://bugs.webkit.org/show_bug.cgi?id=171287
<rdar://problem/31735332>

Reviewed by Brent Fulgham.

Covered by existing tests.

  • crypto/mac/CryptoAlgorithmECDSAMac.cpp:

(WebCore::verifyECDSA):

9:27 PM Changeset in webkit [215790] by achristensen@apple.com
  • 7 edits
    1 add in trunk

REGRESSION(206450): WebKit2PlatformMouseEvent m_modifierFlags not set
https://bugs.webkit.org/show_bug.cgi?id=171297
<rdar://problem/31530719>

Reviewed by Geoffrey Garen.

Source/WebKit2:

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):

Tools:

  • TestWebKitAPI/PlatformWebView.h:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/EventModifiers.cpp: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::mouseDidMoveOverElement):
(TestWebKitAPI::setClients):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm:

(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):

9:27 PM Changeset in webkit [215789] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r214863): Web Inspector: Uncaught Exception when losing focus from a selector field
https://bugs.webkit.org/show_bug.cgi?id=171254
<rdar://problem/31813959>

Reviewed by Joseph Pecoraro.

The event.relatedTarget of a blur event contains the element where focus moved to.
In some cases this can be null, such as if the user leaves the application window.
For example Command+Tab to switch to another application.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):

9:24 PM Changeset in webkit [215788] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

fast/mediastream/RTCPeerConnection-icecandidate-event.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=171242

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

  • TestExpectations:
  • fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt:
  • fast/mediastream/RTCPeerConnection-icecandidate-event.html: Updating test to be more deterministic.
7:26 PM Changeset in webkit [215787] by Brent Fulgham
  • 5 edits
    2 adds in trunk

Relax the event firing ASSERT for Attr changes
https://bugs.webkit.org/show_bug.cgi?id=171236
<rdar://problem/30516349>

Reviewed by Dean Jackson.

Source/WebCore:

The assertions added in Bug 167318 were overly strict, and trigger for valid behavior.
Relax the assertion preventing event dispatch for the case of Attr elements at the
end of childrenChanged.

Test: fast/dom/HTMLLinkElement/event-while-removing-attribute.html

  • dom/Attr.cpp:

(WebCore::Attr::childrenChanged):

LayoutTests:

  • fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt: Added.
  • fast/dom/HTMLLinkElement/event-while-removing-attribute.html: Added.
7:16 PM Changeset in webkit [215786] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

Unreviewed, speculative build fix

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

For the time being, remove all references to UIItemProviders from this private header.
This should be fixed to use unavailability macros in a followup. See <rdar://problem/31827095>.

7:02 PM Changeset in webkit [215785] by Wenson Hsieh
  • 4 edits in trunk/Tools

Unreviewed, temporarily disable the data interaction unit tests.

The API around data interaction will change significantly in the near future, and
these tests will begin to fail. These will be reenabled once the bots are on an SDK
that supports the updated data interaction API.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
  • TestWebKitAPI/ios/DataInteractionSimulator.h:
  • TestWebKitAPI/ios/DataInteractionSimulator.mm:
6:53 PM Changeset in webkit [215784] by Brent Fulgham
  • 7 edits
    3 adds in trunk

Limit allowed size of document.title to avoid locking WebKit clients
https://bugs.webkit.org/show_bug.cgi?id=165113
<rdar://problem/28324389>

Reviewed by Darin Adler.

Source/WebKit/mac:

When a web application attempts to set an extremely long title, truncate the
title to a more reasonable size.

We do this at at the presentation layer, rather than in the DOM, so that we do
not affect script function. Instead, we merely limit display to a level that is
reasonable for normal GUI widgets. Anything else needs to be truncated in the UI
layer, so it is a waste of effort to send across IPC.

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDidReceiveTitle):

Source/WebKit2:

When a web application attempts to set an extremely long title, truncate the
title to a more reasonable size.

We do this at at the presentation layer, rather than in the DOM, so that we do
not affect script function. Instead, we merely limit display to a level that is
reasonable for normal GUI widgets. Anything else needs to be truncated in the UI
layer, so it is a waste of effort to send across IPC.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
  • TestWebKitAPI/Tests/WebKit2/LimitTitleSize.cpp: Added.
  • TestWebKitAPI/Tests/WebKit2/set-long-title.html: Added.
  • TestWebKitAPI/Tests/mac/LimitTitleSize.mm: Added.
6:45 PM Changeset in webkit [215783] by dino@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r214129): fast/media/mq-prefers-reduced-motion.html fails
https://bugs.webkit.org/show_bug.cgi?id=171303
<rdar://problem/31434879>

Reviewed by Brent Fulgham.

This particular test was calling notifyDone() from within
a callback triggered by the UIScriptController script, which
meant that by the time the controller tried to call its callback,
the test had finished.

  • fast/media/mq-prefers-reduced-motion-matchMedia.html: Make sure

notifyDone is called after both the callback-like functions have
triggered.

6:22 PM Changeset in webkit [215782] by wilander@apple.com
  • 21 edits
    1 copy
    1 add in trunk

Resource Load Statistics: Introduce shorter time-to-live for cookie partition whitelisting
https://bugs.webkit.org/show_bug.cgi?id=171295
<rdar://problem/31823818>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::reduceTimeResolutionToOneDay): Deleted.
(WebCore::reduceTimeResolution):

Changed name to no longer lock this to a specific resolution.

(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

Now calls WebCore::reduceTimeResolution().

(WebCore::ResourceLoadObserver::setTimeToLiveCookiePartitionFree):

Added for testing purposes.

(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):

Added for testing purposes.

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::shouldPartitionCookies):

Static inline convenience function.

(WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):

Now decides whether a domain should get partitioned cookies
based on timeToLiveCookiePartitionFree.
Removed clearFirst parameter since it's not needed here
and it introduced complexity in keeping the store and the
network process cache in sync.

(WebCore::ResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):

Added for testing purposes.

  • loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerSetTimeToLiveCookiePartitionFree):
(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandler):
(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandlerForOneDomain):

Changes and additions to test infrastructure.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandlerForOneDomain):
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):

Changes and additions to test infrastructure.

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):

No longer sends a boolean parameter to
WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().

Tools:

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsTimeToLiveCookiePartitionFree):
(WTR::TestRunner::statisticsFireShouldPartitionCookiesHandler):
(WTR::TestRunner::statisticsFireShouldPartitionCookiesHandlerForOneDomain):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree):
(WTR::TestController::statisticsFireShouldPartitionCookiesHandler):
(WTR::TestController::statisticsFireShouldPartitionCookiesHandlerForOneDomain):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:

Changed a TestRunner function name to
statisticsFireShouldPartitionCookiesHandlerForOneDomain().

  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html: Added.
  • http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:

Changed a TestRunner function name to
statisticsFireShouldPartitionCookiesHandlerForOneDomain().

6:11 PM Changeset in webkit [215781] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

6:11 PM Changeset in webkit [215780] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r213719): WebGL content on cubeslam.com is 1/4 expected size
https://bugs.webkit.org/show_bug.cgi?id=171300
rdar://problem/31051538

Reviewed by Dean Jackson.

Propagating the contentsScale to the UI process for canvas content layers causes
scaling issues, so don't do it for contents-provided layers.

No test because WebGL can't be tested in the iOS simulator.

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):

5:57 PM Changeset in webkit [215779] by commit-queue@webkit.org
  • 49 edits
    13 deletes in trunk

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

"It broke JSBench" (Requested by saamyjoon on #webkit).

Reverted changeset:

"[ES6]. Implement Annex B.3.3 function hoisting rules for
eval"
https://bugs.webkit.org/show_bug.cgi?id=163208
http://trac.webkit.org/changeset/215476

5:52 PM Changeset in webkit [215778] by beidson@apple.com
  • 6 edits in trunk/Source/WebKit2

Update WebProcess(Pool) to assume there's always a WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=171299

Reviewed by Alex Christensen.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcess):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::m_userMediaCaptureManagerProxy):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::websiteDataStore):

5:52 PM Changeset in webkit [215777] by sbarati@apple.com
  • 19 edits
    5 adds in trunk

JSArray::isArrayPrototypeIteratorProtocolFastAndNonObservable is wrong because it does not do the necessary checks on the base object
https://bugs.webkit.org/show_bug.cgi?id=171150
<rdar://problem/31771880>

Reviewed by Sam Weinig.

JSTests:

  • stress/spread-optimized-properly.js: Added.

(assert):
(test):
(shallowEq):
(makeArrayIterator):
(test.bar):
(test.callback):
(test.arr.proto.Symbol.iterator):
(test.arr.Symbol.iterator):
(test.get bar):
(test.hackedNext):
(test.test):
(test.):

Source/JavaScriptCore:

This patch fixes a huge oversight from the patch that introduced
op_spread/Spread. The original patch did not account for the
base object having Symbol.iterator or getters that could
change the iterator protocol. This patch fixes the oversight both
in the C code, as well as the DFG/FTL backends. We only perform
the memcpy version of spread if we've proven that it's guaranteed
to be side-effect free (no indexed getters), and if the iterator
protocol is guaranteed to be the original protocol. To do this, we
must prove that:

  1. The protocol on Array.prototype hasn't changed (this is the same as the

introductory patch for op_spread).

  1. The base object's proto is Array.prototype
  2. The base object does not have indexed getters
  3. The base object does not have Symbol.iterator property.
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canDoFastSpread):

  • dfg/DFGGraph.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileSpread):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileSpread):

  • runtime/JSArray.cpp:

(JSC::JSArray::isIteratorProtocolFastAndNonObservable):

  • runtime/JSArray.h:
  • runtime/JSArrayInlines.h:

(JSC::JSArray::isIteratorProtocolFastAndNonObservable): Deleted.

  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable):
(JSC::JSGlobalObject::isArrayIteratorProtocolFastAndNonObservable): Deleted.

Source/WebCore:

This patch moves the sequence converters to use the now fixed
JSArray::isArrayPrototypeIteratorProtocolFastAndNonObservable test
inside JSC.

This patch also fixes a few bugs:

  1. Converting to a sequence of numbers must prove that the JSArray

is filled only with Int32/Double. If there is a chance the array
contains objects, the conversion to a numeric IDLType can be observable
(via valueOf()), and can change the iterator protocol.

  1. There are other conversions that can have side effects a-la valueOf().

This patch introduces a new static constant in the various Converter
classes that tell the sequence converter if the conversion operation
can have JS side effects. If it does have side effects, we fall back to
the generic conversion that uses the iterator protocol. If not, we can
do a faster version that iterates over each element of the array,
reading it directly, and converting it.

Tests: js/sequence-iterator-protocol-2.html

js/sequence-iterator-protocol.html

  • bindings/js/JSDOMConvertAny.h: Does not have side effects.
  • bindings/js/JSDOMConvertBase.h: We pessimistically assume inside DefaultConverter that converions have side effects.
  • bindings/js/JSDOMConvertBoolean.h: Does not have side effects.
  • bindings/js/JSDOMConvertCallbacks.h: Does not have side effects.
  • bindings/js/JSDOMConvertObject.h: Does not have side effects.
  • bindings/js/JSDOMConvertSequences.h:

(WebCore::Detail::NumericSequenceConverter::convert):
(WebCore::Detail::SequenceConverter::convert):

LayoutTests:

  • js/sequence-iterator-protocol-2-expected.txt: Added.
  • js/sequence-iterator-protocol-2.html: Added.
  • js/sequence-iterator-protocol-expected.txt: Added.
  • js/sequence-iterator-protocol.html: Added.
5:42 PM Changeset in webkit [215776] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/pip-support/pip-support-click.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=165311

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:39 PM Changeset in webkit [215775] by msaboff@apple.com
  • 4 edits in trunk/Source

Call bmalloc scavenger first when handling a memory pressure event
https://bugs.webkit.org/show_bug.cgi?id=171289

Reviewed by Geoffrey Garen.

Source/bmalloc:

Registered a critical memory pressure handler. We add this handler in addition to the
call to release bmalloc memory in the WebCore releaseMemory handler for the case of
JSC API users that don't use WebCore. When both handlers are in the process, it is
basically a race. One will win, but the loser won't do any more work, so it is harmless.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

Source/WebCore:

Let bmalloc free any pages to the OS that it can before doing anything else.

  • page/MemoryRelease.cpp:

(WebCore::releaseMemory):

5:38 PM Changeset in webkit [215774] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Skip WebKitAdditions for Safari Technology Preview media controls
https://bugs.webkit.org/show_bug.cgi?id=171302
<rdar://problem/31823256>

Reviewed by Simon Fraser.

Safari Technology Preview should use the same controls
as OpenSource.

  • WebCore.xcodeproj/project.pbxproj:
5:16 PM Changeset in webkit [215773] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171301

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
5:07 PM Changeset in webkit [215772] by Ryan Haddad
  • 8 edits in trunk

Unreviewed, rolling out r215730.

The LayoutTest for this change is a flaky timeout on mac-wk1
debug.

Reverted changeset:

"Enable expired-only reload policy on Mac and iOS"
https://bugs.webkit.org/show_bug.cgi?id=171264
http://trac.webkit.org/changeset/215730

5:02 PM Changeset in webkit [215771] by mrajca@apple.com
  • 17 edits in trunk

Indicate presence of audio when handling autoplay events.
https://bugs.webkit.org/show_bug.cgi?id=171227

Reviewed by Alex Christensen.

Source/WebCore:

Added API tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::handleAutoplayEvent):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::userDidInterfereWithAutoplay):
(WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture):

  • html/HTMLMediaElement.h:
  • page/AutoplayEvent.h:
  • page/ChromeClient.h:

Source/WebKit2:

  • UIProcess/API/APIUIClient.h:

(API::UIClient::handleAutoplayEvent):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleAutoplayEvent):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::handleAutoplayEvent):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
4:50 PM Changeset in webkit [215770] by mark.lam@apple.com
  • 1 edit
    1 move in trunk/JSTests

[Follow up] Array.prototype.slice() should ensure that end >= begin.
https://bugs.webkit.org/show_bug.cgi?id=170989
<rdar://problem/31705652>

Not reviewed.

Follow up to rename a test file that was accidentally named wrongly.

  • stress/regress-170989.js: Copied from JSTests/stress/regress-170989.patch.
  • stress/regress-170989.patch: Removed.
4:49 PM Changeset in webkit [215769] by aakash_jain@apple.com
  • 2 edits in trunk/Source/WebCore

WebCore.framework should restrict allowable_clients
https://bugs.webkit.org/show_bug.cgi?id=171260

Reviewed by Alexey Proskuryakov.

  • Configurations/WebCore.xcconfig: Adding allowable_client to all platform, in order to restrict WebCore

from being directly linked on any platform.
Moved WebKitLegacy and WebCoreTestSupport to OTHER_LDFLAGS_BASE.
Removed WebKit2 as allowable_client from mac.
Added iTunesU, Casablanca and Remote to OTHER_LDFLAGS_BASE_ios for iTunes related projects.
Added WebKit, TVBooks, DumpRenderTree, WebKitTestRunner and TestWebKitAPI to OTHER_LDFLAGS_BASE_ios.

4:45 PM Changeset in webkit [215768] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Array.prototype.slice() should ensure that end >= begin.
https://bugs.webkit.org/show_bug.cgi?id=170989
<rdar://problem/31705652>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-170989.patch: Added.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSlice):

3:23 PM Changeset in webkit [215767] by commit-queue@webkit.org
  • 4 edits
    6 adds in trunk

Restrict WebKit image formats to a known whitelist
https://bugs.webkit.org/show_bug.cgi?id=170700

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-25
Reviewed by Tim Horton.

Source/WebCore:

If the image format is not supported, the load should be canceled and the
image is marked a broken image.

Test: fast/images/image-formats-support.html

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::setImageDataBuffer):
(WebCore::CachedImage::finishLoading):

  • loader/cache/CachedImage.h:

LayoutTests:

  • fast/images/image-formats-support-expected.txt: Added.
  • fast/images/image-formats-support.html: Added.
  • fast/images/resources/100x100-red-psd-renamed.png: Added.
  • fast/images/resources/100x100-red-tga-renamed.png: Added.
  • fast/images/resources/100x100-red.psd: Added.
  • fast/images/resources/100x100-red.tga: Added.
2:46 PM Changeset in webkit [215766] by commit-queue@webkit.org
  • 6 edits in trunk/Source

[Win] Use Clang's has_declspec_attribute for export macros
https://bugs.webkit.org/show_bug.cgi?id=171240

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-04-25
Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • runtime/JSExportMacros.h:

Source/WTF:

  • wtf/Compiler.h:
  • wtf/ExportMacros.h:
  • wtf/Platform.h:
2:45 PM Changeset in webkit [215765] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

Deduplicate some lines in the toplevel TestExpectations

Remove a duplicate line and consolidate another.

2:41 PM Changeset in webkit [215764] by Chris Dumez
  • 1 edit
    2 adds in trunk/LayoutTests

Element.dataset.name incorrectly returns undefined
https://bugs.webkit.org/show_bug.cgi?id=161454
<rdar://problem/31818563>

Reviewed by Mark Lam.

Add layout test for JS caching bug on DOMStringMap that was fixed as part
of a large named property getter refactoring in r210667.

  • fast/dom/dataset-caching-bug-expected.txt: Added.
  • fast/dom/dataset-caching-bug.html: Added.
2:36 PM Changeset in webkit [215763] by timothy_horton@apple.com
  • 2 edits in trunk/Tools

Try to fix the WKTR build after r215758

  • Scripts/build-webkittestrunner:
2:23 PM Changeset in webkit [215762] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

Our signal handler shouldn't print when sigaction succeeds
https://bugs.webkit.org/show_bug.cgi?id=171286

Reviewed by Michael Saboff.

It turns out !result is not the same as !!result.

  • wtf/threads/Signals.cpp:

(WTF::jscSignalHandler):

2:21 PM Changeset in webkit [215761] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Attempt armv7k build fix after r215720

I think we're just missing an include for the definition of ExecState::r().

  • runtime/JSFixedArray.cpp:
2:21 PM Changeset in webkit [215760] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

CoreAudioCaptureSource::suspend is asserting too often
https://bugs.webkit.org/show_bug.cgi?id=171285

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

No change of behavior.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::suspend): Moving the assertion to where it might be useful.

2:15 PM Changeset in webkit [215759] by dbates@webkit.org
  • 4 edits in trunk/Source/WebCore

Use an OptionSet for compositing reasons bitmask
https://bugs.webkit.org/show_bug.cgi?id=171153

Reviewed by Simon Fraser.

We should make use of OptionSet to represent the bitmask of the reasons a layer
was composited instead of using an integer and bitwise operations.

  • inspector/InspectorLayerTreeAgent.cpp:

(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::logReasonsForCompositing): Also fix code style issues;
an else-if statement should be written as an if-statement when the prior if-statement
concludes with a return statement.

  • rendering/RenderLayerCompositor.h:
2:14 PM Changeset in webkit [215758] by dbates@webkit.org
  • 34 edits
    12 deletes in trunk/Tools

Remove more EFL code
https://bugs.webkit.org/show_bug.cgi?id=171288

Rubber-stamped by Simon Fraser.

The EFL port is no longer in the WebKit OpenSource Project repository. Remove more code
that was part of the EFL port.

  • CMakeLists.txt:
  • DumpRenderTree/AccessibilityController.h:
  • DumpRenderTree/AccessibilityUIElement.cpp:

(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/DumpRenderTree.h:
  • DumpRenderTree/cairo/PixelDumpSupportCairo.h:
  • ImageDiff/efl/ImageDiff.cpp: Removed.
  • MiniBrowser/efl/CMakeLists.txt: Removed.
  • MiniBrowser/efl/main.c: Removed.
  • Scripts/build-dumprendertree:
  • Scripts/build-jsc:
  • Scripts/build-webkit:
  • Scripts/build-webkittestrunner:
  • Scripts/run-minibrowser:
  • Scripts/update-webkit-libs-jhbuild:
  • Scripts/update-webkitefl-libs: Removed.
  • Scripts/webkitdirs.pm:

(argumentsForConfiguration):
(extractNonMacOSHostConfiguration):
(executableProductDir):
(builtDylibPathForName):
(determinePortName):
(launcherPath):
(launcherName):
(getJhbuildPath):
(wrapperPrefixIfNeeded):
(generateBuildSystemFromCMakeProject):
(buildCMakeProjectOrExit):
(isEfl): Deleted.

  • Scripts/webkitperl/FeatureList.pm:
  • Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl:
  • Scripts/webkitpy/common/config/ports.py:

(DeprecatedPort.port):
(GtkWK2Port.run_webkit_tests_command):
(EflWK2Port): Deleted.
(EflWK2Port.build_webkit_command): Deleted.

  • Scripts/webkitpy/port/builders.py:
  • Scripts/webkitpy/port/efl.py: Removed.
  • Scripts/webkitpy/port/efl_unittest.py: Removed.
  • Scripts/webkitpy/port/factory.py:

(platform_options):
(PortFactory):

  • Scripts/webkitpy/style/checkers/test_expectations_unittest.py:

(TestExpectationsTestCase.test_determine_port_from_expectations_path):

  • Scripts/webkitpy/tool/commands/rebaseline_unittest.py:

(TestRebaselineTest.test_baseline_directory):
(TestRebaselineExpectations.test_rebaseline_expectations):

  • TestWebKitAPI/PlatformEfl.cmake: Removed.
  • TestWebKitAPI/PlatformWebView.h:
  • TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: Removed.
  • TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp: Removed.
  • TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo.cpp: Removed.
  • TestWebKitAPI/Tests/WebKit2/efl/scrollTo.html: Removed.
  • TestWebKitAPI/efl/InjectedBundleController.cpp: Removed.
  • TestWebKitAPI/efl/PlatformUtilities.cpp: Removed.
  • TestWebKitAPI/efl/PlatformWebView.cpp: Removed.
  • TestWebKitAPI/efl/main.cpp: Removed.
  • WebKitTestRunner/EventSenderProxy.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::EventSendingController::contextClick):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:

(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback):
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler):

  • WebKitTestRunner/InjectedBundle/efl/ActivateFontsEfl.cpp: Removed.
  • WebKitTestRunner/InjectedBundle/efl/FontManagement.cpp: Removed.
  • WebKitTestRunner/InjectedBundle/efl/FontManagement.h: Removed.
  • WebKitTestRunner/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
  • WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp: Removed.
  • WebKitTestRunner/PlatformEfl.cmake: Removed.
  • WebKitTestRunner/PlatformWebView.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

  • WebKitTestRunner/efl/EventSenderProxyEfl.cpp: Removed.
  • WebKitTestRunner/efl/PlatformWebViewEfl.cpp: Removed.
  • WebKitTestRunner/efl/TestControllerEfl.cpp: Removed.
  • WebKitTestRunner/efl/main.cpp: Removed.
  • efl/install-dependencies: Removed.
  • efl/jhbuild-optional.modules: Removed.
  • efl/jhbuild.modules: Removed.
  • efl/jhbuildrc: Removed.
  • efl/patches/evas-fix-build-with-giflib5.patch: Removed.
  • efl/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Removed.
  • efl/patches/gst-libav.patch: Removed.
  • efl/patches/gst-plugins-base-rtp-rtcpbuffer-fix-typo-in-enum.patch: Removed.
  • efl/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
  • efl/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
  • efl/patches/openwebrtc-gst-plugins-clang-warning-fix.patch: Removed.
  • gtk/manifest.txt.in:
2:12 PM Changeset in webkit [215757] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Open the new bug page in the new tab
https://bugs.webkit.org/show_bug.cgi?id=171253

Reviewed by Joseph Pecoraro.

  • UserInterface/Debug/UncaughtExceptionReporter.js:

(createErrorSheet):

1:58 PM Changeset in webkit [215756] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

Supplementary Multilingual Plane Complex Scripts Rendered Incorrectly
https://bugs.webkit.org/show_bug.cgi?id=171272
<rdar://problem/30966764>

Reviewed by Zalan Bujtas.

Source/WebCore:

These scripts need to take the complex text codepath.

Test: fast/text/kaithi.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

  • fast/text/kaithi-expected.html: Added.
  • fast/text/kaithi.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
1:38 PM Changeset in webkit [215755] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: "Space" localized string is not loaded in combined and minified builds
https://bugs.webkit.org/show_bug.cgi?id=171283
<rdar://problem/30871371>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-25
Reviewed by Brian Burg.

In combined and minified builds, the document.write() to load the
localized strings script doesn't happen before the KeyboardShortcut
global code in Main.js evaluates, so there is no UIString because
window.localizedStrings hasn't populated yet. Since this is the only
instance, populate the display UIString lazily and provide warnings
in minified builds if this happens.

  • UserInterface/Base/LoadLocalizedStrings.js:

(WebInspector.UIString):
Provide a warning if a UIString was attempted before the strings have loaded.

  • UserInterface/Base/Main.js:

(WebInspector.loaded):
For this rare instance, populate the display name of the string when we are
sure strings have loaded.

  • UserInterface/Models/KeyboardShortcut.js:

Revert the UIString here, but note that it will be populated later.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.prototype.setCachedResponseBodySize):

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._statusImageContextmenu):
Address console.asserts not ending in semicolon warnings produced during
optimized builds. Without semicolons they are not stripped.

1:33 PM Changeset in webkit [215754] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Revert r215745 (especulative build fix) after r215752.
https://bugs.webkit.org/show_bug.cgi?id=170842

Unreviewed.

  • platform/graphics/harfbuzz/HarfBuzzShaper.cpp:

(WebCore::normalizeCharacters):

1:26 PM Changeset in webkit [215753] by dbates@webkit.org
  • 35 edits
    1 copy
    1 add in trunk

[Cocoa][Win] Enable of X-Content-Type-Options: nosniff header
https://bugs.webkit.org/show_bug.cgi?id=136452
<rdar://problem/23412620>

Reviewed by Brent Fulgham.

.:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsWin.cmake:

LayoutTests/imported/w3c:

Update expected results now we support X-Content-Type-Options: nosniff.

  • web-platform-tests/fetch/nosniff/parsing-nosniff-expected.txt:
  • web-platform-tests/fetch/nosniff/script-expected.txt:
  • web-platform-tests/fetch/nosniff/stylesheet-expected.txt:

Source/JavaScriptCore:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Enable support for X-Content-Type-Options: nosniff on Mac, iOS and Windows.

Additionally, honor X-Content-Type-Options: nosniff header for stylesheets as per
<https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-nosniff%3F> (30 March 2017).

Test: http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked.html

  • Configurations/FeatureDefines.xcconfig:
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet): Log an error if the stylesheet
has the nosniff header and does not have a valid MIME type. Also update code for
renaming of MIMETypeCheck to MIMETypeCheckHint.
(WebCore::StyleSheetContents::notifyLoadedSheet): If the stylesheet is blocked by
nosniff then consider it analogous to a load error so that we dispatch a DOM error
event at the <style>/<link> element.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished): Modified the wording of the error
message when a script is disallowed by nosniff so as to more closely match the
wording used when a stylesheet is disallowed by nonsniff.

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::sheetText): Update for renaming of MIMETypeCheck
to MIMETypeCheckHint.
(WebCore::CachedCSSStyleSheet::responseMIMEType): Added.
(WebCore::CachedCSSStyleSheet::mimeTypeAllowedByNosniff): Added.
(WebCore::CachedCSSStyleSheet::canUseSheet): Modified to check if the X-Content-Type-Options: nosniff
header is in the HTTP response for the stylesheet. If it is then we can only use the stylesheet
if its content-type is "text/css". Otherwise, apply the existing criterion for determining whether
to to use the stylesheet.

  • loader/cache/CachedCSSStyleSheet.h: Rename MIMETypeCheck to MIMETypeCheckHint to better

describe its purpose as a hint as to whether to enforce MIME type checking for the stylesheet.
Processing of the HTTP header X-Content-Type-Options takes precedence over this hint.

  • loader/cache/CachedScript.h: Make mimeType() private.

Source/WebCore/PAL:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

  • Configurations/FeatureDefines.xcconfig:

Tools:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

  • Scripts/webkitperl/FeatureList.pm: Also do not enable nosniff on EFL

as the EFL port is no longer in the WebKit OpenSource repository.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Unskip nosniff tests on Mac, iOS and Windows and update expected results now that
we support X-Content-Type-Options: nosniff.

Merge Blink test from <https://src.chromium.org/viewvc/blink?revision=168570&view=revision>.

  • TestExpectations: Unskip all nosniff tests except imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html.

We need to fix <https://bugs.webkit.org/show_bug.cgi?id=171248> before we can unskip it.
When running the nosniff Web Platform Tests (WPT) dump console messages to standard error
to avoid a difference of console message ordering due to the non-determinism of the WPT
tests from affecting the matching of the expected result.

  • http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked-expected.txt: Added.
  • http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked.html: Copied from LayoutTests/http/tests/security/contentTypeOptions/nosniff-script-blocked.html.
  • http/tests/security/contentTypeOptions/nosniff-script-blocked-expected.txt: Update expected result.
  • http/tests/security/contentTypeOptions/nosniff-script-blocked.html: Substitute the not executable

MIME type "text/xx-javascript" for "text/x-javascript" as the latter is an acceptable MIME type for
JavaScript scripts as per the Fetch standard, <https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type> (30 March 2017).

  • http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked-expected.txt: Update

expected result.

  • platform/gtk/TestExpectations: Skip the nosniff tests as GTK does not enable ENABLE(NOSNIFF).
  • platform/ios/TestExpectations: Unskip nosniff tests.
  • platform/mac/TestExpectations: Ditto.
  • platform/win/TestExpectations: Ditto.
  • platform/wk2/TestExpectations: Ditto.
1:22 PM Changeset in webkit [215752] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[GTK] Build fix after r215737
https://bugs.webkit.org/show_bug.cgi?id=170842

Unreviewed.

No new tests because there is no behavior change.

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript):

12:37 PM Changeset in webkit [215751] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Remove an unnecessary -respondsToSelector: check after r215724

Rubber-stamped by Tim Horton.

Addresses review feedback from <https://bugs.webkit.org/show_bug.cgi?id=171156>. -[NSURL _title]
will always for builds that need to access it.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::readURL):

12:20 PM Changeset in webkit [215750] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

REGRESSION (r215469): [ios-simulator-wk2] LayoutTest compositing/animation/animation-backing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=171060
<rdar://problem/31771174>

Reviewed by Simon Fraser.

Accelerated transform animations move underlying layers without invalidating GraphicsLayers.
To update tile coverage we need to commit such subtrees even if there are not other changes.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::needsCommit):

Commit subtrees with accelerated transform animations.
Factor into a function.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

Track if descendants had any accelerated transform animations after commit.

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::GraphicsLayerCA::hasDescendantsWithRunningTransformAnimations):
(WebCore::GraphicsLayerCA::setHasDescendantsWithRunningTransformAnimations):

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

Web Inspector: TypeError:​ sourceCodeLocation.populateLiveDisplayLocationTooltip is not a function
https://bugs.webkit.org/show_bug.cgi?id=171259

Patch by Fujii Hironori <Fujii Hironori> on 2017-04-25
Reviewed by Joseph Pecoraro.

The first argument of WebInspector.createSourceCodeLocationLink
should be SourceCodeLocation type.

  • UserInterface/Views/TimelineDataGridNode.js:

(WebInspector.TimelineDataGridNode.prototype.createCellContent):
Pass 'callFrame.sourceCodeLocation' instead of 'value' to the
first argument.

12:04 PM Changeset in webkit [215748] by mark.lam@apple.com
  • 6 edits
    1 add in trunk

Local CSE wrongly CSEs array accesses with different result types.
https://bugs.webkit.org/show_bug.cgi?id=170990
<rdar://problem/31705945>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-170990.js: Added.

Source/JavaScriptCore:

The fix is to use different LocationKind enums for the different type of array
result types. This makes the HeapLocation values different based on the result
types, and allows CSE to discern between them.

  • dfg/DFGCSEPhase.cpp:
  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:

(JSC::DFG::indexedPropertyLocForResultType):

11:42 AM Changeset in webkit [215747] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Make DFG SpeculatedType dumps easier to read.
https://bugs.webkit.org/show_bug.cgi?id=171280

Reviewed by Saam Barati.

Adding a pretty printer to insert |s between each type string and changing the
dumped strings to match the SpeculatedType names case-wise.

  • bytecode/SpeculatedType.cpp:

(JSC::PrettyPrinter::PrettyPrinter):
(JSC::PrettyPrinter::print):
(JSC::dumpSpeculation):

  • bytecode/SpeculatedType.h:
11:22 AM Changeset in webkit [215746] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream macOS] Unable to apply frameRate constraint
https://bugs.webkit.org/show_bug.cgi?id=171279

Reviewed by Youenn Fablet.

No new tests, this doesn't affect the mock capture devices.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate): Cast frame rate
ranges to int before comparing.

11:21 AM Changeset in webkit [215745] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Build fix after r215737
https://bugs.webkit.org/show_bug.cgi?id=170842

Unreviewed.

  • platform/graphics/harfbuzz/HarfBuzzShaper.cpp:

(WebCore::normalizeCharacters):

10:44 AM Changeset in webkit [215744] by zandobersek@gmail.com
  • 2 edits in trunk/Tools

Unreviewed follow-up to r215739 and r215740.

  • gtk/jhbuild.modules: List the libgcrypt patch that has to be applied.

This (and r215740) was supposed to land in r215739, but I managed to
specify the previous version of the patch.

10:36 AM Changeset in webkit [215743] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

lowerStackArgs: check Arg::addr.isValidForm when falling back to SP offsets
https://bugs.webkit.org/show_bug.cgi?id=171278

Reviewed by Filip Pizlo.

lowerStackArgs checked that the FP offsets it tries to generate
are valid form, but didn't check that the fallback was valid
form. This lead to stackAddr's assertion being dead, and the
MaroAssembler asserting way later on move / add when handed a huge
immediate.

  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::stackAddrImpl):

10:14 AM Changeset in webkit [215742] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.2.5

Tag Safari-603.2.5.

10:05 AM Changeset in webkit [215741] by wilander@apple.com
  • 19 edits in trunk/Source

Resource Load Statistics: Clear network process cache when clearing store
https://bugs.webkit.org/show_bug.cgi?id=171256
<rdar://problem/31802347>

Reviewed by Brent Fulgham.

Source/WebCore:

Test that covers this code:
http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::clearInMemoryStore):

Better name.

(WebCore::ResourceLoadObserver::logUserInteraction):

Now passes on the boolean parameter clearFirst to
ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().

(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):

Now takes and passes on the boolean parameter clearFirst to
ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().

(WebCore::ResourceLoadObserver::statisticsStore): Deleted.

This getter violated abstraction. The way it was used
is now solved through dedicated functions.

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):

Now passes on the boolean parameter clearFirst to
ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().

(WebCore::ResourceLoadStatisticsStore::clearInMemory):

Better name.
Now triggers clearing of the associated network process cache.

(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):

Now calls clearInMemory().

(WebCore::ResourceLoadStatisticsStore::setShouldPartitionCookiesCallback):

Now expects a handler with the boolean parameter clearFirst.

(WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):

Now takes and passes on the boolean parameter clearFirst to
m_shouldPartitionCookiesForDomainsHandler().

  • loader/ResourceLoadStatisticsStore.h:

(WebCore::ResourceLoadStatisticsStore::clear): Deleted.

  • platform/network/NetworkStorageSession.h:

NetworkStorageSession::setShouldPartitionCookiesForHosts() now
takes the boolean parameter clearFirst.

  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts):

Now clears m_topPrivatelyControlledDomainsForCookiePartitioning
if the boolean parameter clearFirst is true.

Source/WebKit2:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::shouldPartitionCookiesForTopPrivatelyOwnedDomains):

Now takes and passes on the boolean parameter clearFirst to
WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts().

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:

The message ShouldPartitionCookiesForTopPrivatelyOwnedDomains now
takes the boolean parameter clearFirst.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::shouldPartitionCookiesForTopPrivatelyOwnedDomains):

Now takes and passes on the boolean parameter clearFirst to
Messages::NetworkProcess::ShouldPartitionCookiesForTopPrivatelyOwnedDomains.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:

The message ShouldPartitionCookiesForTopPrivatelyOwnedDomains now
takes the boolean parameter clearFirst.

  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):

Now uses the boolean parameter clearFirst when calling
WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler().

(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):

No longer uses the deleted store getter.

(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):

No longer uses the deleted store getter.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):

No sends the boolean parameter clearFirst to
ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

Now expects a handler with the boolean parameter clearFirst.

(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):

  • UIProcess/WebResourceLoadStatisticsStore.h:

Now uses the new WebCore::ResourceLoadObserver::clearInMemoryStore().

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::shouldPartitionCookiesForTopPrivatelyOwnedDomains):

Now takes and passes on the boolean parameter clearFirst in its
message to the network process.

(WebKit::WebsiteDataStore::registerSharedResourceLoadObserver):

Now expects a handler with the boolean parameter clearFirst.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
10:01 AM Changeset in webkit [215740] by zandobersek@gmail.com
  • 1 edit
    1 add in trunk/Tools

Unreviewed follow-up to r215739.

  • gtk/patches/libgcrypt-use-only-dev-urandom-for-testing.patch: Add the missing

libgcrypt patch that enforces the use of /dev/urandom.

9:45 AM Changeset in webkit [215739] by zandobersek@gmail.com
  • 2 edits in trunk/Tools

[GTK] Add libgpg-error, libgcrypt libraries to JHBuild
https://bugs.webkit.org/show_bug.cgi?id=171270

Reviewed by Michael Catanzaro.

  • gtk/jhbuild.modules: Add the latest stable versions of libgpg-error and libgcrypt

libraries to the webkitgtk-testing-dependencies metamodule. This will help people
that use systems that don't yet provide libgcrypt >= 1.7.0.

9:36 AM Changeset in webkit [215738] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/inspector/network/resource-sizes-disk-cache.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170971

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:35 AM Changeset in webkit [215737] by mmaxfield@apple.com
  • 6 edits
    1 add in trunk

Add performance test for FontCache::systemFallbackForCharacters()
https://bugs.webkit.org/show_bug.cgi?id=170842

Reviewed by Tim Horton.

PerformanceTests:

  • Layout/word-joiner.html: Added.

Source/WebCore:

No new tests because there is no behavior change.

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript): Deleted.

  • platform/graphics/WidthCache.h:

(WebCore::WidthCache::add):
(WebCore::WidthCache::addSlowCase):

Source/WTF:

  • wtf/unicode/CharacterNames.h:
9:29 AM Changeset in webkit [215736] by Chris Dumez
  • 11 edits
    3 adds in trunk

Content-Disposition header filename is ignored when 'download' attribute is specified in HTML
https://bugs.webkit.org/show_bug.cgi?id=171239
<rdar://problem/31789855>

Reviewed by Alex Christensen.

Source/WebCore:

Add isAttachmentWithFilename() utility method to ResourceResponse to implement:

Test: http/tests/download/anchor-download-attribute-content-disposition.html

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::isAttachmentWithFilename):

  • platform/network/ResourceResponseBase.h:

Source/WebKit2:

Content-Disposition header filename is ignored when 'download' attribute is specified in HTML.
This is not as per HTML specification:

Content-Disposition header filename is supposed to override the value of the download attribute.

Firefox and Chrome follow the specification.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didReceiveResponse):

LayoutTests:

  • http/tests/security/anchor-download-allow-sameorigin.html:

Stop using attachment.php as resource for this download attribute test because attachment.php
returns a Content-Disposition header with a filename. Given the behavior change in this patch,
this resource is no longer suitable for testing the download attribute.

  • http/tests/download/anchor-download-attribute-content-disposition-expected.txt: Added.
  • http/tests/download/anchor-download-attribute-content-disposition.html: Added.
  • http/tests/download/resources/content-disposition-pass.php: Added.

Add layout test coverage.

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

Skip new test on platforms where the download attribute is not supported.

9:10 AM Changeset in webkit [215735] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Improve an unit test for the JHBuild wrapper.
https://bugs.webkit.org/show_bug.cgi?id=168036

Unreviewed follow-up patch after r215727

  • Scripts/webkitpy/port/base_unittest.py:

(test_jhbuild_wrapper): Improve the unit test by ensuring the directory
wasn't there before calling MockFileSystem.maybe_make_directory(), and
also that it exists after calling it.

9:03 AM Changeset in webkit [215734] by Ryan Haddad
  • 1 edit
    3 adds in trunk/LayoutTests

Rebaseline fast/canvas/canvas-crash.html for ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=171238

Unreviewed test gardening.

  • platform/ios-simulator/fast/canvas/canvas-crash-expected.txt: Added.
8:36 AM Changeset in webkit [215733] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

WebAssembly: exporting a property with a name that's a number doesn't work
https://bugs.webkit.org/show_bug.cgi?id=168857

Reviewed by JF Bastien.

r213453 allows Wasm instances to expose indexed properties. We activate the tests.

  • wasm/js-api/test_Instance.js:

(ExportedNumber):

8:24 AM Changeset in webkit [215732] by Carlos Garcia Campos
  • 6 edits
    2 adds in trunk/Source

[GTK] Add WebKitInspectorWindow to create inspector windows from local and remote inspector
https://bugs.webkit.org/show_bug.cgi?id=171261

Reviewed by Michael Catanzaro.

Source/WebCore/platform/gtk/po:

Remove WebInspectorProxyGtk.cpp and RemoteWebInspectorProxyGtk.cpp from POTFILES.in and add WebKitInspectorWindow.cpp.

  • POTFILES.in:

Source/WebKit2:

The code is currently duplicated in WebInspectorProxyGtk.cpp and RemoteWebInspectorProxyGtk.cpp. We can simplify
it by using a common widget in both places.
This patch also fixes the build when using GTK+ < 3.16.

  • PlatformGTK.cmake:
  • UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:

(WebKit::RemoteWebInspectorProxy::updateWindowTitle):
(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::updateInspectorWindowTitle):

  • UIProcess/gtk/WebKitInspectorWindow.cpp: Added.

(webkit_inspector_window_class_init):
(webkit_inspector_window_init):
(webkitInspectorWindowNew):
(webkitInspectorWindowSetSubtitle):

  • UIProcess/gtk/WebKitInspectorWindow.h: Added.
7:15 AM Changeset in webkit [215731] by zandobersek@gmail.com
  • 2 edits in trunk/Source/JavaScriptCore

[aarch64] moveConditionally32(), moveConditionallyTest32() should move from/to 64-bit registers
https://bugs.webkit.org/show_bug.cgi?id=170891

Reviewed by Saam Barati.

moveConditionally32() and moveConditionallyTest32() operations in
MacroAssemblerARM64 properly perform comparisons and tests on 32-bit
values, but end up performing the moves from and to 32-bit registers.

Move operations should instead be done on 64-bit registers, just like
on the X86_64 platform. This is achieved by specifying 64 as the data
size for the csel instructions.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveConditionallyTest32):

7:14 AM Changeset in webkit [215730] by Antti Koivisto
  • 8 edits in trunk

Enable expired-only reload policy on Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=171264
<rdar://problem/31807637>

Reviewed by Andreas Kling.

Source/WebCore:

  • loader/NavigationAction.cpp:

(WebCore::navigationType):

Test for reload navigation type correctly.

Source/WebKit2:

Enable the reload policy where only expired subresources are revalidated on Mac and iOS.
The behavor is enabled in Safari and for other clients based on SDK version check.

  • UIProcess/API/C/WKPage.cpp:

(WKPageReload):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView reload]):

  • UIProcess/Cocoa/VersionChecks.h:

LayoutTests:

  • fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html:

WebKitDisplayImages preference blocks loads, it does not prevent images already in memory cache from displaying.
Modify the test to clear the memory cache so it still tests what it is supposed to.

5:35 AM Changeset in webkit [215729] by magomez@igalia.com
  • 9 edits in trunk/Source/WebCore

Image decoders must have private constructors to avoid refcount misuse: ASSERTION FAILED: m_deletionHasBegun when destroying ImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=171211

Reviewed by Carlos Garcia Campos.

Add a create method to each of the decoders and set their constructors as private. Change
ICOImageDecoder to store its internal PNG decoders as RefPtr and use the new create method, and
change ImageDecoder to use the create methods as well.

Covered by existent tests.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::create):

  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::decodeAtIndex):

  • platform/image-decoders/ico/ICOImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/png/PNGImageDecoder.h:
  • platform/image-decoders/webp/WEBPImageDecoder.h:
5:16 AM Changeset in webkit [215728] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix

Unreviewed.

No new tests because there is no behavior change.

  • crypto/mac/SerializedCryptoKeyWrapMac.mm:

(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):

3:48 AM Changeset in webkit [215727] by clopez@igalia.com
  • 5 edits
    1 delete in trunk/Tools

[GTK] ImageDiff should be run by jhbuild-wrapper in case of using jhbuild
https://bugs.webkit.org/show_bug.cgi?id=168036

Reviewed by Michael Catanzaro.

Call ImageDiff with the JHBuild wrapper if we should use it.
Also add some unit tests for the JHBuild wrapper feature.

  • Scripts/webkitpy/port/base.py:

(Port._should_use_jhbuild): Use self._filesystem instead of os.path to allow mock testing.

  • Scripts/webkitpy/port/base_unittest.py:

(test_jhbuild_wrapper): Add a test for port._should_use_jhbuild()

  • Scripts/webkitpy/port/image_diff.py:

(ImageDiffer._start): The actual fix, use the wrapper if we should.

  • Scripts/webkitpy/port/image_diff_unittest.py: Removed. This two tests are now integrated in port_testcase
  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase):
(PortTestCase.test_diff_image): Test the command with wrapper and without it.
(PortTestCase.test_diff_image_passed): Moved from image_diff_unittest.py
(PortTestCase.test_diff_image_failed): Moved from image_diff_unittest.py

1:46 AM Changeset in webkit [215726] by fred.wang@free.fr
  • 5 edits
    123 adds in trunk/LayoutTests

Import W3C tests for the CSSOM View module
https://bugs.webkit.org/show_bug.cgi?id=171215

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-25
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

This patch imports "cssom-view" test suite from WPT repo:
https://github.com/w3c/web-platform-tests/tree/master/cssom-view

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/cssom-view/CaretPosition-001-expected.txt: Added.
  • web-platform-tests/cssom-view/CaretPosition-001.html: Added.
  • web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt: Added.
  • web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode.html: Added.
  • web-platform-tests/cssom-view/MediaQueryList-001-expected.txt: Added.
  • web-platform-tests/cssom-view/MediaQueryList-001.html: Added.
  • web-platform-tests/cssom-view/MediaQueryList-with-empty-string-expected.txt: Added.
  • web-platform-tests/cssom-view/MediaQueryList-with-empty-string.html: Added.
  • web-platform-tests/cssom-view/OWNERS: Added.
  • web-platform-tests/cssom-view/Screen-pixelDepth-Screen-colorDepth001-expected.txt: Added.
  • web-platform-tests/cssom-view/Screen-pixelDepth-Screen-colorDepth001.html: Added.
  • web-platform-tests/cssom-view/cssom-getBoundingClientRect-001-expected.txt: Added.
  • web-platform-tests/cssom-view/cssom-getBoundingClientRect-001.html: Added.
  • web-platform-tests/cssom-view/cssom-getBoundingClientRect-002.html: Added.
  • web-platform-tests/cssom-view/cssom-getClientRects-expected.txt: Added.
  • web-platform-tests/cssom-view/cssom-getClientRects.html: Added.
  • web-platform-tests/cssom-view/cssom-view-img-attributes-001-expected.txt: Added.
  • web-platform-tests/cssom-view/cssom-view-img-attributes-001.html: Added.
  • web-platform-tests/cssom-view/cssom-view-window-screen-interface-expected.txt: Added.
  • web-platform-tests/cssom-view/cssom-view-window-screen-interface.html: Added.
  • web-platform-tests/cssom-view/cssom-view/media-query-list-interface.xht: Added.
  • web-platform-tests/cssom-view/cssom-view/w3c-import.log: Added.
  • web-platform-tests/cssom-view/cssom-view/window-interface-expected.txt: Added.
  • web-platform-tests/cssom-view/cssom-view/window-interface.xht: Added.
  • web-platform-tests/cssom-view/elementFromPoint-001-expected.txt: Added.
  • web-platform-tests/cssom-view/elementFromPoint-001.html: Added.
  • web-platform-tests/cssom-view/elementFromPoint-expected.txt: Added.
  • web-platform-tests/cssom-view/elementFromPoint.html: Added.
  • web-platform-tests/cssom-view/elementFromPosition-expected.txt: Added.
  • web-platform-tests/cssom-view/elementFromPosition.html: Added.
  • web-platform-tests/cssom-view/elementScroll-expected.txt: Added.
  • web-platform-tests/cssom-view/elementScroll.html: Added.
  • web-platform-tests/cssom-view/elementsFromPoint.html: Added.
  • web-platform-tests/cssom-view/historical-expected.txt: Added.
  • web-platform-tests/cssom-view/historical.html: Added.
  • web-platform-tests/cssom-view/htmlelement-offset-width-001-expected.txt: Added.
  • web-platform-tests/cssom-view/htmlelement-offset-width-001.html: Added.
  • web-platform-tests/cssom-view/iframe.html: Added.
  • web-platform-tests/cssom-view/matchMedia-expected.txt: Added.
  • web-platform-tests/cssom-view/matchMedia.xht: Added.
  • web-platform-tests/cssom-view/matchMediaAddListener-expected.txt: Added.
  • web-platform-tests/cssom-view/matchMediaAddListener.html: Added.
  • web-platform-tests/cssom-view/mouseEvent-expected.txt: Added.
  • web-platform-tests/cssom-view/mouseEvent.html: Added.
  • web-platform-tests/cssom-view/negativeMargins-expected.txt: Added.
  • web-platform-tests/cssom-view/negativeMargins.html: Added.
  • web-platform-tests/cssom-view/offsetParent_element_test-expected.txt: Added.
  • web-platform-tests/cssom-view/offsetParent_element_test.html: Added.
  • web-platform-tests/cssom-view/scrollWidthHeight-expected.txt: Added.
  • web-platform-tests/cssom-view/scrollWidthHeight.xht: Added.
  • web-platform-tests/cssom-view/scrollWidthHeightWhenNotScrollable-expected.txt: Added.
  • web-platform-tests/cssom-view/scrollWidthHeightWhenNotScrollable.xht: Added.
  • web-platform-tests/cssom-view/scrolling-no-browsing-context-expected.txt: Added.
  • web-platform-tests/cssom-view/scrolling-no-browsing-context.html: Added.
  • web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt: Added.
  • web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks.html: Added.
  • web-platform-tests/cssom-view/scrollingElement.html: Added.
  • web-platform-tests/cssom-view/support/1x1-green.png: Added.
  • web-platform-tests/cssom-view/support/1x1-lime.png: Added.
  • web-platform-tests/cssom-view/support/1x1-maroon.png: Added.
  • web-platform-tests/cssom-view/support/1x1-navy.png: Added.
  • web-platform-tests/cssom-view/support/1x1-red.png: Added.
  • web-platform-tests/cssom-view/support/1x1-white.png: Added.
  • web-platform-tests/cssom-view/support/60x60-gg-rr.png: Added.
  • web-platform-tests/cssom-view/support/60x60-green.png: Added.
  • web-platform-tests/cssom-view/support/60x60-red.png: Added.
  • web-platform-tests/cssom-view/support/README: Added.
  • web-platform-tests/cssom-view/support/a-green.css: Added.

(.a):

  • web-platform-tests/cssom-view/support/b-green.css: Added.

(.b):

  • web-platform-tests/cssom-view/support/c-red.css: Added.

(.c):

  • web-platform-tests/cssom-view/support/cat.png: Added.
  • web-platform-tests/cssom-view/support/import-green.css: Added.

(.import):

  • web-platform-tests/cssom-view/support/import-red.css: Added.

(.import):

  • web-platform-tests/cssom-view/support/pattern-grg-rgr-grg.png: Added.
  • web-platform-tests/cssom-view/support/pattern-grg-rrg-rgg.png: Added.
  • web-platform-tests/cssom-view/support/pattern-rgr-grg-rgr.png: Added.
  • web-platform-tests/cssom-view/support/pattern-tr.png: Added.
  • web-platform-tests/cssom-view/support/ruler-h-50%.png: Added.
  • web-platform-tests/cssom-view/support/ruler-h-50px.png: Added.
  • web-platform-tests/cssom-view/support/ruler-v-100px.png: Added.
  • web-platform-tests/cssom-view/support/ruler-v-50px.png: Added.
  • web-platform-tests/cssom-view/support/square-purple.png: Added.
  • web-platform-tests/cssom-view/support/square-teal.png: Added.
  • web-platform-tests/cssom-view/support/square-white.png: Added.
  • web-platform-tests/cssom-view/support/support/README: Added.
  • web-platform-tests/cssom-view/support/support/swatch-green.png: Added.
  • web-platform-tests/cssom-view/support/support/swatch-red.png: Added.
  • web-platform-tests/cssom-view/support/support/w3c-import.log: Added.
  • web-platform-tests/cssom-view/support/swatch-blue.png: Added.
  • web-platform-tests/cssom-view/support/swatch-green.png: Added.
  • web-platform-tests/cssom-view/support/swatch-lime.png: Added.
  • web-platform-tests/cssom-view/support/swatch-orange.png: Added.
  • web-platform-tests/cssom-view/support/swatch-red.png: Added.
  • web-platform-tests/cssom-view/support/swatch-teal.png: Added.
  • web-platform-tests/cssom-view/support/swatch-white.png: Added.
  • web-platform-tests/cssom-view/support/swatch-yellow.png: Added.
  • web-platform-tests/cssom-view/support/test-bl.png: Added.
  • web-platform-tests/cssom-view/support/test-br.png: Added.
  • web-platform-tests/cssom-view/support/test-inner-half-size.png: Added.
  • web-platform-tests/cssom-view/support/test-outer.png: Added.
  • web-platform-tests/cssom-view/support/test-tl.png: Added.
  • web-platform-tests/cssom-view/support/test-tr.png: Added.
  • web-platform-tests/cssom-view/support/w3c-import.log: Added.
  • web-platform-tests/cssom-view/ttwf-js-cssomview-getclientrects-length-expected.txt: Added.
  • web-platform-tests/cssom-view/ttwf-js-cssomview-getclientrects-length.html: Added.
  • web-platform-tests/cssom-view/ttwf-scrollintoview-expected.txt: Added.
  • web-platform-tests/cssom-view/ttwf-scrollintoview.html: Added.
  • web-platform-tests/cssom-view/w3c-import.log: Added.
  • web-platform-tests/cssom-view/window-screen-height-expected.txt: Added.
  • web-platform-tests/cssom-view/window-screen-height-immutable-expected.txt: Added.
  • web-platform-tests/cssom-view/window-screen-height-immutable.html: Added.
  • web-platform-tests/cssom-view/window-screen-height.html: Added.
  • web-platform-tests/cssom-view/window-screen-width-expected.txt: Added.
  • web-platform-tests/cssom-view/window-screen-width-immutable-expected.txt: Added.
  • web-platform-tests/cssom-view/window-screen-width-immutable.html: Added.
  • web-platform-tests/cssom-view/window-screen-width.html: Added.

LayoutTests:

  • TestExpectations: Skip some completely failing CSSOM View tests.
  • platform/ios-simulator/imported/w3c/web-platform-tests/cssom-view/Screen-pixelDepth-Screen-colorDepth001-actual.txt: Added. Add an expectation for iOS simulator, differing from other platform.
  • platform/ios-simulator/imported/w3c/web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt: Added. Ditto.
12:41 AM Changeset in webkit [215725] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/WebCore/platform/gtk/po

[GTK] Add po/Makevars
https://bugs.webkit.org/show_bug.cgi?id=170012

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-04-25
Reviewed by Carlos Garcia Campos.

12:00 AM Changeset in webkit [215724] by Wenson Hsieh
  • 24 edits in trunk

Support reading NSURL titles from the pasteboard when performing data interaction
https://bugs.webkit.org/show_bug.cgi?id=171156
<rdar://problem/31356937>

Reviewed by Tim Horton.

Source/WebCore:

Support reading link titles from the pasteboard when performing data interaction. To do this, we refactor
Pasteboard::readURL to take in an additional String& title which is ultimately plumbed to the PlatformPasteboard
where it is set to the value of -[NSURL _title].

Test: DataInteractionTests.ExternalSourceTitledNSURL.

  • editing/FrameSelection.h:
  • editing/ios/EditorIOS.mm:

(WebCore::Editor::WebContentReader::readURL):

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):
(WebCore::DragController::concludeEditDrag):

Move calls to clearDragCaret() out of concludeEditDrag and into the call site, in performDragOperation after
attempting to concludeEditDrag. This is done so that if the WebEditorClient queries whether the drag caret is
in richly editable content for the purposes of generating a document fragment to insert, the answer will not
always be false as a drop is occurring.

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::respectsUTIFidelities):
(WebCore::Pasteboard::readString):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::readURL):

Source/WebKit/mac:

Add a new WK1 SPI property, -[WebFrame hasRichlyEditableDragCaret].

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::readURLFromPasteboard):

  • WebView/WebFrame.mm:

(-[WebFrame hasRichlyEditableDragCaret]):

  • WebView/WebFramePrivate.h:

Source/WebKit2:

Adjust for interface changes in WebCore to support plumbing the title of an NSURL from the platform pasteboard
back to WebCore. Additionally, implement WebEditorClient::hasRichlyEditableSelection (which previously returned
false) to check whether the current selection is richly editable, or the drop caret is in richly editable content.
See WebCore ChangeLog for more details.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::readURLFromPasteboard):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::readURLFromPasteboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:

(WebKit::WebEditorClient::hasRichlyEditableSelection):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::hasRichlyEditableSelection):

  • WebProcess/WebPage/WebPage.h:

Tools:

Adds a new unit test, DataInteractionTests.ExternalSourceTitledNSURL.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

Apr 24, 2017:

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

test262: test262/test/language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js
https://bugs.webkit.org/show_bug.cgi?id=171190

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-24
Reviewed by Saam Barati.

JSTests:

  • stress/async-await-syntax.js:
  • test262.yaml:

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunctionExpressionCommon):
(JSC::BytecodeGenerator::emitNewFunction):

  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionNode::emitBytecode):
(JSC::Scope::setSourceParseMode):

  • parser/ParserModes.h:

(JSC::isFunctionParseMode):
(JSC::isMethodParseMode):
(JSC::isGeneratorOrAsyncFunctionWrapperParseMode):
(JSC::isGeneratorParseMode):
(JSC::isGeneratorWrapperParseMode):

  • runtime/FunctionExecutable.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::getOwnPropertySlot):
Add a new GeneratorWrapperMethodMode parse mode. The other function types
(async, arrow) already have a FunctionMode and a MethodMode. Give
generators one as well. This lets isMethodParseMode actually be accurate.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::isArrowFunctionParameters):
(JSC::Parser<LexerType>::parseFormalParameters):
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parsePropertyMethod):

  • parser/Parser.h:

Add a duplicate parameter failure if there are duplicate parameters
in method syntax.

LayoutTests:

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:

Extend to cover method duplicate parameter cases.

10:19 PM Changeset in webkit [215722] by commit-queue@webkit.org
  • 90 edits in trunk/Source

Clean up ICU headers
https://bugs.webkit.org/show_bug.cgi?id=170997

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-24
Reviewed by JF Bastien.

Update all icu headers to 55.1

Source/JavaScriptCore:

  • icu/LICENSE: Update copyright
  • icu/README: Explain ICU headers for OS X better
  • icu/unicode/localpointer.h:

(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):

  • icu/unicode/platform.h:
  • icu/unicode/putil.h:
  • icu/unicode/ucal.h:
  • icu/unicode/uchar.h:
  • icu/unicode/ucnv.h:
  • icu/unicode/ucol.h:
  • icu/unicode/uconfig.h:
  • icu/unicode/ucurr.h:
  • icu/unicode/udatpg.h:
  • icu/unicode/udisplaycontext.h:
  • icu/unicode/uformattable.h:
  • icu/unicode/uloc.h:
  • icu/unicode/umachine.h:
  • icu/unicode/unum.h:
  • icu/unicode/unumsys.h:
  • icu/unicode/urename.h:
  • icu/unicode/uscript.h:
  • icu/unicode/uset.h:
  • icu/unicode/ustring.h:
  • icu/unicode/utf8.h:
  • icu/unicode/utypes.h:

Source/WebCore:

  • icu/LICENSE: Update copyright
  • icu/README: Explain ICU headers for OS X better
  • icu/unicode/localpointer.h:

(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):

  • icu/unicode/platform.h:
  • icu/unicode/putil.h:
  • icu/unicode/std_string.h:
  • icu/unicode/ubrk.h:
  • icu/unicode/uchar.h:
  • icu/unicode/ucnv.h:
  • icu/unicode/ucol.h:
  • icu/unicode/ucoleitr.h:
  • icu/unicode/uconfig.h:
  • icu/unicode/ucurr.h:
  • icu/unicode/uidna.h:
  • icu/unicode/uloc.h:
  • icu/unicode/umachine.h:
  • icu/unicode/unistr.h:

(UnicodeString::getArrayStart):
(UnicodeString::UnicodeString):
(UnicodeString::hasShortLength):
(UnicodeString::getShortLength):
(UnicodeString::length):
(UnicodeString::getCapacity):
(UnicodeString::isBogus):
(UnicodeString::isWritable):
(UnicodeString::isBufferWritable):
(UnicodeString::getBuffer):
(UnicodeString::isEmpty):
(UnicodeString::setZeroLength):
(UnicodeString::setShortLength):
(UnicodeString::setLength):
(UnicodeString::setToEmpty):
(UnicodeString::remove):

  • icu/unicode/urename.h:
  • icu/unicode/uscript.h:
  • icu/unicode/usearch.h:
  • icu/unicode/uset.h:
  • icu/unicode/ustring.h:
  • icu/unicode/utf8.h:
  • icu/unicode/utypes.h:
  • icu/unicode/uvernum.h:

Source/WebKit/mac:

  • icu/README: Explain ICU headers for OS X better
  • icu/unicode/localpointer.h:

(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):

  • icu/unicode/platform.h:
  • icu/unicode/putil.h:
  • icu/unicode/uchar.h:
  • icu/unicode/uconfig.h:
  • icu/unicode/ucurr.h:
  • icu/unicode/uidna.h:
  • icu/unicode/umachine.h:
  • icu/unicode/urename.h:
  • icu/unicode/uscript.h:
  • icu/unicode/ustring.h:
  • icu/unicode/utf8.h:
  • icu/unicode/utypes.h:
  • icu/unicode/uvernum.h:

Source/WTF:

  • icu/LICENSE: Update copyright
  • icu/README: Explain ICU headers for OS X better
  • icu/unicode/localpointer.h:

(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):

  • icu/unicode/platform.h:
  • icu/unicode/putil.h:
  • icu/unicode/std_string.h:
  • icu/unicode/ubrk.h:
  • icu/unicode/uchar.h:
  • icu/unicode/ucnv.h:
  • icu/unicode/ucol.h:
  • icu/unicode/uconfig.h:
  • icu/unicode/ucurr.h:
  • icu/unicode/uloc.h:
  • icu/unicode/umachine.h:
  • icu/unicode/unistr.h:

(UnicodeString::getArrayStart):
(UnicodeString::UnicodeString):
(UnicodeString::hasShortLength):
(UnicodeString::getShortLength):
(UnicodeString::length):
(UnicodeString::getCapacity):
(UnicodeString::isBogus):
(UnicodeString::isWritable):
(UnicodeString::isBufferWritable):
(UnicodeString::getBuffer):
(UnicodeString::isEmpty):
(UnicodeString::setZeroLength):
(UnicodeString::setShortLength):
(UnicodeString::setLength):
(UnicodeString::setToEmpty):
(UnicodeString::remove):

  • icu/unicode/urename.h:
  • icu/unicode/uscript.h:
  • icu/unicode/uset.h:
  • icu/unicode/ustring.h:
  • icu/unicode/utf8.h:
  • icu/unicode/utypes.h:
  • icu/unicode/uvernum.h:
10:10 PM Changeset in webkit [215721] by jiewen_tan@apple.com
  • 4 edits in trunk

LayoutTests crypto/subtle/ecdsa-generate-key-sign-verify-p384.html and crypto/subtle/ecdsa-generate-key-sign-verify-p256.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=171059
<rdar://problem/31734958>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by existing tests.

  • crypto/mac/CryptoAlgorithmECDSAMac.cpp:

(WebCore::signECDSA):

Enhance ways to convert the DER signatures produced from CommonCrypto to r
s.

LayoutTests:

Remove test expectations.

10:09 PM Changeset in webkit [215720] by Yusuke Suzuki
  • 10 edits
    3 adds in trunk

[JSC] Use JSFixedArray directly when using call_varargs
https://bugs.webkit.org/show_bug.cgi?id=171057

Reviewed by Saam Barati.

JSTests:

  • stress/spread-capture-rest.js: Added.

(shouldBe):
(capture):
(a):
(b):

  • stress/spread-multi-layers.js: Added.

(shouldBe):
(a):
(b):
(c):
(d):

  • stress/spread-non-varargs.js: Added.

(shouldBe):
(a):
(b):

Source/JavaScriptCore:

Previously we always emit new_array_with_spread when calling call(...args).
But this array is unnecessary if varargs operation can handle Spread directly.

This patch implements a peep-hole optimization in the bytecode compiler layer
to omit new_array_with_spread. This is very simple and effective because this
peep-hole optimization is quite common when using (...args) style calls and
this optimization works all the tiers. While we can implement the phase to
omit this NewArrayWithSpread in argument elimination phase, it only works
for FTL. While such an optimization can work with complex data flow, this
peep-hole optimization can optimize a common case easily.

For now, Spread and PhantomSpread can be directly drained by CallVarargs
and LoadVarargs related operations. We modify DFG and FTL to handle this correctly.

This shows six-speed improvement.

spread.es6 89.4300+-2.0236 69.6015+-1.7278 definitely 1.2849x faster
spread-generator.es6 344.7879+-5.9147 331.2712+-6.8610 definitely 1.0408x faster

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargsWithSpread):

  • interpreter/Interpreter.cpp:

(JSC::sizeOfVarargs):
(JSC::loadVarargs):

  • parser/Nodes.h:

(JSC::ArrayNode::elements):

  • runtime/JSFixedArray.cpp:

(JSC::JSFixedArray::copyToArguments):

  • runtime/JSFixedArray.h:
9:58 PM Changeset in webkit [215719] by Manuel Rego Casasnovas
  • 4 edits in trunk

[selectors4] :focus-within should use the flat tree
https://bugs.webkit.org/show_bug.cgi?id=170899

Reviewed by Antti Koivisto.

Source/WebCore:

This has been discussed in the following CSS WG issue:
https://github.com/w3c/csswg-drafts/issues/1135

And the spec has been updated (https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo):
"An element also matches :focus-within if one of its descendants in the flat tree

(including non-element nodes, such as text nodes) matches the conditions for matching :focus."

Test: imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-006.html

  • dom/Element.cpp:

(WebCore::Element::setFocus): Use "flat tree" ("composed tree" in WebKit)
to set focus-within flag.

LayoutTests:

8:48 PM Changeset in webkit [215718] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] Fix extraction of translator comments
https://bugs.webkit.org/show_bug.cgi?id=170012

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-04-24
Reviewed by Michael Catanzaro.

  • CMakeLists.txt: Remove “TRANSLATORS:” header, as it’s not used and might block extraction of translator comments.
8:23 PM Changeset in webkit [215717] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

Unreviewed, fix Windows build after r215715
https://bugs.webkit.org/show_bug.cgi?id=171199

  • wtf/StackTrace.h:
8:21 PM Changeset in webkit [215716] by jcraig@apple.com
  • 1 edit
    3 adds in trunk/Websites/webkit.org

2017-04-24 James Craig <jcraig@apple.com>

Upload demo files for prefers-reduced-motion post
https://bugs.webkit.org/show_bug.cgi?id=170663

Rubber stamped by Jon Davis.

  • blog-files/prefers-reduced-motion: Added.
  • blog-files/prefers-reduced-motion/axi.png: Added.
  • blog-files/prefers-reduced-motion/prm.htm: Added.
7:53 PM Changeset in webkit [215715] by Yusuke Suzuki
  • 12 edits
    1 copy
    2 moves in trunk/Source

[WTF] Move JSC tools/StackTrace to WTF and unify stack trace dump code
https://bugs.webkit.org/show_bug.cgi?id=171199

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch adds a utility method to produce demangled names with dladdr.
It fixes several memory leaks because the result of abi::cxa_demangle()
needs to be free-ed.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::displayName):

  • tools/CellProfile.h:
  • tools/CodeProfile.cpp:

(JSC::CodeProfile::report):
(JSC::symbolName): Deleted.

Source/WTF:

JSC tools/StackTrace's dump code is almost identical to WTF Assertions'
stack trace dump code. This patch moves tools/StackTrace to WTF and use
it in Assertions. It unifies the two duplicate implementations into one.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Assertions.cpp:
  • wtf/CMakeLists.txt:
  • wtf/Platform.h:
  • wtf/StackTrace.cpp: Renamed from Source/JavaScriptCore/tools/StackTrace.cpp.

(WTF::StackTrace::captureStackTrace):
(WTF::StackTrace::dump):

  • wtf/StackTrace.h: Copied from Source/JavaScriptCore/tools/StackTrace.h.

(WTF::StackTrace::StackTrace):
(WTF::StackTrace::stack):
(WTF::StackTrace::DemangleEntry::mangledName):
(WTF::StackTrace::DemangleEntry::demangledName):
(WTF::StackTrace::DemangleEntry::DemangleEntry):

  • wtf/SystemFree.h: Renamed from Source/JavaScriptCore/tools/StackTrace.h.

(WTF::SystemFree::operator()):

7:35 PM Changeset in webkit [215714] by Wenson Hsieh
  • 21 edits
    1 delete in trunk

Respect fidelity order when reading web content from item providers
https://bugs.webkit.org/show_bug.cgi?id=171155
<rdar://problem/31356937>

Reviewed by Tim Horton.

Source/WebCore:

Currently, when reading web content from pasteboards, we assume the old UIPasteboard/NSPasteboard model wherein
the destination must determine which of the items is considered to have the highest fidelity for the purposes of
inserting into an editable area. This destination-side fidelity ranking is determined solely by the NSArray
returned from Pasteboard::supportedPasteboardTypes, which lists compatible types in order from highest fidelity
to lowest fidelity. Pasteboard::read effectively iterates over this list of types in order, attempting to read
highest fidelity types and bailing when it first successfully reads data.

However, when our pasteboard is backed by UIItemProviders, we should instead read pasteboard types in order of
fidelity as specified by the source rather than the destination. To accomplish this, we introduce an alternate
codepath, Pasteboard::readRespectingUTIFidelities, which we take if Pasteboard::respectsUTIFidelities is true
(currently, this only applies for the purposes of data interaction). This version follows a different flow:
for each item in the pasteboard, we ask for just the UTIs for that item, in order of fidelity. For each item,
we then call readPasteboardWebContentDataForType to try and read data for that type, continuing until either
all UTIs have been attempted, or reading was successful.

This patch makes two additional adjustments. First, we introduce Pasteboard::getTypesByFidelityForItemAtIndex,
which is used by Pasteboard::readRespectingUTIFidelities when querying the list of supported UTIs for each
pasteboard item, sorted by highest to lowest fidelity.

Secondly, we refactor logic to write to the item provider pasteboard in PlatformPasteboardIOS. Since we are
now respecting fidelity rankings on the destination, the source must also register UTI types in the right
fidelity order. While this was mostly achieved using our existing method of writing a list of object
representations to the pasteboard and then all of the contents of a NSString => NSData dictionary containing
private UTI data, this approach has two flaws:

  1. We are unable to register high-priority custom types, followed by representing objects, followed by more

lower-priority custom types, since we assume that all custom types follow all representing objects.

  1. Since we're just iterating over a dictionary of NSString => NSData when registering custom UTI

representations to the item provider, there cannot inherently be any fidelity ordering for custom types.

To address both of these issues, we introduce two new objects that encapsulate how we register data to the item
provider pasteboard. WebItemProviderRegistrationInfo represents some data that can be registered to an item
provider (either an object conforming to UIItemProviderWriting, or an NSString and NSData).
WebItemProviderRegistrationInfoList represents a list of WebItemProviderRegistrationInfos in order of highest to
lowest fidelity. In PlatformPasteboardIOS, we transform PasteboardWebContent, PasteboardImage, and PasteboardURL
into a WebItemProviderRegistrationInfoList, which we then pass along to the WebItemProviderPasteboard. In
WebItemProviderPasteboard, we traverse the list of WebItemProviderRegistrationInfos in the list and register
each WebItemProviderRegistrationInfo's representing object or data to the item provider.

Test: DataInteractionTests.RespectsExternalSourceFidelityRankings.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/Pasteboard.h:
  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/AbstractPasteboard.h:
  • platform/ios/AbstractPasteboard.mm: Removed.

Moves WebItemProviderData, formerly implemented in AbstractPasteboard.mm, into WebItemProviderPasteboard.mm.
We can delete AbstractPasteboard.mm as a result.

  • platform/ios/PasteboardIOS.mm:

(WebCore::readPasteboardWebContentDataForType):

Pull out common logic for reading data given a UTI type from the pasteboard into the PasteboardWebContentReader.
This is invoked from both the existing Pasteboard::read codepath, as well as the readRespectingUTIFidelities
codepath.

(WebCore::Pasteboard::read):

Refactored to call the new readPasteboardWebContentDataForType helper. Behavior should not have changed, unless
the pasteboard supports UTI fidelities.

(WebCore::Pasteboard::respectsUTIFidelities):
(WebCore::Pasteboard::readRespectingUTIFidelities):

An alternative to Pasteboard::read that considers source-side fidelity rankings of UTIs.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::getTypesByFidelityForItemAtIndex):
(WebCore::PlatformPasteboard::writeObjectRepresentations):

Refactored to build a WebItemProviderRegistrationInfoList and pass it to the WebItemProviderPasteboard to
register items and data.

(WebCore::PlatformPasteboard::write):

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderRegistrationInfo initWithRepresentingObject:typeIdentifier:data:]):
(-[WebItemProviderRegistrationInfo representingObject]):
(-[WebItemProviderRegistrationInfo typeIdentifier]):
(-[WebItemProviderRegistrationInfo data]):

Represents a single calls to register data onto the item provider pasteboard. See
WebItemProviderPasteboard.h header comments for more info.

(-[WebItemProviderRegistrationInfoList init]):
(-[WebItemProviderRegistrationInfoList addData:forType:]):
(-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
(-[WebItemProviderRegistrationInfoList numberOfItems]):
(-[WebItemProviderRegistrationInfoList itemAtIndex:]):
(-[WebItemProviderRegistrationInfoList enumerateItems:]):

Represents a series of calls to register representations onto the item provider pasteboard. See
WebItemProviderPasteboard.h header comments for more info.

(-[WebItemProviderPasteboard pasteboardTypesByFidelityForItemAtIndex:]):
(-[WebItemProviderPasteboard setItemsUsingRegistrationInfoLists:]):
(-[WebItemProviderPasteboard setItemsFromObjectRepresentations:]): Deleted.

Source/WebKit/mac:

Adjusts for changes in WebCore (see WebCore/ChangeLog for more details).

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::getTypesByFidelityForItemAtIndex):

Source/WebKit2:

Adjusts for changes in WebCore by adding plumbing to support Pasteboard::getTypesByFidelityForItemAtIndex. See
WebCore/ChangeLog for more details.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::getPasteboardTypesByFidelityForItemAtIndex):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getTypesByFidelityForItemAtIndex):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Tools:

Adds a new unit test (DataInteractionTests.RespectsExternalSourceFidelityRankings). See WebCore ChangeLog for
more details.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

7:15 PM Changeset in webkit [215713] by Yusuke Suzuki
  • 6 edits in trunk/Source/WTF

[AppleWin] The procedure entry point ?waitForThreadCompletion@WTF@@YAHI@Z could not be located in the dynamic link library WebKitQuartzCoreAdditions.dll
https://bugs.webkit.org/show_bug.cgi?id=171029

Reviewed by Brent Fulgham.

While WTF Threading APIs are updated, WebKitQuartzCoreAdditions.dll in Windows uses some of the old APIs,
waitForThreadCompletion and createThread. This patch implements both on top of the new APIs.
These APIs are only exposed in Windows for this compatibility problem and new code should not use it.

  • wtf/ThreadHolder.cpp:

(WTF::ThreadHolder::initialize):

  • wtf/ThreadHolder.h:
  • wtf/ThreadHolderWin.cpp:

(WTF::ThreadHolder::get):
(WTF::ThreadHolder::platformInitialize):
(WTF::ThreadHolder::destruct):

  • wtf/Threading.h:
  • wtf/ThreadingWin.cpp:

(WTF::createThread):
(WTF::waitForThreadCompletion):

7:10 PM Changeset in webkit [215712] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] Update POTFILES.in

It’s missing some files with translatable strings.
https://bugs.webkit.org/show_bug.cgi?id=171232

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-04-24
Reviewed by Michael Catanzaro.

  • POTFILES.in: Update POTFILES.in.
6:44 PM Changeset in webkit [215711] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Regression(r204605): support for "cp874" charset alias was inadvertently dropped which may cause issues on certain Thai sites
https://bugs.webkit.org/show_bug.cgi?id=171128
<rdar://problem/31526844>

Reviewed by Alexey Proskuryakov.

When using Thai as default language on MacOS, defaultTextEncodingNameForSystemLanguage()
was returning "cp874" encoding with was dropped in r204605 for not being part of the
encoding specification (https://encoding.spec.whatwg.org/#names-and-labels).

To address the issue, we map "cp874" encoding to the "dos-874" encoding which is
properly recognized. Without this, this could lead to issue on WebSites that do not
specify a charset.

  • platform/text/TextEncodingRegistry.cpp:

(WebCore::defaultTextEncodingNameForSystemLanguage):

6:23 PM Changeset in webkit [215710] by commit-queue@webkit.org
  • 28 edits
    1 add in trunk/Source/WebCore

[CG] Provide a type identifier hint to the CGImageSource so getting the type identifier is more accurate
https://bugs.webkit.org/show_bug.cgi?id=171042

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-24
Reviewed by Tim Horton.

The image URL can be used to get the type identifier hint. Without providing
this hint, the image type identifier is not accurate for image formats.

Also add a function to the ImageDecoder class to get the typeIdentifier. Add
all the pluming from the ImageDecoder till the Image class.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::advanceAnimation):
(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.cpp:

(WebCore::Image::sourceURL):

  • platform/graphics/Image.h: Change the sourceURL() to return a URL so CG can create CFURLRef from it.

(WebCore::Image::uti):

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex):
(WebCore::ImageFrameCache::startAsyncDecodingQueue):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::stopAsyncDecodingQueue):
(WebCore::ImageFrameCache::clearMetadata):
(WebCore::ImageFrameCache::sourceURL):
(WebCore::ImageFrameCache::encodedDataStatus):
(WebCore::ImageFrameCache::uti):
(WebCore::ImageFrameCache::filenameExtension):

  • platform/graphics/ImageFrameCache.h:
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::ensureDecoderAvailable):

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::uti):

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::ImageDecoder): Pass the type identifier hint to CGImageSourceCreateIncremental().
(WebCore::ImageDecoder::uti):
(WebCore::ImageDecoder::filenameExtension):
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):

  • platform/graphics/cg/ImageDecoderCG.h:

(WebCore::ImageDecoder::create):

  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoder::encodedDataStatus):

  • platform/graphics/win/ImageDecoderDirect2D.h:

(WebCore::ImageDecoder::create): Add an argument of type URL.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::create): Add an argument of type URL.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageDecoder::encodedDataStatus): Make it const.

  • platform/image-decoders/bmp/BMPImageDecoder.cpp:

(WebCore::BMPImageDecoder::encodedDataStatus):

  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::encodedDataStatus):

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::encodedDataStatus):

  • platform/image-decoders/ico/ICOImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::encodedDataStatus):

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::encodedDataStatus):

  • platform/image-decoders/png/PNGImageDecoder.h:
  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::encodedDataStatus):

  • platform/image-decoders/webp/WEBPImageDecoder.h:
  • platform/spi/cg/ImageIOSPI.h: Added.
5:43 PM Changeset in webkit [215709] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix.

  • crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:

(WebCore::encryptAES_GCM):
(WebCore::decyptAES_GCM):

5:30 PM Changeset in webkit [215708] by clopez@igalia.com
  • 2 edits in trunk/Tools

SyntaxError fix after r215702.
https://bugs.webkit.org/show_bug.cgi?id=168944

Unreviewed "build" fix.

  • BuildSlaveSupport/built-product-archive:

(archiveBuiltProduct):

5:18 PM Changeset in webkit [215707] by beidson@apple.com
  • 8 edits in trunk/Source/WebKit2

WebProcessPools should always have a WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=171252

Reviewed by Alex Christensen.

  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::registerSharedResourceLoadObserver): Deleted.

  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextGetWebsiteDataStore):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitialize):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::isAssociatedProcessPool):

5:14 PM Changeset in webkit [215706] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/Source/WebCore

Whitelist supported image MIME types
https://bugs.webkit.org/show_bug.cgi?id=171077

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-24
Reviewed by Tim Horton.

Restrict the CG port image formats to a known whitelist. Build this list from image
UTI's instead of MIME types, since the image UTI's is a superset of the MIME types.
Use this list to build the list of supported image MIME types.

  • PlatformAppleWin.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):

  • platform/graphics/cg/UTIRegistry.cpp: Added.

(WebCore::allowedImageUTIs):
(WebCore::isAllowedImageUTI):

  • platform/graphics/cg/UTIRegistry.h: Added.
5:05 PM Changeset in webkit [215705] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: Crash at WebCore::AXObjectCache::characterOffsetForIndex(int, WebCore::AccessibilityObject const*) + 703
https://bugs.webkit.org/show_bug.cgi?id=171247

Reviewed by Chris Fleizach.

Source/WebCore:

Crashed because we were passing a nil node into rootAXEditableElement(). Fixed it by
adding a null check.

Test: accessibility/mac/input-string-for-range-crash.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::characterOffsetForIndex):

LayoutTests:

  • accessibility/mac/input-string-for-range-crash-expected.txt: Added.
  • accessibility/mac/input-string-for-range-crash.html: Added.
5:04 PM Changeset in webkit [215704] by sbarati@apple.com
  • 5 edits
    4 adds in trunk/PerformanceTests

Add ML to ARES6
https://bugs.webkit.org/show_bug.cgi?id=171206

Rubber stamped by Filip Pizlo.

This patch adds a new test to ARES6 called ML. ML is an implementation of
a feedforward neural network: https://github.com/mljs/feedforward-neural-networks.
It makes heavy use of classes, and does non-trivial matrix math using the
ml-matrix library: https://github.com/mljs/matrix

  • ARES-6/about.html:
  • ARES-6/cli.js:
  • ARES-6/glue.js:
  • ARES-6/index.html:
  • ARES-6/ml: Added.
  • ARES-6/ml/benchmark.js: Added.
  • ARES-6/ml/index.js: Added.
  • ARES-6/ml_benchmark.js: Added.
5:02 PM Changeset in webkit [215703] by commit-queue@webkit.org
  • 9 edits
    2 adds in trunk

Set defaults video getUserMedia constraints
https://bugs.webkit.org/show_bug.cgi?id=171127

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

Source/WebCore:

Test: fast/mediastream/getUserMedia-default.html

Adding default optional constraints for video size and frame rate if none is defined.
Default is 640x480 30fps.

Doing some refactoring in MeddiaConstraintsImpl and MeddiaConstraintsData to use more move constructors.

  • Modules/mediastream/MediaConstraintsImpl.cpp:

(WebCore::defaultVideoConstraints):
(WebCore::MediaConstraintsData::setDefaultVideoConstraints):
(WebCore::MediaConstraintsImpl::create): Deleted.

  • Modules/mediastream/MediaConstraintsImpl.h:
  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::getUserMedia):

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Fixing crash when setting frameRate.

Source/WebKit2:

Updated to cope with MediaStreamConstraintsImpl refactoring.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

LayoutTests:

  • fast/mediastream/getUserMedia-default-expected.txt: Added.
  • fast/mediastream/getUserMedia-default.html: Added.
4:44 PM Changeset in webkit [215702] by Jonathan Bedard
  • 2 edits in trunk/Tools

Package ImageDiff built with host SDK
https://bugs.webkit.org/show_bug.cgi?id=168944
<rdar://problem/30745642>

Reviewed by David Kilzer.

iOS Simulator and iOS device should archive the ImageDiff built for the host
machine.

  • BuildSlaveSupport/built-product-archive:

(determineWebKitBuildDirectories): Add _hostBuildDirectory for iOS.
(archiveBuiltProduct): Archive Mac products for iOS so that ImageDiff is included.

4:43 PM Changeset in webkit [215701] by Chris Dumez
  • 296 edits in trunk

createElementNS() should now throw only InvalidCharacterError, not NamespaceError
https://bugs.webkit.org/show_bug.cgi?id=171052

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Re-sync web-platform-tests/dom from upstream to gain test coverage.

  • web-platform-tests/dom/collections/HTMLCollection-as-proto-length-get-throws.html:
  • web-platform-tests/dom/collections/HTMLCollection-empty-name.html:
  • web-platform-tests/dom/collections/HTMLCollection-supported-property-indices.html:
  • web-platform-tests/dom/collections/HTMLCollection-supported-property-names.html:
  • web-platform-tests/dom/collections/domstringmap-supported-property-names.html:
  • web-platform-tests/dom/collections/namednodemap-supported-property-names.html:
  • web-platform-tests/dom/events/AddEventListenerOptions-once.html:
  • web-platform-tests/dom/events/AddEventListenerOptions-passive.html:
  • web-platform-tests/dom/events/CustomEvent.html:
  • web-platform-tests/dom/events/Event-cancelBubble.html:
  • web-platform-tests/dom/events/Event-constants.html:
  • web-platform-tests/dom/events/Event-constructors.html:
  • web-platform-tests/dom/events/Event-defaultPrevented-after-dispatch.html:
  • web-platform-tests/dom/events/Event-defaultPrevented.html:
  • web-platform-tests/dom/events/Event-dispatch-bubble-canceled.html:
  • web-platform-tests/dom/events/Event-dispatch-bubbles-false.html:
  • web-platform-tests/dom/events/Event-dispatch-bubbles-true.html:
  • web-platform-tests/dom/events/Event-dispatch-click.html:
  • web-platform-tests/dom/events/Event-dispatch-detached-click.html:
  • web-platform-tests/dom/events/Event-dispatch-handlers-changed.html:
  • web-platform-tests/dom/events/Event-dispatch-multiple-cancelBubble.html:
  • web-platform-tests/dom/events/Event-dispatch-multiple-stopPropagation.html:
  • web-platform-tests/dom/events/Event-dispatch-omitted-capture.html:
  • web-platform-tests/dom/events/Event-dispatch-order.html:
  • web-platform-tests/dom/events/Event-dispatch-other-document.html:
  • web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html:
  • web-platform-tests/dom/events/Event-dispatch-redispatch.html:
  • web-platform-tests/dom/events/Event-dispatch-reenter.html:
  • web-platform-tests/dom/events/Event-dispatch-target-moved.html:
  • web-platform-tests/dom/events/Event-dispatch-target-removed.html:
  • web-platform-tests/dom/events/Event-dispatch-throwing.html:
  • web-platform-tests/dom/events/Event-init-while-dispatching.html:
  • web-platform-tests/dom/events/Event-initEvent.html:
  • web-platform-tests/dom/events/Event-propagation.html:
  • web-platform-tests/dom/events/Event-subclasses-constructors.html:
  • web-platform-tests/dom/events/Event-type-empty.html:
  • web-platform-tests/dom/events/Event-type.html:
  • web-platform-tests/dom/events/EventListener-handleEvent.html:
  • web-platform-tests/dom/events/EventListener-incumbent-global-1.sub.html:
  • web-platform-tests/dom/events/EventListener-incumbent-global-2.sub.html:
  • web-platform-tests/dom/events/EventListener-invoke-legacy.html:
  • web-platform-tests/dom/events/EventListenerOptions-capture.html:
  • web-platform-tests/dom/events/EventTarget-addEventListener.html:
  • web-platform-tests/dom/events/EventTarget-dispatchEvent-returnvalue.html:
  • web-platform-tests/dom/events/EventTarget-dispatchEvent.html:
  • web-platform-tests/dom/events/EventTarget-removeEventListener.html:
  • web-platform-tests/dom/historical.html:
  • web-platform-tests/dom/interface-objects.html:
  • web-platform-tests/dom/interfaces.html:
  • web-platform-tests/dom/lists/DOMTokenList-Iterable.html:
  • web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes.html:
  • web-platform-tests/dom/lists/DOMTokenList-iteration.html:
  • web-platform-tests/dom/lists/DOMTokenList-stringifier.html:
  • web-platform-tests/dom/lists/DOMTokenList-value.html:
  • web-platform-tests/dom/nodes/CharacterData-appendChild.html:
  • web-platform-tests/dom/nodes/CharacterData-appendData.html:
  • web-platform-tests/dom/nodes/CharacterData-data.html:
  • web-platform-tests/dom/nodes/CharacterData-deleteData.html:
  • web-platform-tests/dom/nodes/CharacterData-insertData.html:
  • web-platform-tests/dom/nodes/CharacterData-remove.html:
  • web-platform-tests/dom/nodes/CharacterData-replaceData.html:
  • web-platform-tests/dom/nodes/CharacterData-substringData.html:
  • web-platform-tests/dom/nodes/CharacterData-surrogates.html:
  • web-platform-tests/dom/nodes/ChildNode-after.html:
  • web-platform-tests/dom/nodes/ChildNode-before.html:
  • web-platform-tests/dom/nodes/ChildNode-replaceWith.html:
  • web-platform-tests/dom/nodes/Comment-constructor.html:
  • web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
  • web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
  • web-platform-tests/dom/nodes/DOMImplementation-createDocumentType-expected.txt:
  • web-platform-tests/dom/nodes/DOMImplementation-createDocumentType.html:
  • web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument.html:
  • web-platform-tests/dom/nodes/DOMImplementation-hasFeature.html:
  • web-platform-tests/dom/nodes/Document-URL.sub.html:
  • web-platform-tests/dom/nodes/Document-adoptNode.html:
  • web-platform-tests/dom/nodes/Document-characterSet-normalization.html:
  • web-platform-tests/dom/nodes/Document-constructor.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_bmp.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_css.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_gif.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_html.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_jpg.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_png.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_txt.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_xml.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/createDocument.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/createHTMLDocument.html:
  • web-platform-tests/dom/nodes/Document-contentType/contentType/xhr_responseType_document.html:
  • web-platform-tests/dom/nodes/Document-createAttribute.html:
  • web-platform-tests/dom/nodes/Document-createComment.html:
  • web-platform-tests/dom/nodes/Document-createElement-namespace-tests/w3c-import.log:
  • web-platform-tests/dom/nodes/Document-createElement-namespace.html:
  • web-platform-tests/dom/nodes/Document-createElement.html:
  • web-platform-tests/dom/nodes/Document-createElementNS-expected.txt:
  • web-platform-tests/dom/nodes/Document-createElementNS.html:
  • web-platform-tests/dom/nodes/Document-createElementNS.js:
  • web-platform-tests/dom/nodes/Document-createEvent.html:
  • web-platform-tests/dom/nodes/Document-createProcessingInstruction-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Document-createProcessingInstruction.html:
  • web-platform-tests/dom/nodes/Document-createTextNode.html:
  • web-platform-tests/dom/nodes/Document-createTreeWalker.html:
  • web-platform-tests/dom/nodes/Document-doctype.html:
  • web-platform-tests/dom/nodes/Document-getElementById.html:
  • web-platform-tests/dom/nodes/Document-getElementsByTagName-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Document-getElementsByTagName.html:
  • web-platform-tests/dom/nodes/Document-getElementsByTagNameNS.html:
  • web-platform-tests/dom/nodes/Document-implementation.html:
  • web-platform-tests/dom/nodes/Document-importNode.html:
  • web-platform-tests/dom/nodes/DocumentType-literal-xhtml.xhtml:
  • web-platform-tests/dom/nodes/DocumentType-literal.html:
  • web-platform-tests/dom/nodes/DocumentType-remove.html:
  • web-platform-tests/dom/nodes/Element-childElement-null-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-childElement-null.html:
  • web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add.html:
  • web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.html:
  • web-platform-tests/dom/nodes/Element-childElementCount-nochild-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-childElementCount-nochild.html:
  • web-platform-tests/dom/nodes/Element-childElementCount-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-childElementCount.html:
  • web-platform-tests/dom/nodes/Element-children.html:
  • web-platform-tests/dom/nodes/Element-classlist.html:
  • web-platform-tests/dom/nodes/Element-closest.html:
  • web-platform-tests/dom/nodes/Element-firstElementChild-entity-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-firstElementChild-namespace-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-firstElementChild-namespace.html:
  • web-platform-tests/dom/nodes/Element-firstElementChild-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-firstElementChild.html:
  • web-platform-tests/dom/nodes/Element-getElementsByClassName.html:
  • web-platform-tests/dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html:
  • web-platform-tests/dom/nodes/Element-getElementsByTagName.html:
  • web-platform-tests/dom/nodes/Element-getElementsByTagNameNS.html:
  • web-platform-tests/dom/nodes/Element-hasAttributes.html:
  • web-platform-tests/dom/nodes/Element-insertAdjacentElement.html:
  • web-platform-tests/dom/nodes/Element-insertAdjacentText.html:
  • web-platform-tests/dom/nodes/Element-lastElementChild-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-lastElementChild.html:
  • web-platform-tests/dom/nodes/Element-matches.html:
  • web-platform-tests/dom/nodes/Element-nextElementSibling-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-nextElementSibling.html:
  • web-platform-tests/dom/nodes/Element-previousElementSibling-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-previousElementSibling.html:
  • web-platform-tests/dom/nodes/Element-remove.html:
  • web-platform-tests/dom/nodes/Element-removeAttributeNS.html:
  • web-platform-tests/dom/nodes/Element-siblingElement-null-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Element-siblingElement-null.html:
  • web-platform-tests/dom/nodes/Element-tagName.html:
  • web-platform-tests/dom/nodes/Element-webkitMatchesSelector.html:
  • web-platform-tests/dom/nodes/MutationObserver-attributes.html:
  • web-platform-tests/dom/nodes/MutationObserver-characterData.html:
  • web-platform-tests/dom/nodes/MutationObserver-childList.html:
  • web-platform-tests/dom/nodes/MutationObserver-disconnect.html:
  • web-platform-tests/dom/nodes/MutationObserver-document.html:
  • web-platform-tests/dom/nodes/MutationObserver-inner-outer.html:
  • web-platform-tests/dom/nodes/MutationObserver-takeRecords.html:
  • web-platform-tests/dom/nodes/Node-appendChild.html:
  • web-platform-tests/dom/nodes/Node-baseURI.html:
  • web-platform-tests/dom/nodes/Node-childNodes.html:
  • web-platform-tests/dom/nodes/Node-cloneNode.html:
  • web-platform-tests/dom/nodes/Node-compareDocumentPosition.html:
  • web-platform-tests/dom/nodes/Node-constants.html:
  • web-platform-tests/dom/nodes/Node-contains-xml.xml:
  • web-platform-tests/dom/nodes/Node-contains.html:
  • web-platform-tests/dom/nodes/Node-insertBefore.html:
  • web-platform-tests/dom/nodes/Node-isConnected.html:
  • web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Node-isEqualNode.html:
  • web-platform-tests/dom/nodes/Node-isSameNode.html:
  • web-platform-tests/dom/nodes/Node-lookupNamespaceURI.html:
  • web-platform-tests/dom/nodes/Node-lookupPrefix.xhtml:
  • web-platform-tests/dom/nodes/Node-nodeName-xhtml.xhtml:
  • web-platform-tests/dom/nodes/Node-nodeName.html:
  • web-platform-tests/dom/nodes/Node-nodeValue.html:
  • web-platform-tests/dom/nodes/Node-normalize.html:
  • web-platform-tests/dom/nodes/Node-parentElement.html:
  • web-platform-tests/dom/nodes/Node-parentNode.html:
  • web-platform-tests/dom/nodes/Node-properties.html:
  • web-platform-tests/dom/nodes/Node-removeChild.html:
  • web-platform-tests/dom/nodes/Node-replaceChild.html:
  • web-platform-tests/dom/nodes/Node-textContent.html:
  • web-platform-tests/dom/nodes/NodeList-Iterable.html:
  • web-platform-tests/dom/nodes/ParentNode-append.html:
  • web-platform-tests/dom/nodes/ParentNode-prepend.html:
  • web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht.xht:
  • web-platform-tests/dom/nodes/ParentNode-querySelector-All.html:
  • web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1.xhtml:
  • web-platform-tests/dom/nodes/ProcessingInstruction-literal-1.xhtml:
  • web-platform-tests/dom/nodes/ProcessingInstruction-literal-2.xhtml:
  • web-platform-tests/dom/nodes/Text-constructor.html:
  • web-platform-tests/dom/nodes/Text-splitText.html:
  • web-platform-tests/dom/nodes/append-on-Document.html:
  • web-platform-tests/dom/nodes/attributes-expected.txt:
  • web-platform-tests/dom/nodes/attributes.html:
  • web-platform-tests/dom/nodes/case.html:
  • web-platform-tests/dom/nodes/getElementsByClassName-01.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-02.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-03.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-04.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-05.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-06.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-07.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-08.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-09.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-10.xml:
  • web-platform-tests/dom/nodes/getElementsByClassName-11.xml:
  • web-platform-tests/dom/nodes/getElementsByClassName-12.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-13.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-14.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-15.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-16.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-17.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-18.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-19.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-20.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-21.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-22.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-23.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-24.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-25.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-26.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-27.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-28.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-29.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-30.htm:
  • web-platform-tests/dom/nodes/getElementsByClassName-31.htm:
  • web-platform-tests/dom/nodes/insert-adjacent.html:
  • web-platform-tests/dom/nodes/prepend-on-Document.html:
  • web-platform-tests/dom/nodes/remove-unscopable.html:
  • web-platform-tests/dom/nodes/rootNode.html:
  • web-platform-tests/dom/nodes/w3c-import.log:
  • web-platform-tests/dom/ranges/Range-attributes.html:
  • web-platform-tests/dom/ranges/Range-cloneContents.html:
  • web-platform-tests/dom/ranges/Range-cloneRange.html:
  • web-platform-tests/dom/ranges/Range-collapse.html:
  • web-platform-tests/dom/ranges/Range-commonAncestorContainer-2.html:
  • web-platform-tests/dom/ranges/Range-commonAncestorContainer.html:
  • web-platform-tests/dom/ranges/Range-compareBoundaryPoints.html:
  • web-platform-tests/dom/ranges/Range-comparePoint-2.html:
  • web-platform-tests/dom/ranges/Range-comparePoint.html:
  • web-platform-tests/dom/ranges/Range-constructor.html:
  • web-platform-tests/dom/ranges/Range-deleteContents.html:
  • web-platform-tests/dom/ranges/Range-detach.html:
  • web-platform-tests/dom/ranges/Range-extractContents.html:
  • web-platform-tests/dom/ranges/Range-insertNode.html:
  • web-platform-tests/dom/ranges/Range-intersectsNode-binding.html:
  • web-platform-tests/dom/ranges/Range-intersectsNode.html:
  • web-platform-tests/dom/ranges/Range-isPointInRange.html:
  • web-platform-tests/dom/ranges/Range-mutations-appendChild.html:
  • web-platform-tests/dom/ranges/Range-mutations-appendData.html:
  • web-platform-tests/dom/ranges/Range-mutations-dataChange.html:
  • web-platform-tests/dom/ranges/Range-mutations-deleteData.html:
  • web-platform-tests/dom/ranges/Range-mutations-insertBefore.html:
  • web-platform-tests/dom/ranges/Range-mutations-insertData.html:
  • web-platform-tests/dom/ranges/Range-mutations-removeChild.html:
  • web-platform-tests/dom/ranges/Range-mutations-replaceChild.html:
  • web-platform-tests/dom/ranges/Range-mutations-replaceData.html:
  • web-platform-tests/dom/ranges/Range-mutations-splitText.html:
  • web-platform-tests/dom/ranges/Range-selectNode.html:
  • web-platform-tests/dom/ranges/Range-set.html:
  • web-platform-tests/dom/ranges/Range-stringifier.html:
  • web-platform-tests/dom/ranges/Range-surroundContents.html:
  • web-platform-tests/dom/traversal/NodeFilter-constants.html:
  • web-platform-tests/dom/traversal/NodeIterator-removal.html:
  • web-platform-tests/dom/traversal/NodeIterator.html:
  • web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter.html:
  • web-platform-tests/dom/traversal/TreeWalker-basic.html:
  • web-platform-tests/dom/traversal/TreeWalker-currentNode.html:
  • web-platform-tests/dom/traversal/TreeWalker-previousNodeLastChildReject.html:
  • web-platform-tests/dom/traversal/TreeWalker-previousSiblingLastChildSkip.html:
  • web-platform-tests/dom/traversal/TreeWalker-traversal-reject.html:
  • web-platform-tests/dom/traversal/TreeWalker-traversal-skip-most.html:
  • web-platform-tests/dom/traversal/TreeWalker-traversal-skip.html:
  • web-platform-tests/dom/traversal/TreeWalker-walking-outside-a-tree.html:
  • web-platform-tests/dom/traversal/TreeWalker.html:

Source/WebCore:

Validating a qualified name should only throw InvalidCharacterError, not NamespaceError,
after:

Latest spec:

No new tests, updated web-platform-tests.

  • dom/Document.cpp:

(WebCore::Document::parseQualifiedName):

LayoutTests:

Updated / rebaselined existing tests to reflect behavior change.

  • fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
  • fast/dom/DOMImplementation/createDocumentType-err-expected.txt:
  • fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
  • fast/dom/DOMImplementation/script-tests/createDocumentType-err.js:
  • fast/dom/Document/createAttributeNS-namespace-err-expected.txt:
  • fast/dom/Document/createElementNS-namespace-err-expected.txt:
  • fast/dom/Document/script-tests/createAttributeNS-namespace-err.js:
  • fast/dom/Document/script-tests/createElementNS-namespace-err.js:
  • fast/dom/Element/script-tests/setAttributeNS-namespace-err.js:
  • fast/dom/Element/setAttributeNS-namespace-err-expected.txt:
3:46 PM Changeset in webkit [215700] by Chris Dumez
  • 7 edits
    2 adds in trunk

REGRESSION (214503): Webkit crash under RenderElement::repaintForPausedImageAnimationsIfNeeded() when scrolling giphy pages
https://bugs.webkit.org/show_bug.cgi?id=171243
<rdar://problem/31715572>

Reviewed by Antti Koivisto.

Source/WebCore:

After r214503, we would frequently crash when scrolling giphy pages because we were failing to call
RenderView::removeRendererWithPausedImageAnimations(renderer, cachedImage) in some cases. This would
cause a RenderElement to still be associated to a CachedImage in RenderView but not in practice.
If the CachedImage then gets destroyed and the user scrolls, we end up calling
RenderElement::repaintForPausedImageAnimationsIfNeeded() with a bad CachedImage.

StyleCachedImage was properly calling RenderView::removeRendererWithPausedImageAnimations() before
unregistering the renderer as a client to the CachedImage. However, RenderImageResource was failing
to do the same. To make this less error-prone, I added a didRemoveCachedImageClient(CachedImage&)
function to the CachedImageClient interface. It is overriden in RenderElement only to call
RenderView::removeRendererWithPausedImageAnimations().

Test: fast/images/animated-gif-scrolling-crash.html

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::didRemoveClient):

  • loader/cache/CachedImageClient.h:

(WebCore::CachedImageClient::didRemoveCachedImageClient):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::didRemoveCachedImageClient):

  • rendering/RenderElement.h:
  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::removeClient):

LayoutTests:

Add layout test coverage.

  • fast/images/animated-gif-scrolling-crash-expected.txt: Added.
  • fast/images/animated-gif-scrolling-crash.html: Added.
3:43 PM Changeset in webkit [215699] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Allow tabs with capturing audio or video to exceed background CPU limit
https://bugs.webkit.org/show_bug.cgi?id=171249
<rdar://problem/31796314>

Reviewed by Geoffrey Garen.

Allow tabs with capturing audio or video to exceed background CPU limit as this
is a legit case of potentially high background CPU use.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didExceedBackgroundCPULimit):

3:02 PM Changeset in webkit [215698] by Joseph Pecoraro
  • 5 edits in trunk/Source/JavaScriptCore

Web Inspector: ObjC RWIProtocol codegen should better handle optional members
https://bugs.webkit.org/show_bug.cgi?id=171251
<rdar://problem/31697002>

Reviewed by Brian Burg.

  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(ObjCProtocolTypesImplementationGenerator._generate_getter_for_member):

  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator.protocol_to_objc_expression_for_member):
(ObjCGenerator.protocol_to_objc_code_block_for_object_member):
Always be safe and nil check object property accesses, optional or not.

  • inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:

Rebaselined inspector generator tests.

2:43 PM Changeset in webkit [215697] by keith_miller@apple.com
  • 2 edits in trunk/Tools

ThreadMessage API tests failing on release bots
https://bugs.webkit.org/show_bug.cgi?id=171246

Reviewed by Saam Barati.

Need to make sure that C++ doesn't optimize away our spin loop.

  • TestWebKitAPI/Tests/WTF/ThreadMessages.cpp:

(runThreadMessageTest):
(TEST):

2:33 PM Changeset in webkit [215696] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

[macOS] Fix two minor issues with MediaSelectionOption::Type
https://bugs.webkit.org/show_bug.cgi?id=171235

Reviewed by Sam Weinig.

  • platform/MediaSelectionOption.h: Gave type a default value, and added explicit

constructors to make gcc and msvc happy.

  • platform/mac/WebPlaybackControlsManager.mm:

(toAVTouchBarMediaSelectionOptionType): Added an ASSERT_NOT_REACHED if none of the switch
cases match.

2:17 PM Changeset in webkit [215695] by sbarati@apple.com
  • 4 edits in trunk/LayoutTests

[mac debug] LayoutTest workers/wasm-long-compile-many.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=171120
<rdar://problem/31781889>

Rubber stamped by Mark Lam.

Make the wasm binary we compile close to 50% smaller.

  • workers/wasm-resources/long-compile-many.js:

(i.async.run):
(i.worker.onmessage):

  • workers/wasm-resources/long-compile-worker.js:
  • workers/wasm-resources/long-compile.js:

(async.run):
(worker.onmessage):

2:11 PM Changeset in webkit [215694] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

ASSERTION FAILED: m_table seen with workers/wasm-hashset LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=171119
<rdar://problem/31760635>

Reviewed by Keith Miller.

The HashSet of timer set notification callbacks can be accessed
and augmented simultaneously from different threads. e.g, the worker
thread can augment it while the wasm compilation thread will
access it. Therefore, accesses must be guarded by a lock.

  • runtime/JSRunLoopTimer.cpp:

(JSC::JSRunLoopTimer::scheduleTimer):
(JSC::JSRunLoopTimer::addTimerSetNotification):
(JSC::JSRunLoopTimer::removeTimerSetNotification):

  • runtime/JSRunLoopTimer.h:
1:58 PM Changeset in webkit [215693] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit2

Try to fix the 32-bit macOS build.

  • UIProcess/Cocoa/WebViewImpl.mm:
1:48 PM Changeset in webkit [215692] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark media/modern-media-controls/scrubber-support/scrubber-support-click.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171245

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:46 PM Changeset in webkit [215691] by aestes@apple.com
  • 4 edits in trunk/Source

[macOS] Enable media selection button on AVTouchBarScrubber
https://bugs.webkit.org/show_bug.cgi?id=171149
<rdar://problem/29875010>

Reviewed by Beth Dakin.

Source/WebCore:

  • platform/spi/cocoa/AVKitSPI.h:

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateMediaTouchBar):

12:48 PM Changeset in webkit [215690] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: DOM/XHR breakpoint sections should be collapsed by default
https://bugs.webkit.org/show_bug.cgi?id=170931

Reviewed by Brian Burg.

Set the default collapsed parameter for DOM / XHR Breakpoints sections,
and auto-expand the DOM Breakpoints when a breakpoint is added.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._domBreakpointAddedOrRemoved):

12:25 PM Changeset in webkit [215689] by commit-queue@webkit.org
  • 10 edits in trunk

test262: test262/test/language/computed-property-names/class/static/getter-prototype.js
https://bugs.webkit.org/show_bug.cgi?id=170897

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-24
Reviewed by Saam Barati.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createArguments):
(JSC::ASTBuilder::createArgumentsList):
Reorder so all the createProperty methods are grouped together.

  • parser/Parser.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseGetterSetter):
Refine the conditions for syntax errors for getter/setter
properties names. "prototype" is not allowed as a static
and "constructor" is not all when non-static.

  • runtime/JSObject.cpp:

(JSC::JSObject::putGetter):
(JSC::JSObject::putSetter):
Throw exceptions. These methods are only used by this path
via op_put_getter_by_val / op_put_setter_by_val.

LayoutTests:

  • js/class-syntax-declaration-expected.txt:
  • js/script-tests/class-syntax-declaration.js:

Extend tests for static and non-static methods named "constructor" and "prototype".

11:08 AM Changeset in webkit [215688] by commit-queue@webkit.org
  • 6 edits in trunk

Address some FIXMEs in JavaScript tests for bugs that have been fixed
https://bugs.webkit.org/show_bug.cgi?id=171191

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-24
Reviewed by JF Bastien.

JSTests:

  • stress/proxy-is-extensible.js:

LayoutTests:

  • js/dom/custom-constructors-expected.txt:
  • js/dom/script-tests/custom-constructors.js:
  • js/script-tests/keyword-method-names.js:
10:59 AM Changeset in webkit [215687] by commit-queue@webkit.org
  • 6 edits in trunk

test262: test262/test/language/statements/for-of/dstr-array-elem-init-fn-name-arrow.js
https://bugs.webkit.org/show_bug.cgi?id=171160

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-24
Reviewed by JF Bastien.

JSTests:

  • stress/inferred-names.js:
  • test262.yaml:

Source/JavaScriptCore:

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::tryInferNameInPattern):
(JSC::ASTBuilder::tryInferNameInPatternWithIdentifier):
We supported getting the name from a BindingNode.
We extend this to support getting the name from a
ResolveNode inside of an AssignmentElementNode.

  • parser/Nodes.h:

(JSC::DestructuringPatternNode::isAssignmentElementNode):
(JSC::AssignmentElementNode::isAssignmentElementNode):
Make it possible to identify an assignment element node.

10:31 AM Changeset in webkit [215686] by achristensen@apple.com
  • 58 edits in trunk

Reduce copies and allocations in SharedBuffer::append
https://bugs.webkit.org/show_bug.cgi?id=170956

Reviewed by Andreas Kling.

Source/JavaScriptCore:

  • runtime/ArrayBuffer.h:

Source/WebCore:

SharedBuffer was a mess of different data structures added over the years.
SharedBuffer::append would allocate large Vector<char>s and call memcpy, and that
is inefficient and causes crashes when large allocations fail, and the allocations
and copies aren't even necessary. There were also const correctness problems in
ResourceLoader::addDataOrBuffer, and iterating a SharedBuffer was strange because
sometimes we don't want to add unnecessary copies.

These problems are solved by making SharedBuffer a Vector of read-only data segments,
which can be contained in various ways but we don't care because all we want to do is
read them. Appending SharedBuffers is now const correct because we just add to a
Vector<Ref<DataSegment>> and neither SharedBuffer can write to the data. Sometimes,
though, we want all the data to be in continuous memory, and if there are multiple
segments then the data needs to be copied once to a new segment. We should audit the
call sites of SharedBuffer::data and see if this is really necessary.

No change in functional behavior. Fewer copies of the data are made when buffering
data in the NetworkProcess. No extra memory is allocated for bytes we think we might
need to append in the future. Data is now only copied into one buffer lazily as needed,
which could slightly change when small delays from memcpy happen, but it's an overall
improvement. We could have a performance hit if we were to call append() then data()
then append() then data() etc. but that doesn't happen in WebKit because we call append
repeatedly when buffering the data then call data() once when reading the data.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::archivedDataForAttributedString):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::dataInRTFDFormat):
(WebCore::Editor::dataInRTFFormat):

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::WebContentReader::readURL):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::imageInWebArchiveFormat):

  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createResource):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::tryReplaceEncodedData):

  • loader/cocoa/DiskCacheMonitorCocoa.mm:

(WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::combineToOneSegment):
(WebCore::SharedBuffer::data):
(WebCore::SharedBuffer::createArrayBuffer):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::clear):
(WebCore::SharedBuffer::copy):
(WebCore::SharedBuffer::DataSegment::data):
(WebCore::SharedBuffer::DataSegment::size):
(WebCore::segmentIndex): Deleted.
(WebCore::offsetInSegment): Deleted.
(WebCore::allocateSegment): Deleted.
(WebCore::freeSegment): Deleted.
(WebCore::SharedBuffer::~SharedBuffer): Deleted.
(WebCore::SharedBuffer::size): Deleted.
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Deleted.
(WebCore::SharedBuffer::appendToDataBuffer): Deleted.
(WebCore::SharedBuffer::clearDataBuffer): Deleted.
(WebCore::SharedBuffer::copyBufferAndClear): Deleted.
(WebCore::SharedBuffer::buffer): Deleted.
(WebCore::SharedBuffer::getSomeData): Deleted.
(WebCore::SharedBuffer::maybeTransferMappedFileData): Deleted.
(WebCore::SharedBuffer::clearPlatformData): Deleted.
(WebCore::SharedBuffer::maybeTransferPlatformData): Deleted.
(WebCore::SharedBuffer::hasPlatformData): Deleted.
(WebCore::SharedBuffer::platformData): Deleted.
(WebCore::SharedBuffer::maybeAppendPlatformData): Deleted.

  • platform/SharedBuffer.h:

(WebCore::SharedBuffer::create): Deleted.
(WebCore::SharedBuffer::isEmpty): Deleted.

  • platform/SharedBufferChunkReader.cpp:

(WebCore::SharedBufferChunkReader::nextChunk):
(WebCore::SharedBufferChunkReader::peek):

  • platform/SharedBufferChunkReader.h:
  • platform/URLParser.cpp:

(WebCore::URLParser::URLParser):

  • platform/cf/KeyedEncoderCF.cpp:

(WebCore::KeyedEncoderCF::finishEncoding):

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::createCFData):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::hintMemoryNotNeededSoon):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::wrapCFData): Deleted.
(WebCore::SharedBuffer::hasPlatformData): Deleted.
(WebCore::SharedBuffer::platformData): Deleted.
(WebCore::SharedBuffer::platformDataSize): Deleted.
(WebCore::SharedBuffer::maybeTransferPlatformData): Deleted.
(WebCore::SharedBuffer::clearPlatformData): Deleted.
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted.
(WebCore::SharedBuffer::maybeAppendPlatformData): Deleted.
(WebCore::SharedBuffer::copyBufferAndClear): Deleted.
(WebCore::SharedBuffer::copySomeDataFromDataArray): Deleted.
(WebCore::SharedBuffer::singleDataArrayBuffer): Deleted.
(WebCore::SharedBuffer::maybeAppendDataArray): Deleted.

  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::replacementData):

  • platform/cocoa/ParentalControlsContentFilter.mm:

(WebCore::ParentalControlsContentFilter::replacementData):

  • platform/cocoa/SharedBufferCocoa.mm:

(-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]):
(-[WebCoreSharedBufferData length]):
(-[WebCoreSharedBufferData bytes]):
(WebCore::SharedBuffer::create):
(WebCore::SharedBuffer::createCFData):
(WebCore::SharedBuffer::createFromReadingFile):
(WebCore::SharedBuffer::createNSDataArray):
(-[WebCoreSharedBufferData initWithSharedBufferDataBuffer:]): Deleted.
(WebCore::SharedBuffer::wrapNSData): Deleted.
(WebCore::SharedBuffer::existingCFData): Deleted.

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

(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::openTypeTable):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(ResourceHandleStreamingClient::didReceiveBuffer):

  • platform/graphics/mac/ImageMac.mm:

(WebCore::Image::loadPlatformResource):

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::create):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageReader::decode):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::readBuffer):

  • platform/mac/PasteboardMac.mm:

(WebCore::writeFileWrapperAsRTFDAttachment):
(WebCore::Pasteboard::write):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::bufferForType):

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::notifyReceiveData):

  • platform/network/MIMEHeader.cpp:
  • platform/network/MIMEHeader.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):

  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:

(-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]):

  • platform/soup/SharedBufferSoup.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::createSoupBuffer):
(WebCore::SharedBuffer::clearPlatformData): Deleted.
(WebCore::SharedBuffer::maybeTransferPlatformData): Deleted.
(WebCore::SharedBuffer::hasPlatformData): Deleted.
(WebCore::SharedBuffer::platformData): Deleted.
(WebCore::SharedBuffer::platformDataSize): Deleted.
(WebCore::SharedBuffer::maybeAppendPlatformData): Deleted.
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Deleted.

Source/WebKit/mac:

  • WebView/WebArchive.mm:

(-[WebArchive initWithData:]):

  • WebView/WebFrame.mm:

(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

  • WebView/WebResource.mm:

(-[WebResource initWithCoder:]):
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):

  • Platform/IPC/DataReference.cpp:

(IPC::SharedBufferDataReference::encode):

  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::wrapInSharedBuffer):

  • UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm:

(-[WKURLSchemeHandlerTaskImpl didReceiveData:]):

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

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::addArchiveResource):
(WebKit::PDFPlugin::liveResourceData):
(WebKit::PDFPlugin::writeItemsToPasteboard):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::redeliverManualStream):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::declareAndWriteDragImage):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::cachedResponseDataForURL):

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:

(TestWebKitAPI::TEST_F):

10:26 AM Changeset in webkit [215685] by mitz@apple.com
  • 16 edits in trunk/Source

[Cocoa] Some ivars are needlessly @protected
https://bugs.webkit.org/show_bug.cgi?id=171208

Source/WebCore:

Reviewed by Anders Carlsson.

Made ivars @private where possible.

  • platform/mac/WebCoreFullScreenPlaceholderView.h:
  • platform/mac/WebCoreFullScreenWarningView.h:
  • platform/mac/WebPlaybackControlsManager.h:
  • platform/network/cocoa/WebCoreNSURLSession.h:

Source/WebKit/mac:

Reviewed by Anders Carlsson

Made ivars @private where possible.

  • Misc/WebUserContentURLPattern.h:
  • Plugins/WebPluginDatabase.h:
  • Storage/WebDatabaseQuotaManager.h:
  • WebCoreSupport/WebSecurityOriginPrivate.h:
  • WebInspector/WebInspector.h:
  • WebView/WebDeviceOrientation.h:
  • WebView/WebDeviceOrientationProviderMock.h:
  • WebView/WebGeolocationPosition.h:
  • WebView/WebHTMLRepresentation.h:
  • WebView/WebNotification.h:
10:21 AM Changeset in webkit [215684] by zandobersek@gmail.com
  • 2 edits in trunk

Unreviewed follow-up to r215681.

  • Source/cmake/OptionsGTK.cmake: Don't re-define the ENABLE_SUBTLE_CRYPTO

macro, that's already done by the option macro.

9:17 AM Changeset in webkit [215683] by Carlos Garcia Campos
  • 27 edits
    11 adds
    2 deletes in trunk

[GTK] Switch to use ENABLE_REMOTE_INSPECTOR instead of ENABLE_INSPECTOR_SERVER for the remote inspector
https://bugs.webkit.org/show_bug.cgi?id=166680

Reviewed by Michael Catanzaro.

.:

Add private option for ENABLE_REMOTE_INSPECTOR and enabled it by default.

  • Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

Add GTK+ port implementation of RemoteInspector.

  • PlatformGTK.cmake:
  • inspector/remote/RemoteConnectionToTarget.h:
  • inspector/remote/RemoteInspector.h:
  • inspector/remote/glib/RemoteConnectionToTargetGlib.cpp: Added.

(Inspector::RemoteConnectionToTarget::RemoteConnectionToTarget):
(Inspector::RemoteConnectionToTarget::~RemoteConnectionToTarget):
(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::sendMessageToTarget):
(Inspector::RemoteConnectionToTarget::close):
(Inspector::RemoteConnectionToTarget::targetClosed):
(Inspector::RemoteConnectionToTarget::targetIdentifier):
(Inspector::RemoteConnectionToTarget::sendMessageToFrontend):

  • inspector/remote/glib/RemoteInspectorGlib.cpp: Added.

(Inspector::RemoteInspector::singleton):
(Inspector::RemoteInspector::RemoteInspector):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::stopInternal):
(Inspector::RemoteInspector::setupConnection):
(Inspector::dbusConnectionCallAsyncReadyCallback):
(Inspector::RemoteInspector::listingForInspectionTarget):
(Inspector::RemoteInspector::listingForAutomationTarget):
(Inspector::RemoteInspector::pushListingsNow):
(Inspector::RemoteInspector::pushListingsSoon):
(Inspector::RemoteInspector::updateAutomaticInspectionCandidate):
(Inspector::RemoteInspector::sendAutomaticInspectionCandidateMessage):
(Inspector::RemoteInspector::sendMessageToRemote):
(Inspector::RemoteInspector::receivedGetTargetListMessage):
(Inspector::RemoteInspector::receivedSetupMessage):
(Inspector::RemoteInspector::receivedDataMessage):
(Inspector::RemoteInspector::receivedCloseMessage):
(Inspector::RemoteInspector::setup):
(Inspector::RemoteInspector::sendMessageToTarget):
(Inspector::RemoteInspector::requestAutomationSession):

  • inspector/remote/glib/RemoteInspectorServer.cpp: Added.

(Inspector::generateConnectionID):
(Inspector::RemoteInspectorServer::singleton):
(Inspector::RemoteInspectorServer::~RemoteInspectorServer):
(Inspector::RemoteInspectorServer::interfaceInfo):
(Inspector::RemoteInspectorServer::start):
(Inspector::RemoteInspectorServer::newConnectionCallback):
(Inspector::RemoteInspectorServer::connectionClosedCallback):
(Inspector::RemoteInspectorServer::newConnection):
(Inspector::dbusConnectionCallAsyncReadyCallback):
(Inspector::RemoteInspectorServer::setTargetList):
(Inspector::RemoteInspectorServer::clientConnectionClosedCallback):
(Inspector::RemoteInspectorServer::getTargetList):
(Inspector::RemoteInspectorServer::setup):
(Inspector::RemoteInspectorServer::close):
(Inspector::RemoteInspectorServer::clientConnectionClosed):
(Inspector::RemoteInspectorServer::connectionClosed):
(Inspector::RemoteInspectorServer::sendMessageToBackend):
(Inspector::RemoteInspectorServer::sendMessageToFrontend):
(Inspector::RemoteInspectorServer::startAutomationSession):

  • inspector/remote/glib/RemoteInspectorServer.h: Added.

(Inspector::RemoteInspectorServer::isRunning):

Source/WebCore:

Add PageDebuggable.cpp to the compilation.

  • CMakeLists.txt:

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add RemoteWebInspectorProxyGtk.cpp.

Source/WebKit2:

Remove INSPECTOR_SERVER code and add new classes to implement REMOTE_INSPECTOR. The WebKitWebContext registers a
custom protocol "inspector" that loads a page with the list of debuggable targets.

  • PlatformGTK.cmake: Add new files to compilation and remove the old ones.
  • UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml: Removed.
  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: Added.

(WebKit::RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler):
(WebKit::RemoteInspectorProtocolHandler::~RemoteInspectorProtocolHandler):
(WebKit::RemoteInspectorProtocolHandler::webViewDestroyed):
(WebKit::RemoteInspectorProtocolHandler::userContentManagerDestroyed):
(WebKit::RemoteInspectorProtocolHandler::handleRequest):
(WebKit::RemoteInspectorProtocolHandler::inspect):
(WebKit::RemoteInspectorProtocolHandler::targetListChanged):
(WebKit::RemoteInspectorProtocolHandler::connectionClosed):

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h: Added.
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):

  • UIProcess/InspectorServer/HTTPRequest.cpp: Add missing ENABLE(INSPECTOR_SERVER) ifdefs.
  • UIProcess/InspectorServer/HTTPRequest.h:
  • UIProcess/InspectorServer/WebInspectorServer.h:
  • UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: Removed.
  • UIProcess/RemoteWebInspectorProxy.cpp:
  • UIProcess/RemoteWebInspectorProxy.h:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/glib/RemoteInspectorClient.cpp: Added.

(WebKit::RemoteInspectorClient::RemoteInspectorClient):
(WebKit::RemoteInspectorClient::~RemoteInspectorClient):
(WebKit::dbusConnectionCallAsyncReadyCallback):
(WebKit::RemoteInspectorClient::connectionClosedCallback):
(WebKit::RemoteInspectorClient::setupConnection):
(WebKit::RemoteInspectorClient::connectionClosed):
(WebKit::RemoteInspectorClient::inspect):
(WebKit::RemoteInspectorClient::sendMessageToBackend):
(WebKit::RemoteInspectorClient::closeFromFrontend):
(WebKit::RemoteInspectorClient::setTargetList):
(WebKit::RemoteInspectorClient::sendMessageToFrontend):

  • UIProcess/glib/RemoteInspectorClient.h: Added.

(WebKit::RemoteInspectorObserver::~RemoteInspectorObserver):
(WebKit::RemoteInspectorClient::targets):
(WebKit::RemoteInspectorClient::hostAndPort):

  • UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp: Added.

(WebKit::RemoteWebInspectorProxy::updateWindowTitle):
(WebKit::inspectorViewDestroyed):
(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
(WebKit::RemoteWebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::RemoteWebInspectorProxy::platformBringToFront):
(WebKit::RemoteWebInspectorProxy::platformSave):
(WebKit::RemoteWebInspectorProxy::platformAppend):
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag):
(WebKit::RemoteWebInspectorProxy::platformOpenInNewTab):

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::initializeRemoteInspectorServer):
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:

(didReceiveMessageToPage): Updated after the GRefPtr hash traitds changes.

  • config.h:

Source/WTF:

Add GRefPtr hash traits to allow using GRefPtr as a key of HashMaps.

  • wtf/glib/GRefPtr.h:

(WTF::HashTraits<GRefPtr<P>>::emptyValue):
(WTF::HashTraits<GRefPtr<P>>::peek):
(WTF::HashTraits<GRefPtr<P>>::customDeleteBucket):

Tools:

Update remote inspector unit tests.

  • TestWebKitAPI/Tests/WebKit2Gtk/InspectorTestServer.cpp:

(main):

  • TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:

(connectToInspectorServer):
(waitUntilInspectorServerIsReady):
(startTestServer):
(testInspectorServerPageList):
(beforeAll):

9:06 AM Changeset in webkit [215682] by commit-queue@webkit.org
  • 19 edits
    1 add in trunk

test262: test262/test/language/expressions/generators/yield-as-label.js
https://bugs.webkit.org/show_bug.cgi?id=170979

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-24
Reviewed by Saam Barati.

JSTests:

  • stress/async-await-module-reserved-word.js:
  • stress/async-await-reserved-word.js:

Converge on "Cannot" instead of "Can't".

  • catch-parameter-syntax.js:
  • yield-named-variable-generator.js:
  • yield-named-variable.js:
  • stress/yield-label-generator.js:
  • stress/yield-label.js:
  • stress/yield-reserved-word.js: Added.

More complete list of when 'yield' is allowed.

  • ChakraCore/test/strict/23.reservedWords_sm.baseline-jsc:
  • test262.yaml:

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseVariableDeclarationList):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseFormalParameters):
Converge on "Cannot" instead of "Can't" in error messages.

(JSC::Parser<LexerType>::parseFunctionInfo):
Disallow "yield" as the generator function name in function expressions.
This refers to the difference between Declaration and Expression, where
only GeneratorExpression explicitly has [+Yield] disallowing yield for
the generator name:

GeneratorDeclaration[Yield, Await, Default]:

function * BindingIdentifier?Await ...

GeneratorExpression:

function * BindingIdentifier[+Yield, ~Await]opt ...

(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
Disallow "yield" as a label name in strict mode or inside a generator.

(JSC::Parser<LexerType>::parseProperty):
Disallow "yield" or any keyword in object literal shorthands.

  • parser/Parser.h:

(JSC::Parser::getToken):
(JSC::Parser::isDisallowedIdentifierLet):
(JSC::Parser::isDisallowedIdentifierYield):
(JSC::Parser::disallowedIdentifierLetReason):
(JSC::Parser::disallowedIdentifierYieldReason):
Follow pattern for improved error messages based on context.

LayoutTests:

  • js/object-literal-shorthand-construction-expected.txt:
  • js/script-tests/object-literal-shorthand-construction.js:

Extend this test to cover object literal shorthand with keywords.

  • js/dom/reserved-words-as-property-expected.txt:
  • js/let-syntax-expected.txt:
  • js/parser-syntax-check-expected.txt:

Improved error messages.

6:15 AM Changeset in webkit [215681] by zandobersek@gmail.com
  • 2 edits in trunk

[GTK] Make the ENABLE_SUBTLE_CRYPTO option depend on libgcrypt 1.7.0
https://bugs.webkit.org/show_bug.cgi?id=171112

Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsGTK.cmake: When ENABLE_SUBTLE_CRYPTO feature is enabled,

the detected libgcrypt library version should be at least 1.7.0 since we'll be
relying on API that was introduced in that version.

Apr 23, 2017:

10:51 PM Changeset in webkit [215680] by commit-queue@webkit.org
  • 19 edits
    1 delete in trunk

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

Possible unintended commit. This patch was on the wrong bug.
(Requested by JoePeck on #webkit).

Reverted changeset:

"test262: test262/test/language/expressions/generators/yield-
as-label.js"
https://bugs.webkit.org/show_bug.cgi?id=170979
http://trac.webkit.org/changeset/215674

2:19 PM Changeset in webkit [215679] by commit-queue@webkit.org
  • 4 edits in trunk

test262: test262/test/built-ins/Number/prototype/toPrecision/nan.js
https://bugs.webkit.org/show_bug.cgi?id=171197

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-23
Reviewed by Saam Barati.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
Refine the order of operations to match the spec.

1:47 PM Changeset in webkit [215678] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[macOS] WKWebInspectorProxyObjCAdapter has a public ivar
https://bugs.webkit.org/show_bug.cgi?id=171200

Reviewed by Geoffrey Garen.

  • UIProcess/API/C/mac/WKInspectorPrivateMac.h: Made ivar private.
1:32 PM Changeset in webkit [215677] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Unreviewed, rolling out r215657 and r215676.
https://bugs.webkit.org/show_bug.cgi?id=171201

Broke the build (Requested by ap on #webkit).

Reverted changesets:

"[macOS] Enable media selection button on AVTouchBarScrubber"
https://bugs.webkit.org/show_bug.cgi?id=171149
http://trac.webkit.org/changeset/215657

"Build fix after r215657."
http://trac.webkit.org/changeset/215676

12:53 PM Changeset in webkit [215676] by ap@apple.com
  • 2 edits in trunk/Source/WebKit2

Build fix after r215657.

  • UIProcess/Cocoa/WebViewImpl.mm:
12:52 PM Changeset in webkit [215675] by commit-queue@webkit.org
  • 2 edits
    3 adds in trunk/Tools

Add a tool to update expected.txt files from EWS bot results
https://bugs.webkit.org/show_bug.cgi?id=169538

Patch by Youenn Fablet <youenn@apple.com> on 2017-04-23
Reviewed by Ryosuke Niwa.

This script updates expected-txt files from bugzilla posted EWS results.
It uses mac-wk2 as the generic baseline and adds platform-specific results if other ports
have results different from the generic baseline.

  • Scripts/update-test-expectations-from-bugzilla: Added.
  • Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py: Added.
  • Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py: Added.
  • Scripts/webkitpy/layout_tests/controllers/test_result_writer.py: Adding helper routines.
10:23 AM Changeset in webkit [215674] by commit-queue@webkit.org
  • 19 edits
    1 add in trunk

test262: test262/test/language/expressions/generators/yield-as-label.js
https://bugs.webkit.org/show_bug.cgi?id=170979

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-23
Reviewed by Saam Barati.

JSTests:

  • stress/async-await-module-reserved-word.js:
  • stress/async-await-reserved-word.js:

Converge on "Cannot" instead of "Can't".

  • catch-parameter-syntax.js:
  • yield-named-variable-generator.js:
  • yield-named-variable.js:
  • stress/yield-label-generator.js:
  • stress/yield-label.js:
  • stress/yield-reserved-word.js: Added.

More complete list of when 'yield' is allowed.

  • ChakraCore/test/strict/23.reservedWords_sm.baseline-jsc:
  • test262.yaml:

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseVariableDeclarationList):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseFormalParameters):
Converge on "Cannot" instead of "Can't" in error messages.

(JSC::Parser<LexerType>::parseFunctionInfo):
Disallow "yield" as the generator function name in function expressions.
This refers to the difference between Declaration and Expression, where
only GeneratorExpression explicitly has [+Yield] disallowing yield for
the generator name:

GeneratorDeclaration[Yield, Await, Default]:

function * BindingIdentifier?Await ...

GeneratorExpression:

function * BindingIdentifier[+Yield, ~Await]opt ...

(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
Disallow "yield" as a label name in strict mode or inside a generator.

(JSC::Parser<LexerType>::parseProperty):
Disallow "yield" or any keyword in object literal shorthands.

  • parser/Parser.h:

(JSC::Parser::getToken):
(JSC::Parser::isDisallowedIdentifierLet):
(JSC::Parser::isDisallowedIdentifierYield):
(JSC::Parser::disallowedIdentifierLetReason):
(JSC::Parser::disallowedIdentifierYieldReason):
Follow pattern for improved error messages based on context.

LayoutTests:

  • js/object-literal-shorthand-construction-expected.txt:
  • js/script-tests/object-literal-shorthand-construction.js:

Extend this test to cover object literal shorthand with keywords.

  • js/dom/reserved-words-as-property-expected.txt:
  • js/let-syntax-expected.txt:
  • js/parser-syntax-check-expected.txt:

Improved error messages.

8:37 AM Changeset in webkit [215673] by commit-queue@webkit.org
  • 7 edits in trunk

test262: test262/test/built-ins/Number/parseFloat.js
https://bugs.webkit.org/show_bug.cgi?id=171193

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-04-23
Reviewed by Yusuke Suzuki.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::parseFloatFunction):
Expose parseFloat on the global object to be shared with Number constructor.

  • runtime/NumberConstructor.cpp:

(JSC::NumberConstructor::finishCreation):
parseFloat uses the same value as the global parseFloat.

4:27 AM Changeset in webkit [215672] by aestes@apple.com
  • 22 edits
    1 add in trunk/Source

[macOS] AVTouchBarMediaSelectionOptions should be created with the correct type
https://bugs.webkit.org/show_bug.cgi?id=171192
<rdar://problem/29875010>

Reviewed by Wenson Hsieh.

Source/WebCore:

AVTouchBarMediaSelectionOption was always being created with type
AVTouchBarMediaSelectionOptionTypeRegular, but we know if a TextTrack is really the legible
off or legible auto track. This change plumbs that information into
WebPlaybackControlsManager so that AVTouchBarMediaSelectionOptions can be created with the
right AVTouchBarMediaSelectionOptionType.

  • WebCore.xcodeproj/project.pbxproj:
  • page/CaptionUserPreferences.cpp:

(WebCore::CaptionUserPreferences::mediaSelectionOptionForTrack):

  • page/CaptionUserPreferences.h:
  • platform/MediaSelectionOption.h: Added.
  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionModelClient::legibleMediaSelectionOptionsChanged):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::audioMediaSelectionOptions):
(WebCore::WebPlaybackSessionModelMediaElement::legibleMediaSelectionOptions):

  • platform/ios/WebPlaybackSessionInterfaceAVKit.h:
  • platform/ios/WebPlaybackSessionInterfaceAVKit.mm:

(WebCore::mediaSelectionOptions):
(WebCore::WebPlaybackSessionInterfaceAVKit::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceAVKit::legibleMediaSelectionOptionsChanged):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::audioMediaSelectionOptionsChanged):
(WebVideoFullscreenControllerContext::legibleMediaSelectionOptionsChanged):
(WebVideoFullscreenControllerContext::audioMediaSelectionOptions):
(WebVideoFullscreenControllerContext::legibleMediaSelectionOptions):

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(toAVTouchBarMediaSelectionOptionType):
(mediaSelectionOptions):
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
(-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MediaSelectionOption>::encode):
(IPC::ArgumentCoder<MediaSelectionOption>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::setAudioMediaSelectionOptions):
(WebKit::WebPlaybackSessionModelContext::setLegibleMediaSelectionOptions):
(WebKit::WebPlaybackSessionManagerProxy::setAudioMediaSelectionOptions):
(WebKit::WebPlaybackSessionManagerProxy::setLegibleMediaSelectionOptions):

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionInterfaceContext::legibleMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManager::audioMediaSelectionOptionsChanged):
(WebKit::WebPlaybackSessionManager::legibleMediaSelectionOptionsChanged):

2:12 AM Changeset in webkit [215671] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Use DoublyLinkedList for MachineThread
https://bugs.webkit.org/show_bug.cgi?id=171171

Reviewed by Mark Lam.

MachineThread can use WTF::DoublyLinkedList to simplify
its implementation. We should not use Vector<> etc. since
we do not want to call allocations during suspending and
resuming threads.

  • heap/MachineStackMarker.cpp:

(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThreadIfFound):
(JSC::MachineThreads::MachineThread::MachineThread):
(JSC::MachineThreads::tryCopyOtherThreadStacks):

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::threadsListHead):

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::isValidFramePointer):

  • runtime/VMTraps.cpp:

(JSC::findActiveVMAndStackBounds):

Note: See TracTimeline for information about the timeline view.