WebKit-https.git
3 years agoRebaselining compositing/geometry/fixed-in-composited.html for macOS after r211523.
ryanhaddad@apple.com [Wed, 1 Feb 2017 22:41:52 +0000 (22:41 +0000)]
Rebaselining compositing/geometry/fixed-in-composited.html for macOS after r211523.
https://bugs.webkit.org/show_bug.cgi?id=167620

Unreviewed test gardening.

* platform/mac/compositing/geometry/fixed-in-composited-expected.txt:

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

3 years agoMarking inspector/debugger/probe-manager-add-remove-actions.html as slow on macOS...
ryanhaddad@apple.com [Wed, 1 Feb 2017 22:41:49 +0000 (22:41 +0000)]
Marking inspector/debugger/probe-manager-add-remove-actions.html as slow on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=167711

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMarking inspector/worker/debugger-shared-breakpoint.html as flaky.
ryanhaddad@apple.com [Wed, 1 Feb 2017 22:34:08 +0000 (22:34 +0000)]
Marking inspector/worker/debugger-shared-breakpoint.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167203

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoSimple line layout: Move TextFragmentIterator::runWidth to ::textWidth.
zalan@apple.com [Wed, 1 Feb 2017 22:25:58 +0000 (22:25 +0000)]
Simple line layout: Move TextFragmentIterator::runWidth to ::textWidth.
https://bugs.webkit.org/show_bug.cgi?id=167705
<rdar://problem/30314393>

Reviewed by Antti Koivisto.

We also don't need to compute logicalHeight for logicalLeft/right since the
cases where it matters (floating boxes) are not supported by simple line layout.

Covered by existing test.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::updateLineConstrains):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::nextBreakablePositionInSegment):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.h:

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

3 years agoFix compilation error under recent clang update
jer.noble@apple.com [Wed, 1 Feb 2017 22:15:07 +0000 (22:15 +0000)]
Fix compilation error under recent clang update
https://bugs.webkit.org/show_bug.cgi?id=167707

Reviewed by Eric Carlson.

Include TypedArrayInlines.h to fix a "missing symbol" link error when compiling under a recent clang update.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

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

3 years agoClean up css3/filters/backdrop/backdrop-filter-with-clip-path.html expected results.
simon.fraser@apple.com [Wed, 1 Feb 2017 22:13:21 +0000 (22:13 +0000)]
Clean up css3/filters/backdrop/backdrop-filter-with-clip-path.html expected results.

https://trac.webkit.org/changeset/201374 added some very confused results for this test.
Just move the -expected.html next to the test, and remove the .txt and .png results.

* css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html: Renamed from LayoutTests/platform/ios-simulator/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.html.
* css3/filters/backdrop/backdrop-filter-with-clip-path-expected.txt: Removed.
* platform/mac/css3/filters/backdrop/backdrop-filter-with-clip-path-expected.png: Removed.

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

3 years agoPatch Details: EWS Bubbles wrap on Patch Details page
joepeck@webkit.org [Wed, 1 Feb 2017 22:08:23 +0000 (22:08 +0000)]
Patch Details: EWS Bubbles wrap on Patch Details page
https://bugs.webkit.org/show_bug.cgi?id=167709

Reviewed by Ryosuke Niwa.

* template/en/default/attachment/edit.html.tmpl:
Match the iframe size in list.html.tmpl.

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

3 years agoPerformance Timeline: Prepare for Worker support
joepeck@webkit.org [Wed, 1 Feb 2017 22:08:21 +0000 (22:08 +0000)]
Performance Timeline: Prepare for Worker support
https://bugs.webkit.org/show_bug.cgi?id=167633

Reviewed by Ryosuke Niwa.

Remove references to Document/Frame in Performance. Instead use
ScriptExecutionContext and pass in the time origin / SecurityOrigin
where it is relevant. No tests should change this is just refactoring.

* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::performance):
* page/Performance.cpp:
(WebCore::Performance::Performance):
(WebCore::Performance::now):
(WebCore::Performance::reduceTimeResolution):
(WebCore::Performance::navigation):
(WebCore::Performance::timing):
(WebCore::Performance::addResourceTiming):
(WebCore::Performance::scriptExecutionContext): Deleted.
* page/Performance.h:
* page/Performance.idl:
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDOMHighResTimeStamp):
(WebCore::passesTimingAllowCheck):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::redirectStart):
(WebCore::PerformanceResourceTiming::redirectEnd):
(WebCore::PerformanceResourceTiming::fetchStart):
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
(WebCore::PerformanceResourceTiming::responseStart):
(WebCore::PerformanceResourceTiming::responseEnd):
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp):
(WebCore::monotonicTimeToDocumentMilliseconds): Deleted.
(WebCore::PerformanceResourceTiming::initiatorType): Deleted.
(WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds): Deleted.
* page/PerformanceResourceTiming.h:
* page/PerformanceUserTiming.cpp:
(WebCore::UserTiming::findExistingMarkStartTime):

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

3 years ago[Mac] TestWebKitAPI includes system frameworks incorrectly
ap@apple.com [Wed, 1 Feb 2017 22:02:04 +0000 (22:02 +0000)]
[Mac] TestWebKitAPI includes system frameworks incorrectly
https://bugs.webkit.org/show_bug.cgi?id=167703
rdar://problem/30301498

Reviewed by Ryosuke Niwa.

FRAMEWORK_SEARCH_PATH results in frameworks being treated as user ones, not system.
Make TestWebKitAPI use -iframework instead, like the rest of WebKit does.

Also, reduced the number of subframework search paths, looks like we only need one now.

* TestWebKitAPI/Configurations/Base.xcconfig:

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

3 years agoREGRESSION (r211379): [ios-simulator] LayoutTest compositing/geometry/fixed-in-compos...
simon.fraser@apple.com [Wed, 1 Feb 2017 21:44:18 +0000 (21:44 +0000)]
REGRESSION (r211379): [ios-simulator] LayoutTest compositing/geometry/fixed-in-composited.html is failing
https://bugs.webkit.org/show_bug.cgi?id=167620
rdar://problem/30309207

The body needs to be taller to allow the scrollBy() to be a stable scroll.

* compositing/geometry/fixed-in-composited.html:

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

3 years agoREGRESSION(r205136): {}.toString.call(crossOriginWindow) should not throw
cdumez@apple.com [Wed, 1 Feb 2017 20:13:05 +0000 (20:13 +0000)]
REGRESSION(r205136): {}.toString.call(crossOriginWindow) should not throw
https://bugs.webkit.org/show_bug.cgi?id=167681
<rdar://problem/30301117>

Reviewed by Mark Lam.

LayoutTests/imported/w3c:

Rebaseline W3C test now that we passing one more check. We're still failing
later because {}.toString.call(crossOriginWindow) returns "[object Window]"
instead of "[object Object]". I am planning to fix this in a follow-up.
This is not a regression since we were returning "[object Window]" before
r205136.

* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/WebCore:

As per https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-):
"""
If P is @@toStringTag, @@hasInstance, or @@isConcatSpreadable, then return
PropertyDescriptor{ [[Value]]: undefined, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
"""

We now implement this behavior instead of throwing.

Test: http/tests/security/symbols-cross-origin.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):

LayoutTests:

Add layout test coverage.

* http/tests/security/symbols-cross-origin-expected.txt: Added.
* http/tests/security/symbols-cross-origin.html: Added.

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

3 years agoUnreviewed, fix the WebKit nightly open source build
wenson_hsieh@apple.com [Wed, 1 Feb 2017 20:03:48 +0000 (20:03 +0000)]
Unreviewed, fix the WebKit nightly open source build
<rdar://problem/30308635>

We cannot assume all internal SDKs have the latest WebKitAdditions, so we need an explicit header check here.

* wtf/Platform.h:

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

3 years agoCorrect "filesHaveSameVolume" predicate
bfulgham@apple.com [Wed, 1 Feb 2017 20:00:18 +0000 (20:00 +0000)]
Correct "filesHaveSameVolume" predicate
https://bugs.webkit.org/show_bug.cgi?id=167696
<rdar://problem/30298722>

Reviewed by David Kilzer.

Source/WebCore:

We are passing %-encoded strings to the underlying operating system's file system APIs.
This doesn't work. Instead, we need to present a decoded version of the file path
that matches what the system APIs expect.

Tested by new TestWebKitAPI Test.

* platform/FileSystem.cpp:
(WebCore::filesHaveSameVolume): Make sure the file paths we give to the underlying
operating system are not percent encoded.
* platform/FileSystem.h: Export 'filesHaveSameVolume' for use by testing system.

Tools:

Add new tests that confirm that the 'filesHaveSamePath' predicate properly handles
percent-escaped path inputs.

* TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
(TestWebKitAPI::FileSystemTest::spaceContainingFilePath):
(TestWebKitAPI::FileSystemTest::bangContainingFilePath):
(TestWebKitAPI::FileSystemTest::quoteContainingFilePath):
(TestWebKitAPI::TEST_F):

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

3 years ago[mac-wk1] LayoutTest media/modern-media-controls/tracks-support/tracks-support-click...
commit-queue@webkit.org [Wed, 1 Feb 2017 19:54:25 +0000 (19:54 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165319
<rdar://problem/30284104>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-01
Reviewed by Dean Jackson.

Source/WebCore:

Running media/controls/track-menu.html before media/modern-media-controls/tracks-support/tracks-
support-click-track-in-panel.html makes that test time out in all test runs. The root of the issue
is that animations are suspended by media/controls/track-menu.html with a call to
internals.suspendAnimations(), and that state isn't reset with a call to internals.resumeAnimations().
Then, media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html fails because
the selection animation for the tracks panel menu item that is clicked never completes and the delegate
to notify that an item in the tracks panel was selected is never fired, which leads to the test failure.

We change Internals::suspendAnimations() and Internals::resumeAnimations() to only affect the current
document, rather than calling into AnimationController::suspendAnimations() which would do just that,
but also set a Frame-wide flag that would prevent further animations from running, even in a subsequent
document load.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Ensure the document that is about to be destroyed is no longer
associated with an AnimationController.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Update the animation's suspend state in case
the document its renderer is associated with is suspended. This is required since previously CompositeAnimations
would set their suspend state in their constructor, based on the Frame-wide suspended state, but there is no
document to use as a basis to query its suspended state in that constructor.
(WebCore::AnimationControllerPrivate::animationsAreSuspendedForDocument):
(WebCore::AnimationControllerPrivate::detachFromDocument):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended):
(WebCore::AnimationController::animationsAreSuspendedForDocument):
(WebCore::AnimationController::detachFromDocument):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
* testing/Internals.cpp:
(WebCore::Internals::animationsAreSuspended):
(WebCore::Internals::suspendAnimations):
(WebCore::Internals::resumeAnimations):

LayoutTests:

Since we've fixed the root cause of this test's flakiness, we no longer need to mark it as flaky.

* platform/mac/TestExpectations:

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

3 years agoUnreviewed build fix after r211488.
ryanhaddad@apple.com [Wed, 1 Feb 2017 19:44:07 +0000 (19:44 +0000)]
Unreviewed build fix after r211488.

* accessibility/AXObjectCache.h: Removed property svn:executable.

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

3 years agoUnreviewed, remove loop
utatane.tea@gmail.com [Wed, 1 Feb 2017 18:34:31 +0000 (18:34 +0000)]
Unreviewed, remove loop
https://bugs.webkit.org/show_bug.cgi?id=167694

It causes timeout.
Original bug can be tested even without this loop.

* stress/arity-fixup-should-not-touch-stack-area-below-sp.js:

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

3 years agoUnreviewed build fix.
bfulgham@apple.com [Wed, 1 Feb 2017 18:31:05 +0000 (18:31 +0000)]
Unreviewed build fix.

* html/HTMLMediaElement.h: Removed property svn:executable.

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

3 years agoNULL-deref crash in TextTrack::removeCue()
jer.noble@apple.com [Wed, 1 Feb 2017 18:22:21 +0000 (18:22 +0000)]
NULL-deref crash in TextTrack::removeCue()
https://bugs.webkit.org/show_bug.cgi?id=167615

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/track-in-band-hls-metadata-crash.html

Follow-up to r211401. When passing around a reference to an object, the assumption is that
the caller is retaining the underlying object. This breaks down for
InbandDataTextTrack::removeDataCue(), which releases its own ownership of the cue object,
then passes the reference to that object to its superclass to do further remove steps. The
retain count of the cue can thus drop to zero within the scope of
InbandTextTrack::removeCue(). Use "take" semantics to remove the cue from the
m_incompleteCueMap without releasing ownership, and pass a reference to that retained object
on to removeCue(), guaranteeing that the cue will not be destroyed until after the
romeveDataCue() method returns.

* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::removeDataCue):

LayoutTests:

* http/tests/media/track-in-band-hls-metadata-crash-expected.txt: Added.
* http/tests/media/track-in-band-hls-metadata-crash.html: Added.

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

3 years ago[WK1] Allow the drag client to be initialized on platforms that do not support drag...
wenson_hsieh@apple.com [Wed, 1 Feb 2017 18:15:13 +0000 (18:15 +0000)]
[WK1] Allow the drag client to be initialized on platforms that do not support drag and drop
https://bugs.webkit.org/show_bug.cgi?id=167695
<rdar://problem/30305390>

Reviewed by Sam Weinig.

Due to the common codepath for destroying the drag client, we need to ensure that the drag client actually
exists, even on platforms that do not support drag and drop, in order to avoid crashing when the DragController
is destroyed.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

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

3 years agoAX: Incorrect range from index and length in text controls when there are newlines
n_wang@apple.com [Wed, 1 Feb 2017 18:12:08 +0000 (18:12 +0000)]
AX: Incorrect range from index and length in text controls when there are newlines
https://bugs.webkit.org/show_bug.cgi?id=167677
<rdar://problem/30300099>

Reviewed by Chris Fleizach.

Source/WebCore:

When there are newlines in text controls, the VisiblePosition that is created
from the index could be wrong. Because the index doesn't include the information
regarding a position's affinity. Fixed it by using CharacterOffset instead, since
it doesn't require that information.

Test: accessibility/mac/range-for-contenteditable-newline.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::nextCharacterOffset):
(WebCore::AXObjectCache::characterOffsetForIndex):

LayoutTests:

* accessibility/mac/range-for-contenteditable-newline-expected.txt: Added.
* accessibility/mac/range-for-contenteditable-newline.html: Added.

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

3 years agoios-simulator TestExpectations gardening.
ryanhaddad@apple.com [Wed, 1 Feb 2017 17:54:05 +0000 (17:54 +0000)]
ios-simulator TestExpectations gardening.

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoAXObjectCache is missing two functions at link time when !HAVE(ACCESSIBILITY)
timothy@hatcher.name [Wed, 1 Feb 2017 17:46:12 +0000 (17:46 +0000)]
AXObjectCache is missing two functions at link time when !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=167691

Reviewed by Chris Fleizach.

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::recomputeDeferredIsIgnored): Added empty stub.
(WebCore::AXObjectCache::performDeferredIsIgnoredChange): Added empty stub.

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

3 years agoHTMLMediaElement.h fails to build when ENABLE(MEDIA_CONTROLS_SCRIPT) is false
timothy@hatcher.name [Wed, 1 Feb 2017 17:37:03 +0000 (17:37 +0000)]
HTMLMediaElement.h fails to build when ENABLE(MEDIA_CONTROLS_SCRIPT) is false
https://bugs.webkit.org/show_bug.cgi?id=167689

Reviewed by Joseph Pecoraro.

* html/HTMLMediaElement.h: Move mediaControlsHost() into the ENABLE(MEDIA_CONTROLS_SCRIPT)
block that is just above it to match m_mediaControlsHost.

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

3 years agoWeb Inspector: Use guaranteed RunLoop instead of RunLoop::current for dispatching...
commit-queue@webkit.org [Wed, 1 Feb 2017 17:34:00 +0000 (17:34 +0000)]
Web Inspector: Use guaranteed RunLoop instead of RunLoop::current for dispatching inspector GC event
https://bugs.webkit.org/show_bug.cgi?id=167683
<rdar://problem/30167791>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-01
Reviewed by Timothy Hatcher.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):
Use RunLoop::main instead of RunLoop::current which may go away.

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
Ensure RunLoop::main is initialized when using JSC APIs.

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

3 years agoWeb Inspector: Remove keyboard shortcut to close tab - does not match expectations
commit-queue@webkit.org [Wed, 1 Feb 2017 17:33:56 +0000 (17:33 +0000)]
Web Inspector: Remove keyboard shortcut to close tab - does not match expectations
https://bugs.webkit.org/show_bug.cgi?id=167672

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-01
Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):

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

3 years ago[Readable Streams API] Implement ReadableByteStreamController pull()
commit-queue@webkit.org [Wed, 1 Feb 2017 16:17:52 +0000 (16:17 +0000)]
[Readable Streams API] Implement ReadableByteStreamController pull()
https://bugs.webkit.org/show_bug.cgi?id=167593

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-02-01
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented pull() method for ReadableByteStreamController. Also updated
pendingPullIntos attribute, which was a more complex object than necessary
(an array is enough).

Added 2 tests that allow covering most of new code. Code not yet tested will
become reachable as the rest of the spec is implemented (new tests will then
be added).

* Modules/streams/ReadableByteStreamInternals.js:
(privateInitializeReadableByteStreamController): Updated pendingPullIntos.
(readableByteStreamControllerCancel): Updated pendingPullIntos.
(readableByteStreamControllerClose): Updated pendingPullIntos.
(readableByteStreamControllerHandleQueueDrain): Added.
(readableByteStreamControllerPull): Added.

LayoutTests:

Added 2 tests that allow covering most of new code. Code not yet tested will
become reachable as the rest of the spec is implemented (new tests will then
be added).

* streams/readable-byte-stream-controller-expected.txt:
* streams/readable-byte-stream-controller.js:

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

3 years agoUnreviewed. Fix coding style in MiniBrowser
tpopela@redhat.com [Wed, 1 Feb 2017 15:28:08 +0000 (15:28 +0000)]
Unreviewed. Fix coding style in MiniBrowser

* MiniBrowser/gtk/BrowserWindow.c:
(editingCommandCallback):
(insertImageCommandCallback):
(insertLinkCommandCallback):

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

3 years agoImplement the alwaysRunsAtBackgroundPriority WK2 setting using thread QoS.
akling@apple.com [Wed, 1 Feb 2017 14:55:00 +0000 (14:55 +0000)]
Implement the alwaysRunsAtBackgroundPriority WK2 setting using thread QoS.
<https://webkit.org/b/167387>
<rdar://problem/29711409>

Reviewed by Antti Koivisto.

Source/bmalloc:

Support changing the QoS level of the scavenger thread asynchronously through
a request variable. This is not the most elegant thing in the world, but since
threads are only allowed to change their own QoS class, our options are limited.

* bmalloc/Heap.cpp:
(bmalloc::Heap::concurrentScavenge):
* bmalloc/Heap.h:
(bmalloc::Heap::takeRequestedScavengerThreadQOSClass):
(bmalloc::Heap::setScavengerThreadQOSClass):
* bmalloc/bmalloc.h:
(bmalloc::api::setScavengerThreadQOSClass):

Source/WebKit2:

Remove the old ProcessThrottlerClient implementation of alwaysRunsAtBackgroundPriority
and replace it with WTF::setGlobalMaxQOSClass().

If the setting is enabled, it's passed over to each WK2 child process along with its
bootstrap parameter, and we notify WTF in XPCServiceInitializer(), before anything
too threading related happens.

* Platform/IPC/Connection.cpp:
(IPC::Connection::processIncomingMessage):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::ChildProcessProxy):
(WebKit::ChildProcessProxy::getLaunchOptions):
* UIProcess/ChildProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::DatabaseProcessProxy):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy):
(WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::assertionState):
* UIProcess/ProcessThrottlerClient.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority): Deleted.
* UIProcess/WebProcessProxy.h:

Source/WTF:

Add a new mechanism for overriding the max thread QoS level globally:

    void setGlobalMaxQOSClass(qos_class_t)
    qos_class_t adjustedQOSClass(qos_class_t)

The QoS cap applies to all newly created threads, threads that try to override
their QoS class manually, and also passed down to bmalloc.

* wtf/Threading.cpp:
(WTF::setCurrentThreadIsUserInteractive):
(WTF::setCurrentThreadIsUserInitiated):
(WTF::setGlobalMaxQOSClass):
(WTF::adjustedQOSClass):
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::dispatchQOSClass):

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

3 years ago[GTK] Add an API to add a custom tab into the print dialog
tpopela@redhat.com [Wed, 1 Feb 2017 14:14:36 +0000 (14:14 +0000)]
[GTK] Add an API to add a custom tab into the print dialog
https://bugs.webkit.org/show_bug.cgi?id=151998

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Add a new create-custom-widget signal to the WebKitPrintOperation. The
signal is emitted before the dialog is displayed and it gives an
opportunity to embed a custom widget in the dialog. You can do so by
creating a new WebKitPrintCustomWidget and returning it from the
create-custom-widget signal handler. The WebKitPrintCustomWidget is
emitting two signals:
  - update - emitted when the currently selected printer is changed,
             to be able to actualize the custom widget based on the
             current printer
  - apply - emitted when the dialog is closed, just before the
            printing will start, to be able e.g. to change content
            based on the custom widget state.

* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitAutocleanups.h:
* UIProcess/API/gtk/WebKitPrintCustomWidget.cpp: Added.
(webkitPrintCustomWidgetSetProperty):
(webkit_print_custom_widget_class_init):
(webkit_print_custom_widget_new):
(webkit_print_custom_widget_get_widget):
(webkit_print_custom_widget_get_title):
(webkitPrintCustomWidgetEmitCustomWidgetApplySignal):
(webkitPrintCustomWidgetEmitUpdateCustomWidgetSignal):
* UIProcess/API/gtk/WebKitPrintCustomWidget.h: Added.
* UIProcess/API/gtk/WebKitPrintCustomWidgetPrivate.h: Added.
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(webkitPrintOperationAccumulatorObjectHandled):
(webkit_print_operation_class_init):
(notifySelectedPrinterCallback):
(webkitPrintOperationRunDialog):
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/webkit2.h:

Tools:

Add a new WebKitPrintOperation/custom-widget test in TestPrinting
that is testing a newly added API.

* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
(testPrintCustomWidget):
(beforeAll):

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

3 years agoLoad resources speculatively
antti@apple.com [Wed, 1 Feb 2017 13:38:49 +0000 (13:38 +0000)]
Load resources speculatively
https://bugs.webkit.org/show_bug.cgi?id=167660

Reviewed by Andreas Kling.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::makeEntry):

    Factor to a function.

(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

    Support loads where we don't have existing cache entry to validate.

(WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):

    Synthesize a NetworkCache::Entry if we can't store it.

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
(WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
(WebKit::NetworkCache::SpeculativeLoad::abort):
(WebKit::NetworkCache::SpeculativeLoad::didComplete):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::constructRevalidationRequest):

    Make having existing cache entry optional.

(WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):

    Allow validation without validation headers (that is, normal load).

(WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):

    Make having existing cache entry optional.

(WebKit::NetworkCache::canRevalidate):

    Allow speculative loads without validation headers if we have high confidence that the
    page is going to request this resource again. This is based on the time span we have
    seen this resource being loaded on a given page and how much time has elapsed since we
    last loaded it.

    For example if we have seen the resource over the last 10 days we'll speculate that it will
    be required for the next 5 days.

(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): Deleted.
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):

    Encode the firstSeen and lastSeen time stamps.

(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
(WebKit::NetworkCache::makeSubresourceInfoVector):
(WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
(WebKit::NetworkCache::SubresourcesEntry::updateSubresourceLoads):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
(WebKit::NetworkCache::SubresourceInfo::lastSeen):
(WebKit::NetworkCache::SubresourceInfo::firstSeen):
(WebKit::NetworkCache::SubresourceInfo::setNonTransient):
(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo): Deleted.
(WebKit::NetworkCache::SubresourceInfo::setTransient): Deleted.

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

3 years agoArityFixup should adjust SP first
utatane.tea@gmail.com [Wed, 1 Feb 2017 11:29:25 +0000 (11:29 +0000)]
ArityFixup should adjust SP first
https://bugs.webkit.org/show_bug.cgi?id=167239

Reviewed by Michael Saboff.

JSTests:

Significantly large arity fixup reliably causes this crash.

* stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.

Source/JavaScriptCore:

Arity fixup extends the stack and copy/fill the stack with
the values. At that time, we accidentally read/write stack
space below the stack pointer. As a result, we touch the area
of the stack space below the x64 red zone. These areas are unsafe.
OS may corrupt this space when constructing a signal stack.
The Linux kernel could not populate the pages for this space
and causes segmentation fault. This patch changes the stack
pointer before performing the arity fixup.

* jit/ThunkGenerators.cpp:
(JSC::arityFixupGenerator):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

3 years ago[GStreamer][MSE] qtdemux: Update the tfdt patch to the version finally accepted upstream
eocanha@igalia.com [Wed, 1 Feb 2017 10:59:17 +0000 (10:59 +0000)]
[GStreamer][MSE] qtdemux: Update the tfdt patch to the version finally accepted upstream
https://bugs.webkit.org/show_bug.cgi?id=166529

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline): Don't use the "always-honor-tfdt" property
in qtdemux anymore.

Tools:

* gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch:
New patch version accepted in GStreamer upstream.

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

3 years ago[GTK] Install either libxfont1-dev or libxfont-dev as dependency
calvaris@igalia.com [Wed, 1 Feb 2017 10:58:52 +0000 (10:58 +0000)]
[GTK] Install either libxfont1-dev or libxfont-dev as dependency
https://bugs.webkit.org/show_bug.cgi?id=167498

Reviewed by Carlos Garcia Campos.

Depending on the distro version you can need either libxfont1-dev
or libfont-dev to build with jhbuild.

* gtk/install-dependencies:

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

3 years ago[Mac][cmake] Unreviewed speculative buildfix after r211403.
ossy@webkit.org [Wed, 1 Feb 2017 10:46:10 +0000 (10:46 +0000)]
[Mac][cmake] Unreviewed speculative buildfix after r211403.
https://bugs.webkit.org/show_bug.cgi?id=167601

* UIProcess/API/Cocoa/WKWebView.mm:

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

3 years agoUnreviewed, build fix for macOS and iOS ports, part 2
utatane.tea@gmail.com [Wed, 1 Feb 2017 10:42:35 +0000 (10:42 +0000)]
Unreviewed, build fix for macOS and iOS ports, part 2

Annotate the function with static.

* bindings/js/ScriptModuleLoader.cpp:
(WebCore::rejectToPropagateNetworkError):

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

3 years agoUnreviewed, build fix for macOS and iOS ports
utatane.tea@gmail.com [Wed, 1 Feb 2017 10:32:33 +0000 (10:32 +0000)]
Unreviewed, build fix for macOS and iOS ports

* bindings/js/ModuleFetchFailureKind.h: Renamed from Source/ModuleFetchFailureKind.h.

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

3 years agoPropagate networking errors correctly for import() operator
utatane.tea@gmail.com [Wed, 1 Feb 2017 10:00:32 +0000 (10:00 +0000)]
Propagate networking errors correctly for import() operator
https://bugs.webkit.org/show_bug.cgi?id=167501

Reviewed by Ryosuke Niwa.

.:

* Source/ModuleFetchFailureKind.h: Added.

Source/WebCore:

We use the promise chain inside the module loader pipeline.
The problem is that,

1. The errors of loading module scripts are propagated through the promise's rejection.
2. Some module related errors like syntax error (when scanning module dependencies) are
   reported at loading time (evaluating time). These errors are propagated through the
   promise rejections and dumped to the console. LoadableModuleScript set catch handler
   for that and print these errors to the console for ScriptElement.
3. Some of errors are already reported to the console. For example, networking errors
   are reported by the CachedModuleLoader.
4. But there is no way to distinguish between (2) and (3) at the catch handler.

Previously, we propagate the special symbol for the already reported errors to distinguish
that. This was OK because these errors cannot be catched by the user code. However,
recent `import()` call needs to expose these errors to the user code. So now, accidentally,
the special purpose symbol is exposed.

Instead of propagating the special symbol, this patch just propagates the errors. But these
error objects are annotated with the private symbol. So these errors can be distinguished
from the other ones.

Currently, we do not have the way to expose the error details to the client of the
CachedScript. So we just report the error with the failed / canceled. This should be
more descriptive error messages in the separate patch[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=167553

Tests: http/tests/security/mixedContent/import-insecure-script-in-iframe.html
       js/dom/modules/import-not-found-error.html

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredPromise::resolveWithCallback):
(WebCore::DeferredPromise::rejectWithCallback):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::setupModuleScriptHandlers):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::moduleLoaderAlreadyReportedErrorSymbol): Deleted.
(WebCore::ScriptController::moduleLoaderFetchingIsCanceledSymbol): Deleted.
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::rejectToPropagateNetworkError):
(WebCore::ScriptModuleLoader::fetch):
(WebCore::ScriptModuleLoader::notifyFinished):
* bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

* http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt: Added.
* http/tests/security/mixedContent/import-insecure-script-in-iframe.html: Added.
* http/tests/security/mixedContent/resources/frame-with-insecure-import.html: Added.
* js/dom/modules/import-not-found-error-expected.txt: Added.
* js/dom/modules/import-not-found-error.html: Added.

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

3 years agoTeach cache coders to encode time_points
antti@apple.com [Wed, 1 Feb 2017 07:55:44 +0000 (07:55 +0000)]
Teach cache coders to encode time_points
https://bugs.webkit.org/show_bug.cgi?id=167670

Reviewed by Andreas Kling.

Source/WebKit2:

Encode time_point instead of duration.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::traverse):

Source/WTF:

* wtf/persistence/Coders.h:
(WTF::Persistence::Coder<std::chrono::system_clock::time_point>::encode):
(WTF::Persistence::Coder<std::chrono::system_clock::time_point>::decode):

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

3 years agoRegression (Safari 10.1): Pressing Return in a contenteditable no longer inserts...
wenson_hsieh@apple.com [Wed, 1 Feb 2017 07:46:31 +0000 (07:46 +0000)]
Regression (Safari 10.1): Pressing Return in a contenteditable no longer inserts a line break under certain conditions
https://bugs.webkit.org/show_bug.cgi?id=167525
<rdar://problem/30270210>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/events/input-events-insert-newlines-after-mutation.html

Reverts an unintended change made while refactoring code for input events that caused input events to be
dispatched immediately rather than on the scoped queue. Normally, input events are dispatched in
CompositeEditCommand::apply after the end of the scope, but TypingCommands may fire input events *from within*
the scope by calling typingAddedToOpenCommand.

Instead, TypingCommands should always dispatch events
synchronously after the end of the scoped queue in CompositeEditCommand::apply, but this is a riskier change
than we should currently allow, so we should revert to our old behavior for the time being.

* editing/Editor.cpp:

LayoutTests:

Adds a new test covering newline insertion with mutation observers and an input event handler. Also rebaselines
a drag and drop test to account for dispatching input events on the scoped queue.

* fast/events/input-events-drag-and-drop-expected.txt:
* fast/events/input-events-insert-newlines-after-mutation-expected.txt: Added.
* fast/events/input-events-insert-newlines-after-mutation.html: Added.
* platform/ios-simulator/TestExpectations:

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

3 years ago[WebRTC][WebKit2] Support expanding the sandbox to allow microphone access at process...
bfulgham@apple.com [Wed, 1 Feb 2017 06:07:51 +0000 (06:07 +0000)]
[WebRTC][WebKit2] Support expanding the sandbox to allow microphone access at process launch
https://bugs.webkit.org/show_bug.cgi?id=167669
<rdar://problem/29974333>

Reviewed by Alexey Proskuryakov.

This change implements a temporary workaround to <rdar://problem/29448368> to allow us to do live
testing of WebRTC microphone access. It should be removed when that underlying bug is fixed.

This change adds a new process creation parameter that indicates whether we wish to expand the
sandbox to allow microphone access.

Tested by WebRTC suite (part of another set of bugs).

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Serialize the audio access entitlement handle.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess): Create an entitlement handle and pass along to
the child process.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): If an audio entitlement (for the microphone)
was desired, expand the sandbox to include access.

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

3 years agoRemoved unused m_nestedCount from RunLoop
commit-queue@webkit.org [Wed, 1 Feb 2017 05:40:17 +0000 (05:40 +0000)]
Removed unused m_nestedCount from RunLoop
https://bugs.webkit.org/show_bug.cgi?id=167674

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-31
Reviewed by Sam Weinig.

* wtf/RunLoop.h:
* wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::run):

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

3 years agold: warning: instance method '_setAutofilled:' in category conflicts with same method...
joepeck@webkit.org [Wed, 1 Feb 2017 05:34:31 +0000 (05:34 +0000)]
ld: warning: instance method '_setAutofilled:' in category conflicts with same method from another category
https://bugs.webkit.org/show_bug.cgi?id=167684

Reviewed by Dan Bernstein.

* DOM/DOMHTML.mm:
(-[DOMHTMLInputElement _isAutofilled]): Deleted.
(-[DOMHTMLInputElement _setAutofilled:]): Deleted.
Consolidate in the WebDOMOperationsPrivate category.

* DOM/DOMPrivate.h:
Include WebDOMOperationsPrivate header to get other DOM Private categories.

* DOM/WebDOMOperations.mm:
(-[DOMHTMLInputElement _isAutofilled]):
* DOM/WebDOMOperationsPrivate.h:
Include getter alongside the setter.

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

3 years agoDisable API test WebKit2.WKWebProcessPlugInRangeHandle
ryanhaddad@apple.com [Wed, 1 Feb 2017 03:56:10 +0000 (03:56 +0000)]
Disable API test WebKit2.WKWebProcessPlugInRangeHandle
https://bugs.webkit.org/show_bug.cgi?id=167594

Unreviewed test gardening.

Disabling this test while we investigate the cause of a timeout on ios-simulator.

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

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

3 years agoSimple line layout: Do not assert on zero length/width trailing whitespace.
zalan@apple.com [Wed, 1 Feb 2017 03:19:23 +0000 (03:19 +0000)]
Simple line layout: Do not assert on zero length/width trailing whitespace.
https://bugs.webkit.org/show_bug.cgi?id=167679

Reviewed by Simon Fraser.

It's valid to have an zero length/width trailing whitespace.

Covered by existing tests.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace): Zero length -> nothing to do.
Zero width with length > 0 (font-size: 0) -> remove trailing run.

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

3 years agoMarking gamepad/gamepad-visibility-1.html as flaky.
ryanhaddad@apple.com [Wed, 1 Feb 2017 02:16:55 +0000 (02:16 +0000)]
Marking gamepad/gamepad-visibility-1.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167517

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMove slow-running microbenchmarks out of JSTests/microbenchmarks
fpizlo@apple.com [Wed, 1 Feb 2017 01:48:18 +0000 (01:48 +0000)]
Move slow-running microbenchmarks out of JSTests/microbenchmarks
https://bugs.webkit.org/show_bug.cgi?id=167676

Reviewed by Saam Barati.
JSTests:

The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks.
This is a big progression in test running time. But because it frontloads more slow tests, the
tests will seem to run more slowly when you first start the test runner.

* microbenchmarks/default-derived-constructor.js: Removed.
* microbenchmarks/dense-set.js: Removed.
* microbenchmarks/ftl-polymorphic-div.js: Removed.
* microbenchmarks/ftl-polymorphic-mul.js: Removed.
* microbenchmarks/function-bind-inlining.js: Removed.
* microbenchmarks/function-bind-no-inlining.js: Removed.
* microbenchmarks/large-map-iteration-with-additions.js: Removed.
* microbenchmarks/large-map-iteration-with-mutation.js: Removed.
* microbenchmarks/map-get-get-cse.js: Removed.
* microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
* microbenchmarks/spread-small-array.js: Removed.
* microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
* slowMicrobenchmarks: Added.
* slowMicrobenchmarks.yaml: Added.
* slowMicrobenchmarks/README: Added.
* slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
* slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
* slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
* slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
* slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
* slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
* slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
* slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
* slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
* slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
* slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
* slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.

Tools:

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Add slowMicrobenchmarks.yaml.

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

3 years agoMake verifyEdge a RELEASE_ASSERT
fpizlo@apple.com [Wed, 1 Feb 2017 01:46:33 +0000 (01:46 +0000)]
Make verifyEdge a RELEASE_ASSERT
<rdar://problem/30296879>

Rubber stamped by Saam Barati.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

3 years agoWeb Inspector: Tooltip text should not end in a period
commit-queue@webkit.org [Wed, 1 Feb 2017 01:26:58 +0000 (01:26 +0000)]
Web Inspector: Tooltip text should not end in a period
https://bugs.webkit.org/show_bug.cgi?id=167130

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-01-31
Reviewed by Brian Burg.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/BezierEditor.js:
(WebInspector.BezierEditor):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
* UserInterface/Views/GeneralTabBarItem.js:
(WebInspector.GeneralTabBarItem):
* UserInterface/Views/HeapSnapshotContentView.js:
(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotObjectGraphContentView):
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype._updateEntries):
(WebInspector.ObjectTreeView.prototype._updateProperties):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
* UserInterface/Views/SpringEditor.js:
(WebInspector.SpringEditor):
* UserInterface/Views/TypeTreeElement.js:
(WebInspector.TypeTreeElement.prototype.onpopulate):
* UserInterface/Views/TypeTreeView.js:
(WebInspector.TypeTreeView.prototype._populate):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._generateSection.createOptionsElement):
* UserInterface/Views/VisualStylePropertyEditorLink.js:
(WebInspector.VisualStylePropertyEditorLink.prototype.set linked):
* UserInterface/Views/VisualStylePropertyNameInput.js:
(WebInspector.VisualStylePropertyNameInput):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateCheckboxTitle):
(WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):

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

3 years agoOSR entry: delay outer-loop compilation when at inner-loop
jfbastien@apple.com [Wed, 1 Feb 2017 01:26:00 +0000 (01:26 +0000)]
OSR entry: delay outer-loop compilation when at inner-loop
https://bugs.webkit.org/show_bug.cgi?id=167149

Reviewed by Filip Pizlo.

r211224 was reverted because it caused a massive kraken/ai-astar
regression. This patch instead does the minimally-disruptive
change to fix the original bug as described below, but omits extra
tuning and refactoring which I had before. I'll commit tuning and
refactoring separately, if this sticks. This patch is therefore
very minimal, and layers carefully on top of the complex
spaghetti-logic. The only change it makes is that it uses triggers
to indicate to outer loops that they should compile, which fixes
the immediate bug and seems roughly perf neutral (maybe a small
gain on kraken sometimes, other times a small regression as would
be expected from compiling later).

As of https://bugs.webkit.org/show_bug.cgi?id=155217 OSR
compilation can be kicked off for an entry into an outer-loop,
while executing an inner-loop. This is desirable because often the
codegen from an inner-entry isn't as good as the codegen from an
outer-entry, but execution from an inner-loop is often pretty hot
and likely to kick off compilation. This approach provided nice
speedups on Kraken because we'd select to enter to the outer-loop
very reliably, which reduces variability (the inner-loop was
selected roughly 1/5 times from my unscientific measurements).

When compilation starts we take a snapshot of the JSValues at the
current execution state using OSR's recovery mechanism. These
values are passed to the compiler and are used as way to perform
type profiling, and could be used to observe cell types as well as
to perform predictions such as through constant propagation.

It's therefore desired to enter from the outer-loop when we can,
but we need to be executing from that location to capture the
right JSValues, otherwise we're confusing the compiler and giving
it inaccurate JSValues which can lead it to predict the wrong
things, leading to suboptimal code or recompilation due to
misprediction, or in super-corner-cases a crash.

These effects are pretty hard to measure: Fil points out that
marsalis-osr-entry really needs mustHandleValues (the JSValues
from the point of execution) because right now it just happens to
correctly guess int32. I tried removing mustHandleValues entirely
and saw no slowdowns, but our benchmarks probably aren't
sufficient to reliably find issues, sometimes because we happen to
have sufficient mitigations.

DFG tier-up was added here:
https://bugs.webkit.org/show_bug.cgi?id=112838

* dfg/DFGOperations.cpp:

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

3 years agoMake Dump Render Tree not crash
megan_gardner@apple.com [Wed, 1 Feb 2017 01:04:03 +0000 (01:04 +0000)]
Make Dump Render Tree not crash
https://bugs.webkit.org/show_bug.cgi?id=167667

DumpRenderTree is crashing when running WK2 tests that it's not supposed to be running.
DumpRenderTree uses RunLoop::main.dispatch(), but that crashes because it's not set up on iOS.
So we're making use of RunWebThread, which is the correct thing to do on iOS, and it doesn't crash.
This does not fix any tests, it just fixes the crash.

Reviewed by Simon Fraser.

* DumpRenderTree/TestRunner.cpp:
(TestRunner::callUIScriptCallback):

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

3 years agoFix the build.
timothy_horton@apple.com [Wed, 1 Feb 2017 00:39:56 +0000 (00:39 +0000)]
Fix the build.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

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

3 years agoFix debug libwebrtc build after r211439
achristensen@apple.com [Wed, 1 Feb 2017 00:18:35 +0000 (00:18 +0000)]
Fix debug libwebrtc build after r211439
https://bugs.webkit.org/show_bug.cgi?id=167572

* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::OnMessage):

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

3 years agoWorkaround for simctl install failing to report install failure
jbedard@apple.com [Wed, 1 Feb 2017 00:15:44 +0000 (00:15 +0000)]
Workaround for simctl install failing to report install failure
https://bugs.webkit.org/show_bug.cgi?id=167654

Reviewed by Daniel Bates.

simctl install will sometimes report success even though install has failed.
To workaround this bug, we attempt an app launch after install to ensure
install has succeeded.

* Scripts/webkitpy/xcode/simulator.py:
(Device.install_app): Attempt app launch after install, retry install if launch fails.
(Device.launch_app): Correct comment.

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

3 years agoSimple line layout: Collect fragments in LineState only when needed for post-processing.
zalan@apple.com [Wed, 1 Feb 2017 00:01:26 +0000 (00:01 +0000)]
Simple line layout: Collect fragments in LineState only when needed for post-processing.
https://bugs.webkit.org/show_bug.cgi?id=167655
<rdar://problem/30290592>

Reviewed by Antti Koivisto.

The fragments we need to keep around for basic line breaking are the last and last non-whitespace fragments.
However in certain cases such as text-align: justify, we have to traverse the entire line
at post-processing which requires all the fragments on the current line.
This patch speeds up the basic line handling by using m_fragment list only for the special cases.
It improves PerformanceTests/Layout/simple-line-layout-non-repeating-text.html by ~7% (local measurement)
median: 114.25 runs/s -> median: 122.16 runs

Covered by existing tests.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::setNeedsAllFragments):
(WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::lastFragment):
(WebCore::SimpleLineLayout::LineState::expansionOpportunityCount):
(WebCore::SimpleLineLayout::LineState::isEmpty):
(WebCore::SimpleLineLayout::LineState::endPositionForCollapsedFragment):
(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Track uncompleted width.
(WebCore::SimpleLineLayout::LineState::revertToLastCompleteFragment):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::updateLineConstrains): Set the slow path for text-align: justify.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isValid):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::length):

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

3 years agocom.apple.WebKit.WebContent.Development crashed in com.apple.WebCore: WebCore::FrameV...
cdumez@apple.com [Tue, 31 Jan 2017 23:49:10 +0000 (23:49 +0000)]
com.apple.WebKit.WebContent.Development crashed in com.apple.WebCore: WebCore::FrameView::didDestroyRenderTree
https://bugs.webkit.org/show_bug.cgi?id=167665
<rdar://problem/30241193>

Reviewed by Andreas Kling.

When destroying a PageCache entry, we would call Document::prepareFromDestruction()
which would destroy the render tree and then call FrameView::didDestroyRenderTree().
We would sometimes hit the ASSERT(m_widgetsInRenderTree.isEmpty()) assertion in
didDestroyRenderTree(). This indicates that there are still RenderWidgets associated
with the FrameView even though we claim we already destroyed the render tree.

The reason for this is that, in the PageCache context, the top document's frame is
reused on navigation and may not be associated with a new document that is currently
displayed, has a render tree (and possible RenderWidgets). The solution proposed is
to stop calling FrameView::didDestroyRenderTree() in Document::prepareFromDestruction()
if the frame's document is not |this|. This happens when the document is destroyed
while in PageCache. We do not want to mess with the frame / frameview in this case
since they are no longer associated to the present document anymore.

No new tests, already covered by existing tests which currently crash flakily.

* dom/Document.cpp:
(WebCore::Document::destroyRenderTree):

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

3 years agoRemove unused/rarely used bindings helpers
commit-queue@webkit.org [Tue, 31 Jan 2017 23:38:47 +0000 (23:38 +0000)]
Remove unused/rarely used bindings helpers
https://bugs.webkit.org/show_bug.cgi?id=167648

Patch by Sam Weinig <sam@webkit.org> on 2017-01-31
Reviewed by Anders Carlsson.

* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
(WebCore::jsString): Deleted.
(WebCore::jsStringOrUndefined): Deleted.
(WebCore::finiteInt32Value): Deleted.
(WebCore::toJS): Deleted.
Remove unused functions. The toJS overrides can be replaced with their
modern JSDOMConvert counterparts.

* bindings/js/JSDOMExceptionHandling.h:
(WebCore::toJS): Deleted.
(WebCore::toJSNewlyCreated): Deleted.
Remove unused functions.

* bindings/js/JSDOMIterator.h:
Add more specific include of JSDOMConvert.h to fix compile.

* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredPromise::reject):
Create the Symbol directly, instead of using the toJS override.

* bindings/js/JSWorkerCustom.cpp:
(WebCore::constructJSWorker):
Use JSDOMConvert toJS function.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::retrieveResponse):
Use JSDOMConvert toJS functions.

* bindings/js/ScriptController.h:
Add missing forward declaration of URL.

* bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::resolve):
Create the Symbol directly, instead of using the toJS override.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
Use JSDOMConvert toJS functions.

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

3 years agoWebItemProviderPasteboard should be robust when UIItemProvider fails to initialize...
wenson_hsieh@apple.com [Tue, 31 Jan 2017 23:28:22 +0000 (23:28 +0000)]
WebItemProviderPasteboard should be robust when UIItemProvider fails to initialize an object
https://bugs.webkit.org/show_bug.cgi?id=167663
<rdar://problem/30294240>

Reviewed by Tim Horton.

Adds a nil check for the result of -createObjectOfClass:error:.

* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard _tryToCreateAndAppendObjectOfClass:toArray:usingProvider:]):

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

3 years agoWeb Inspector: add CSS color keyword entries for all grey/gray variations
commit-queue@webkit.org [Tue, 31 Jan 2017 23:24:24 +0000 (23:24 +0000)]
Web Inspector: add CSS color keyword entries for all grey/gray variations
https://bugs.webkit.org/show_bug.cgi?id=167668

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-01-31
Reviewed by Matt Baker.

* UserInterface/Models/Color.js:
(WebInspector.Color.Keywords):

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

3 years agoWeb Inspector: Network tab: provide a way to preserve log on navigation
commit-queue@webkit.org [Tue, 31 Jan 2017 23:22:56 +0000 (23:22 +0000)]
Web Inspector: Network tab: provide a way to preserve log on navigation
https://bugs.webkit.org/show_bug.cgi?id=166908

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-01-31
Reviewed by Matt Baker.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Base/Setting.js:
(WebInspector.settings):
Add clearNetworkOnNavigate global setting.

* UserInterface/Views/NetworkGridContentView.css:
(.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content):
(.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content .timeline-record-bar > .segment):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype._mainResourceDidChange):
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > :not(.status)):
(.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > .icon):
* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel):
(WebInspector.NetworkSidebarPanel.prototype._mainResourceDidChange):
Add styling to preserved network records.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
Only reset the persistent network timeline if the clearNetworkOnNavigate setting is true.

* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView):
Add checkbox and spacers for new setting.

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

3 years agoAdding ios-simulator result file for fast/shadow-dom/copy-shadow-tree.html.
ryanhaddad@apple.com [Tue, 31 Jan 2017 22:44:54 +0000 (22:44 +0000)]
Adding ios-simulator result file for fast/shadow-dom/copy-shadow-tree.html.

Unreviewed test gardening.

* platform/ios-simulator/fast/shadow-dom/copy-shadow-tree-expected.txt: Added.

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

3 years agoVariable used after it's been WTFMove'd
krollin@apple.com [Tue, 31 Jan 2017 22:40:50 +0000 (22:40 +0000)]
Variable used after it's been WTFMove'd
https://bugs.webkit.org/show_bug.cgi?id=167658

Reviewed by Chris Dumez.

Rather than WTFMoving the variable as part of passing it to a function
that takes an RValue-ref, call copyRef to provide the RValue-ref. This
preserves the original variable for later use in the function.

No new tests -- this issue was found by inspection. It's not apparent
what the side-effect of this bug is or how a test would verify it.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

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

3 years agoThe mutator should be able to perform increments of GC work
fpizlo@apple.com [Tue, 31 Jan 2017 22:31:24 +0000 (22:31 +0000)]
The mutator should be able to perform increments of GC work
https://bugs.webkit.org/show_bug.cgi?id=167528

Reviewed by Keith Miller and Geoffrey Garen.

Source/JavaScriptCore:

The cool thing about having a concurrent and parallel collector is that it's easy to also make
it incremental, because the load balancer can also hand over work to anyone (including the
mutator) and since the collector is running concurrently anyway, the mutator can usually rely
on the balancer having some spare work.

This change adds a classic work-based incremental mode to the GC. When you allocate K bytes,
you have to do Options::gcIncrementScale() * K "bytes" of draining. This is ammortized so that
it only happens in allocation slow paths.

On computers that have a lot of CPUs, this mode is not profitable and we set gcIncrementScale
to zero. On such computers, Riptide was already performing great because there was no way that
one mutator thread could outpace many GC threads. But on computers with fewer CPUs, there were
problems having to do with making the collector progress quickly enough so that the heap
doesn't grow too much. The stochastic scheduler actually made things worse, because it relies
a lot on the fact that the GC will simply be faster than the mutator anyway. The old scheduler
claimed to address the problem of GC pace, but it used a time-based scheduler, which is not as
precise at keeping pase as the new work-based incremental mode.

In theory, the work-based mode guarantees a bound on how much the heap can grow during a
collection just because each byte allocated means some number of bytes visited. We don't try
to create such a theoretical bound. We're just trying to give the collector an unfair advantage
in any race with the mutator.

Turning on incremental mode, the stochastic scheduler, and passive draining in combination with
each other is a huge splay-latency speed-up on my iPad. It's also a CDjs progression. It does
regress splay-throughput, but I think that's fine (the regression is 11%, the progression is
3x).

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::markToFixpoint):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::endMarking):
(JSC::Heap::finalize):
(JSC::Heap::didAllocate):
(JSC::Heap::visitCount):
(JSC::Heap::bytesVisited):
(JSC::Heap::forEachSlotVisitor):
(JSC::Heap::performIncrement):
(JSC::Heap::threadVisitCount): Deleted.
(JSC::Heap::threadBytesVisited): Deleted.
* heap/Heap.h:
* heap/MarkStack.cpp:
(JSC::MarkStackArray::transferTo):
* heap/MarkStack.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::clearMarkStacks):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::noteLiveAuxiliaryCell):
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::performIncrementOfDraining):
(JSC::SlotVisitor::didReachTermination):
(JSC::SlotVisitor::hasWork):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::donateAll):
(JSC::SlotVisitor::correspondingGlobalStack):
* heap/SlotVisitor.h:
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::reportExtraMemoryVisited):
(JSC::SlotVisitor::forEachMarkStack):
* heap/SpaceTimeMutatorScheduler.cpp:
(JSC::SpaceTimeMutatorScheduler::log):
* heap/StochasticSpaceTimeMutatorScheduler.cpp:
(JSC::StochasticSpaceTimeMutatorScheduler::log):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionHeapCapacity):
* runtime/Options.cpp:
(JSC::overrideDefaults):
* runtime/Options.h:

Source/WTF:

We want dataLog to be locked even if you're not logging to a file!

* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):

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

3 years agoLayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide...
ryanhaddad@apple.com [Tue, 31 Jan 2017 22:22:22 +0000 (22:22 +0000)]
LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167266

Unreviewed test gardening.

Marking this test as flaky again.

* platform/mac/TestExpectations:

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

3 years agoApple Pay button does nothing on nytimes.com
andersca@apple.com [Tue, 31 Jan 2017 22:03:59 +0000 (22:03 +0000)]
Apple Pay button does nothing on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=167664
rdar://problem/30273885

Reviewed by Sam Weinig.

Source/WebCore:

Separate line item validation into convertAndValidateTotal and convertAndValidate. The former
works on totals (which require an amount), and the latter works on regular line items that do not require an amount
if the item type is "pending".

* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidateTotal):
(WebCore::convertAndValidate):
Only check the amount if the type is not pending.

(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
Call convertAndValidateTotal for totals.

LayoutTests:

Add a new test.

* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:

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

3 years agoWeb Inspector: User Settings: Secondary-clicking the New Tab and Settings tabs should...
commit-queue@webkit.org [Tue, 31 Jan 2017 21:04:27 +0000 (21:04 +0000)]
Web Inspector: User Settings: Secondary-clicking the New Tab and Settings tabs should not produce a context menu
https://bugs.webkit.org/show_bug.cgi?id=167651

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-01-31
Reviewed by Joseph Pecoraro.

* UserInterface/Views/PinnedTabBarItem.js:
(WebInspector.PinnedTabBarItem):
(WebInspector.PinnedTabBarItem.prototype._handleContextMenuEvent):
Always preventDefault() to ensure that the system context menu is never shown.

* UserInterface/Views/TabBar.js:
(WebInspector.TabBar):
(WebInspector.TabBar.prototype.get newTabTabBarItem):
(WebInspector.TabBar.prototype._handleNewTabContextMenu): Deleted.
Move the event dispatch to WebInspector.PinnedTabBarItem to give all instances a contextmenu
event handler.

* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):

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

3 years agoAdd framerate baselines to the splay-detail test
fpizlo@apple.com [Tue, 31 Jan 2017 20:45:45 +0000 (20:45 +0000)]
Add framerate baselines to the splay-detail test
https://bugs.webkit.org/show_bug.cgi?id=167659

Reviewed by Geoffrey Garen.

* JetStream/Octane2/splay-detail.html:

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

3 years agoAdd more CRASH calls to try to figure out why we're failing to send mach ports over...
andersca@apple.com [Tue, 31 Jan 2017 20:25:46 +0000 (20:25 +0000)]
Add more CRASH calls to try to figure out why we're failing to send mach ports over the wire
https://bugs.webkit.org/show_bug.cgi?id=167657

Reviewed by Tim Horton.

* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openFrontendConnection):

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

3 years agoCrash when trying to compute global location when the WKContentView does not have...
wenson_hsieh@apple.com [Tue, 31 Jan 2017 19:49:34 +0000 (19:49 +0000)]
Crash when trying to compute global location when the WKContentView does not have a window
https://bugs.webkit.org/show_bug.cgi?id=167627
<rdar://problem/30272380>

Reviewed by Beth Dakin.

Moves data interaction state out of OpenSource and into WebKitAdditions. Work towards fixing a crash in
<rdar://problem/30272380>.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView resignFirstResponder]):

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

3 years ago[WebRTC] Add support for WK2 libwebrtc endpoint
commit-queue@webkit.org [Tue, 31 Jan 2017 19:37:24 +0000 (19:37 +0000)]
[WebRTC] Add support for WK2 libwebrtc endpoint
https://bugs.webkit.org/show_bug.cgi?id=167306
<rdar://problem/30245426>

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-31
Reviewed by Alex Christensen.

Implementation of the LibWebRTC networking in WebKit2.
The following features are required to be moved from WebProcess to NetworkProcess:
1 Resolution of DNS names (RTCResolver)
2 Enumeration of interfaces/gathering of host addresses (RTCMonitor)
3 Implementation of Packet Socket for TCP/UDP communication (RTCSocket).

This patch implements the related classes in WebProcess/NetworkProcess and the integration with libwebrtc.
NetworkProcess implementation is using libwebetc for NetworkRTCMonitor and NetworkRTCSocket.
This ensures an as-close implementation to libwebrtc as possible.
In the future, after getting a better test infrastructure we should try to implement these using native APIs.

Currently, the implementation is as follow:
- libwebrtc is calling WebProcess stack on the rtc network thread
- WebProcess stack is forwarding calls to the main thread and makes related IPC calls
- NetworkProcess receives the IPC calls and forward them to the rtc network thread.
- The calls are processed in the rtc network thread
Conversely, when the rtc network thread wants to notify its client, the reverse path is used.

This patch also implements the LibWebRTCProvider for WebKit2.
This provider uses the related classes to create a peer connection factory that will use them.

* CMakeLists.txt:
* DerivedSources.make:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::rtcProvider):
(WebKit::NetworkConnectionToWebProcess::didClose):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: Added.
(WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
(WebKit::LibWebRTCSocketClient::sendTo):
(WebKit::LibWebRTCSocketClient::close):
(WebKit::LibWebRTCSocketClient::setOption):
(WebKit::LibWebRTCSocketClient::signalReadPacket):
(WebKit::LibWebRTCSocketClient::signalSentPacket):
(WebKit::LibWebRTCSocketClient::signalAddressReady):
(WebKit::LibWebRTCSocketClient::signalConnect):
(WebKit::LibWebRTCSocketClient::signalClose):
* NetworkProcess/webrtc/LibWebRTCSocketClient.h: Added.
* NetworkProcess/webrtc/NetworkRTCMonitor.cpp: Added.
(WebKit::NetworkRTCMonitor::startUpdating):
(WebKit::NetworkRTCMonitor::stopUpdating):
(WebKit::NetworkRTCMonitor::onNetworksChanged):
* NetworkProcess/webrtc/NetworkRTCMonitor.h: Added.
* NetworkProcess/webrtc/NetworkRTCMonitor.messages.in: Added.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp: Added.
(WebKit::createThread):
(WebKit::NetworkRTCProvider::NetworkRTCProvider):
(WebKit::NetworkRTCProvider::close):
(WebKit::NetworkRTCProvider::createUDPSocket):
(WebKit::NetworkRTCProvider::createServerTCPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):
(WebKit::NetworkRTCProvider::addSocket):
(WebKit::NetworkRTCProvider::takeSocket):
(WebKit::NetworkRTCProvider::didReceiveNetworkRTCSocketMessage):
(WebKit::NetworkRTCProvider::createResolver):
(WebKit::NetworkRTCProvider::stopResolver):
(WebKit::NetworkRTCProvider::resolvedName):
(WebKit::NetworkMessageData::NetworkMessageData):
(WebKit::NetworkRTCProvider::OnMessage):
(WebKit::NetworkRTCProvider::callOnRTCNetworkThread):
(WebKit::NetworkRTCProvider::callSocket):
(WebKit::NetworkRTCProvider::sendFromMainThread):
* NetworkProcess/webrtc/NetworkRTCProvider.h: Added.
(WebKit::NetworkRTCProvider::create):
(WebKit::NetworkRTCProvider::didReceiveNetworkRTCMonitorMessage):
(WebKit::NetworkRTCProvider::Resolver::Resolver):
(WebKit::NetworkRTCProvider::Resolver::~Resolver):
* NetworkProcess/webrtc/NetworkRTCProvider.messages.in: Added.
* NetworkProcess/webrtc/NetworkRTCSocket.cpp: Added.
(WebKit::NetworkRTCSocket::NetworkRTCSocket):
(WebKit::NetworkRTCSocket::sendTo):
(WebKit::NetworkRTCSocket::close):
(WebKit::NetworkRTCSocket::setOption):
* NetworkProcess/webrtc/NetworkRTCSocket.h: Added.
* NetworkProcess/webrtc/NetworkRTCSocket.messages.in: Added.
* Shared/RTCNetwork.cpp: Added.
(WebKit::RTCNetwork::RTCNetwork):
(WebKit::ips):
(WebKit::RTCNetwork::value):
(WebKit::RTCNetwork::IPAddress::decode):
(WebKit::RTCNetwork::IPAddress::encode):
(WebKit::RTCNetwork::decode):
(WebKit::RTCNetwork::encode):
* Shared/RTCNetwork.h: Added.
(WebKit::RTCNetwork::IPAddress::IPAddress):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
* WebProcess/Network/webrtc/LibWebRTCNetwork.h: Added.
(WebKit::LibWebRTCNetwork::monitor):
(WebKit::LibWebRTCNetwork::socketFactory):
(WebKit::LibWebRTCNetwork::socket):
(WebKit::LibWebRTCNetwork::resolver):
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp: Added.
(WebKit::LibWebRTCProvider::createPeerConnection):
* WebProcess/Network/webrtc/LibWebRTCProvider.h: Added.
* WebProcess/Network/webrtc/LibWebRTCResolver.cpp: Added.
(WebKit::sendOnMainThread):
(WebKit::LibWebRTCResolver::Start):
(WebKit::LibWebRTCResolver::GetResolvedAddress):
(WebKit::LibWebRTCResolver::Destroy):
(WebKit::LibWebRTCResolver::setResolvedAddress):
(WebKit::LibWebRTCResolver::setError):
* WebProcess/Network/webrtc/LibWebRTCResolver.h: Added.
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp: Added.
(WebKit::sendOnMainThread):
(WebKit::LibWebRTCSocket::LibWebRTCSocket):
(WebKit::LibWebRTCSocket::~LibWebRTCSocket):
(WebKit::LibWebRTCSocket::GetLocalAddress):
(WebKit::LibWebRTCSocket::GetRemoteAddress):
(WebKit::LibWebRTCSocket::signalAddressReady):
(WebKit::LibWebRTCSocket::signalReadPacket):
(WebKit::LibWebRTCSocket::signalSentPacket):
(WebKit::LibWebRTCSocket::signalConnect):
(WebKit::LibWebRTCSocket::signalClose):
(WebKit::authKey):
(WebKit::LibWebRTCSocket::willSend):
(WebKit::LibWebRTCSocket::SendTo):
(WebKit::LibWebRTCSocket::Close):
(WebKit::LibWebRTCSocket::GetOption):
(WebKit::LibWebRTCSocket::SetOption):
* WebProcess/Network/webrtc/LibWebRTCSocket.h: Added.
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: Added.
(WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
(WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
(WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCSocketFactory::detach):
(WebKit::LibWebRTCSocketFactory::CreateAsyncResolver):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.h: Added.
* WebProcess/Network/webrtc/WebRTCMonitor.cpp: Added.
(WebKit::sendOnMainThread):
(WebKit::WebRTCMonitor::StartUpdating):
(WebKit::WebRTCMonitor::StopUpdating):
(WebKit::WebRTCMonitor::networksChanged):
* WebProcess/Network/webrtc/WebRTCMonitor.h: Added.
* WebProcess/Network/webrtc/WebRTCMonitor.messages.in: Added.
* WebProcess/Network/webrtc/WebRTCResolver.cpp: Added.
(WebKit::WebRTCResolver::WebRTCResolver):
(WebKit::WebRTCResolver::setResolvedAddress):
(WebKit::WebRTCResolver::resolvedAddressError):
* WebProcess/Network/webrtc/WebRTCResolver.h: Added.
* WebProcess/Network/webrtc/WebRTCResolver.messages.in: Added.
* WebProcess/Network/webrtc/WebRTCSocket.cpp: Added.
(WebKit::WebRTCSocket::signalOnNetworkThread):
(WebKit::WebRTCSocket::WebRTCSocket):
(WebKit::WebRTCSocket::signalAddressReady):
(WebKit::WebRTCSocket::signalReadPacket):
(WebKit::WebRTCSocket::signalSentPacket):
(WebKit::WebRTCSocket::signalConnect):
(WebKit::WebRTCSocket::signalClose):
* WebProcess/Network/webrtc/WebRTCSocket.h: Added.
* WebProcess/Network/webrtc/WebRTCSocket.messages.in: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeLibWebRTC):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::libWebRTC):

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

3 years agoUnreviewed, fix layout tests added in r211435.
cdumez@apple.com [Tue, 31 Jan 2017 18:59:23 +0000 (18:59 +0000)]
Unreviewed, fix layout tests added in r211435.

It is important that window.open() is called *after* testRunner.waitUntilDone()
has been called or you'll hit assertions in DRT.

* http/tests/security/cross-origin-window-open-insert-script.html:
* http/tests/security/cross-origin-window-open-javascript-url.html:

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

3 years ago[WebRTC] Add a libwebrtc AudioModule specific to WebKit
commit-queue@webkit.org [Tue, 31 Jan 2017 18:57:57 +0000 (18:57 +0000)]
[WebRTC] Add a libwebrtc AudioModule specific to WebKit
https://bugs.webkit.org/show_bug.cgi?id=167572

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

To be covered by webrtc audio tests.
Adding an AudioModule to circumvent the default LibWebRTC Audio Module which does the audio directly.
The implementation of the AudioModule is restricted to enable fueling the incoming audio tracks with incoming data.
Code inspired from https://chromium.googlesource.com/chromium/src/+/master/remoting/protocol/webrtc_audio_module.h

* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp: Added.
(WebCore::LibWebRTCAudioModule::LibWebRTCAudioModule):
(WebCore::LibWebRTCAudioModule::RegisterAudioCallback):
(WebCore::LibWebRTCAudioModule::OnMessage):
(WebCore::LibWebRTCAudioModule::StartPlayout):
(WebCore::LibWebRTCAudioModule::StopPlayout):
(WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):
(WebCore::LibWebRTCAudioModule::PollFromSource):
* platform/mediastream/libwebrtc/LibWebRTCAudioModule.h: Added.
* platform/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::ThreadMessageData::ThreadMessageData):
(WebCore::initializePeerConnectionFactoryAndThreads):

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

3 years agoBuild fix.
jberlin@webkit.org [Tue, 31 Jan 2017 18:41:54 +0000 (18:41 +0000)]
Build fix.

Source/WebCore:

* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::takeFindStringFromSelection):
(WebCore::Editor::replaceNodeFromPasteboard):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingDataTransfer):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createForDragAndDrop):

Source/WebKit/mac:

* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _fontAttributesFromFontPasteboard]):
(-[WebHTMLView copyFont:]):

Source/WebKit2:

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::dragImageForView):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
(WebKit::PDFPlugin::handleEditingCommand):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate pdfLayerController:copyItems:withTypes:]):
(WebKit::PDFPlugin::handleEditingCommand):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteAttachment):
(WebKit::WebDragClient::declareAndWriteDragImage):

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

3 years ago[Mac] Add an audio stream description class
eric.carlson@apple.com [Tue, 31 Jan 2017 18:18:44 +0000 (18:18 +0000)]
[Mac] Add an audio stream description class
https://bugs.webkit.org/show_bug.cgi?id=167639

Reviewed by Youenn Fablet.

No new tests, the new class is not used yet.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/AudioStreamDescription.h: Added.
(WebCore::AudioStreamDescription::isPCM):
* platform/audio/mac/CAAudioStreamDescription.cpp: Added.
(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::platformDescription):
(WebCore::CAAudioStreamDescription::format):
(WebCore::toCAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::operator==):
(WebCore::operator==):
* platform/audio/mac/CAAudioStreamDescription.h: Added.
(WebCore::operator!=):
(WebCore::CAAudioStreamDescription::bytesPerFrame):
(WebCore::CAAudioStreamDescription::bytesPerPacket):
(WebCore::CAAudioStreamDescription::formatFlags):
(WebCore::CAAudioStreamDescription::operator==):
(WebCore::CAAudioStreamDescription::operator!=):
(WebCore::CAAudioStreamDescription::streamDescription):

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

3 years agoRTCPeerConnection methods can take dictionaries as input
commit-queue@webkit.org [Tue, 31 Jan 2017 17:52:33 +0000 (17:52 +0000)]
RTCPeerConnection methods can take dictionaries as input
https://bugs.webkit.org/show_bug.cgi?id=167590

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

Source/WebCore:

Test: webrtc/rtcpeerconnection-error-messages.html

Made addIceCandidate/setRemoteDescription/setLocalDescription take either dictionaries or objects as parameter.
Spec only mandates this for addIceCandidate, but sites may be using the old version for setRemoteDescription and setLocalDescription.

Updated RTCPeerConnection methods error messages.

* Modules/mediastream/RTCPeerConnection.js:
(getLocalStreams):
(getStreamById):
(addStream):
(createOffer):
(createAnswer):
(setLocalDescription):
(setRemoteDescription):
(addIceCandidate):
(getStats):
* Modules/mediastream/RTCPeerConnectionInternals.js:

LayoutTests:

Replacing fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html by webrtc/rtcpeerconnection-error-messages.html.
It is a bit more thorough and does not hard code the error message.

* fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-addIceCandidate.html:
* fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: Removed.
* fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html: Removed.
* fast/mediastream/RTCPeerConnection-setLocalDescription-offer-expected.txt:
* fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html:
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html:
* webrtc/rtcpeerconnection-error-messages-expected.txt: Added.
* webrtc/rtcpeerconnection-error-messages.html: Added.

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

3 years agoAdd better test coverage for scripting windows opened via window.open()
cdumez@apple.com [Tue, 31 Jan 2017 17:21:42 +0000 (17:21 +0000)]
Add better test coverage for scripting windows opened via window.open()
https://bugs.webkit.org/show_bug.cgi?id=167531

Reviewed by Brent Fulgham.

Add better test coverage for scripting windows opened via window.open().

* http/tests/security/cross-origin-window-open-insert-script-expected.txt: Added.
* http/tests/security/cross-origin-window-open-insert-script.html: Added.
* http/tests/security/cross-origin-window-open-javascript-url-expected.txt: Added.
* http/tests/security/cross-origin-window-open-javascript-url.html: Added.

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

3 years agoCompilation error in JSArrayBufferView.h
tpopela@redhat.com [Tue, 31 Jan 2017 16:52:00 +0000 (16:52 +0000)]
Compilation error in JSArrayBufferView.h
https://bugs.webkit.org/show_bug.cgi?id=167642

Reviewed by Alex Christensen.

* runtime/JSArrayBufferView.h:
(JSC::JSArrayBufferView::vector):

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

3 years agoREGRESSION (r209411): Scrolling to a fragment identifier in overflow:scroll inside...
simon.fraser@apple.com [Tue, 31 Jan 2017 16:09:38 +0000 (16:09 +0000)]
REGRESSION (r209411): Scrolling to a fragment identifier in overflow:scroll inside position:fixed no longer works
https://bugs.webkit.org/show_bug.cgi?id=167630
rdar://problem/30091558

Reviewed by Zalan Bujtas.
Source/WebCore:

r209411 added special handling for scrolling inside position:fixed, but cut off all scrolling, breaking
overflow:scroll inside position:fixed. Fix by only handling the position:fixed case when we get to
the root layer, which is where we scroll the document.

Test: fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::getRectToExpose):

LayoutTests:

* fast/overflow/scroll-anchor-in-overflow-in-position-fixed-expected.txt: Added.
* fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html: Added.

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

3 years agoWeb Inspector: Address some ESLint warnings
commit-queue@webkit.org [Tue, 31 Jan 2017 15:59:52 +0000 (15:59 +0000)]
Web Inspector: Address some ESLint warnings
https://bugs.webkit.org/show_bug.cgi?id=167634

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

* UserInterface/Base/DOMUtilities.js:
(WebInspector.linkifyNodeReference):
(isSimiliarNode):
(WebInspector.xpathIndex):
These empty statements were supposed to be returns!

* UserInterface/Base/Main.js:
* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
* UserInterface/Models/DOMNode.js:
* UserInterface/Protocol/Connection.js:
(InspectorBackend.Connection):
(InspectorBackend.MainConnection):
(InspectorBackend.WorkerConnection):
* UserInterface/Protocol/MainTarget.js:
(WebInspector.MainTarget):
* UserInterface/Protocol/WorkerTarget.js:
(WebInspector.WorkerTarget):
* UserInterface/Test/Test.js:
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
* UserInterface/Views/ConsoleSession.js:
(WebInspector.ConsoleSession):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Address pedantic warnings for consistent style.

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

3 years agoUnreviewed webkitpy fix after r211405.
jbedard@apple.com [Tue, 31 Jan 2017 15:49:54 +0000 (15:49 +0000)]
Unreviewed webkitpy fix after r211405.

* Scripts/webkitpy/xcode/simulator.py:
(Device.launch_app): Remove @staticmethod on _log_debug_error.

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

3 years ago[EFL][GTK] Skip some IndexedDB tests that time out on the Perf bots.
clopez@igalia.com [Tue, 31 Jan 2017 15:33:00 +0000 (15:33 +0000)]
[EFL][GTK] Skip some IndexedDB tests that time out on the Perf bots.

Unreviewed performance test gardening.

* Skipped:

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

3 years ago[EME] InitDataRegistry should use base64url encoding and decoding for keyids
zandobersek@gmail.com [Tue, 31 Jan 2017 11:41:07 +0000 (11:41 +0000)]
[EME] InitDataRegistry should use base64url encoding and decoding for keyids
https://bugs.webkit.org/show_bug.cgi?id=167592

Reviewed by Jer Noble.

Source/WebCore:

In InitDataRegistry, WTF::base64URLEncode() and WTF::base64URLDecode() should
be used to encode and decode the 'keyids' initialization data format, as
required by the relevant specification.
https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html#format

Relevant test case was added to media/encrypted-media/mock-MediaKeySession-generateRequest.html.

* Modules/encryptedmedia/InitDataRegistry.cpp:
(WebCore::extractKeyIDsKeyids):
(WebCore::sanitizeKeyids):

LayoutTests:

* media/encrypted-media/mock-MediaKeySession-generateRequest-expected.txt:
* media/encrypted-media/mock-MediaKeySession-generateRequest.html: Include a test case
that passes an init data JSON to generateRequest() that fails to decode when using the
plain base64 decoding algorithm. The test passes when base64url encoding and decoding
are used in InitDataRegistry.

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

3 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.15.4 release.
carlosgc@webkit.org [Tue, 31 Jan 2017 11:24:57 +0000 (11:24 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.4 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.15.4.

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

3 years ago[Sierra WK1] LayoutTest media/modern-media-controls/placard-support/placard-support...
graouts@webkit.org [Tue, 31 Jan 2017 11:01:38 +0000 (11:01 +0000)]
[Sierra WK1] LayoutTest media/modern-media-controls/placard-support/placard-support-pip.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=167320

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

* platform/mac-wk1/TestExpectations:

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

3 years agoLayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html...
graouts@webkit.org [Tue, 31 Jan 2017 11:00:36 +0000 (11:00 +0000)]
LayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167441

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

* platform/mac/TestExpectations:

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

3 years agoLayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide...
graouts@webkit.org [Tue, 31 Jan 2017 10:59:31 +0000 (10:59 +0000)]
LayoutTest media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167266

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

* platform/mac/TestExpectations:

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

3 years agoUnreviewed, this test is only flaky on El Capitan / Debug of late.
graouts@webkit.org [Tue, 31 Jan 2017 10:57:53 +0000 (10:57 +0000)]
Unreviewed, this test is only flaky on El Capitan / Debug of late.

* platform/mac-wk1/TestExpectations:

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

3 years agoUnreviewed, this test is only flaky on El Capitan of late.
graouts@webkit.org [Tue, 31 Jan 2017 10:54:44 +0000 (10:54 +0000)]
Unreviewed, this test is only flaky on El Capitan of late.

* platform/mac/TestExpectations:

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

3 years agoLayoutTest media/modern-media-controls/skip-back-button/skip-back-button.html is...
graouts@webkit.org [Tue, 31 Jan 2017 10:50:39 +0000 (10:50 +0000)]
LayoutTest media/modern-media-controls/skip-back-button/skip-back-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=164620

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

* platform/mac-wk1/TestExpectations:

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

3 years agoLayoutTest media/modern-media-controls/pip-button/pip-button.html is a flaky timeout
graouts@webkit.org [Tue, 31 Jan 2017 10:49:17 +0000 (10:49 +0000)]
LayoutTest media/modern-media-controls/pip-button/pip-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167350

Unreviewed.

This test doesn't look like it has been flaky of late, no longer marking as flaky.

* platform/mac-wk1/TestExpectations:

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

3 years agoUnreviewed. Fix syntax error in GTK+ API docs.
carlosgc@webkit.org [Tue, 31 Jan 2017 10:46:10 +0000 (10:46 +0000)]
Unreviewed. Fix syntax error in GTK+ API docs.

* UIProcess/API/gtk/WebKitWebContext.cpp:

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

3 years agoUnreviewed, mark a couple of very flaky tests as skipped until we get to fix them.
graouts@webkit.org [Tue, 31 Jan 2017 10:44:35 +0000 (10:44 +0000)]
Unreviewed, mark a couple of very flaky tests as skipped until we get to fix them.

* platform/ios-simulator-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

3 years agoUnreviewed. Do not include libwebrtc and qunit in GTK+ tarballs.
carlosgc@webkit.org [Tue, 31 Jan 2017 10:44:23 +0000 (10:44 +0000)]
Unreviewed. Do not include libwebrtc and qunit in GTK+ tarballs.

* gtk/manifest.txt.in:

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

3 years ago[EFL] Dozens of tests of modern-media-controls have been timeout
graouts@webkit.org [Tue, 31 Jan 2017 09:55:55 +0000 (09:55 +0000)]
[EFL] Dozens of tests of modern-media-controls have been timeout
https://bugs.webkit.org/show_bug.cgi?id=167357

Unreviewed.

Modern Media Controls are Mac-specific, we should skip all those tests on EFL just like
we do on GTK. We had forgotten to skip Modern Media Controls tests under http/tests/media
on GTK, so we do that as well.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

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

3 years ago[css-grid] Enable CSS Grid Layout by default
rego@igalia.com [Tue, 31 Jan 2017 09:23:53 +0000 (09:23 +0000)]
[css-grid] Enable CSS Grid Layout by default
https://bugs.webkit.org/show_bug.cgi?id=167578

Reviewed by Michael Catanzaro.

Now that Safari 10.1 is shipping CSS Grid Layout it seems safe to enable the feature by default:
https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_1.html

* Shared/WebPreferencesDefinitions.h: Remove Grid Layout from the list of experimental flags and enable it by default.

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

3 years ago[CoordinatedGraphics] WebCoordinatedSurface::create should do null-check of the retur...
commit-queue@webkit.org [Tue, 31 Jan 2017 09:13:43 +0000 (09:13 +0000)]
[CoordinatedGraphics] WebCoordinatedSurface::create should do null-check of the return value of ShareableBitmap::createShareable
https://bugs.webkit.org/show_bug.cgi?id=167631

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-01-31
Reviewed by Carlos Garcia Campos.

* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::create): Do null-check of the
return value of ShareableBitmap::createShareable.

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

3 years agoPerformance Timeline: Add serializer to PerformanceEntry
commit-queue@webkit.org [Tue, 31 Jan 2017 08:57:48 +0000 (08:57 +0000)]
Performance Timeline: Add serializer to PerformanceEntry
https://bugs.webkit.org/show_bug.cgi?id=167632

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-31
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: performance-api/performance-timeline-serializers.html

* page/PerformanceEntry.idl:

LayoutTests:

* performance-api/performance-timeline-serializers-expected.txt: Added.
* performance-api/performance-timeline-serializers.html: Added.

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

3 years ago[GTK] Environment variables for enabling/disabling AC mode should take precedence...
carlosgc@webkit.org [Tue, 31 Jan 2017 08:57:21 +0000 (08:57 +0000)]
[GTK] Environment variables for enabling/disabling AC mode should take precedence over the API.
https://bugs.webkit.org/show_bug.cgi?id=167605

Reviewed by Žan Doberšek.

Add HardwareAccelerationManager singleton helper to handle the global values for enabling, disabling or forcing
accelerated compositing. This is used by WebPreferences to initialize the values like always, but also by
WebKitSettings to ensure those values are honored and are not changed when it's not possible. This new class can
be used in the future to implement the GPU blacklist.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init): Document that the setting depends on actual hardware capabilities.
(webkit_settings_set_hardware_acceleration_policy): Check HardwareAccelerationManager before trying to change
the settings.
* UIProcess/gtk/HardwareAccelerationManager.cpp: Added.
(WebKit::HardwareAccelerationManager::singleton):
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Initialize m_canUseHardwareAcceleration and
m_forceHardwareAcceleration dependoing on hardware and system capabilites and
WEBKIT_DISABLE_COMPOSITING_MODE/WEBKIT_FORCE_COMPOSITING_MODE variables.
* UIProcess/gtk/HardwareAccelerationManager.h: Added.
(WebKit::HardwareAccelerationManager::canUseHardwareAcceleration):
(WebKit::HardwareAccelerationManager::forceHardwareAcceleration):
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore): Use HardwareAccelerationManager to set the initial values.

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

3 years agoAX: enable search predication for iOS
cfleizach@apple.com [Tue, 31 Jan 2017 08:07:49 +0000 (08:07 +0000)]
AX: enable search predication for iOS
https://bugs.webkit.org/show_bug.cgi?id=167558
<rdar://problem/30251367>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Move the code to support accessibility searching into a shared place so it can be used by iOS.

Test: accessibility/ios-simulator/ios-search-predicate.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityFindMatchingObjects:]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(convertToNSArray):
(createAccessibilitySearchKeyMap):
(accessibilitySearchKeyForString):
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilitySearchKeyMap): Deleted.
(accessibilitySearchKeyForString): Deleted.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute): Deleted.
(convertToNSArray): Deleted.

Tools:

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/mac/AccessibilityCommonMac.h:
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria): Deleted.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
(WTR::searchPredicateParameterizedAttributeForSearchCriteria):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::searchPredicateParameterizedAttributeForSearchCriteria): Deleted.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

LayoutTests:

Add basic searching smoke test to ensure fundamentals work on iOS.

* accessibility/ios-simulator/ios-search-predicate-expected.txt: Added.
* accessibility/ios-simulator/ios-search-predicate.html: Added.

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

3 years ago[JSC] Do not reject WebAssembly.compile() with Exception
utatane.tea@gmail.com [Tue, 31 Jan 2017 07:21:43 +0000 (07:21 +0000)]
[JSC] Do not reject WebAssembly.compile() with Exception
https://bugs.webkit.org/show_bug.cgi?id=167585

Reviewed by Mark Lam.

JSTests:

* wasm/js-api/Module-compile.js:
(async.testPromiseAPI):

Source/JavaScriptCore:

We accidentally reject the promise with Exception instead of Exception::value()
for the result of WebAssembly::compile().

* wasm/JSWebAssembly.cpp:
(JSC::webAssemblyCompileFunc):

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

3 years ago[WebIDL] Add support for inherit serializer attribute
joepeck@webkit.org [Tue, 31 Jan 2017 07:17:34 +0000 (07:17 +0000)]
[WebIDL] Add support for inherit serializer attribute
https://bugs.webkit.org/show_bug.cgi?id=167274

Reviewed by Darin Adler.

Support for serializer { inherit }, which will be used by Resource Timing.
https://heycam.github.io/webidl/#idl-serializers

* bindings/scripts/CodeGenerator.pm:
(GetInterfaceForAttribute):
(IsSerializableAttribute):
Determine if an attribute is serializable at generation time so we can
verify types. This allows us to support typedefs. We don't yet support
serializing an attribute that is itself a serializable interface.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateSerializerFunction):
(GenerateSerializerAttributesForInterface):
Generate inherited attributes first, then generate our own list.
Explicitly provided attribute names are expected to be serializable,
so produce an error if they are not.

* bindings/scripts/IDLParser.pm:
(parseSerializationAttributes):
Update parsing of serializer attributes to allow for multiple
special strings. The spec does not precisely define where the
special "attribute" keyword is allowed.

(applyMemberList):
(isSerializableAttribute): Deleted.
Move serializable attribute checking to generation.

* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp: Added.
* bindings/scripts/test/JS/JSTestSerializationInherit.h: Added.
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: Added.
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.h: Added.
The toJSON implementations are the most interesting.

* bindings/scripts/test/TestSerialization.idl:
Extend this test for typedefed attributes that are serializable.
Change TestNode (a serializable Interface) to TestException (an
unserializable Interface) for expected behavior of an
unserializable attribute.

* bindings/scripts/test/TestSerializationInherit.idl:
Test for { inherit, attribute }.

* bindings/scripts/test/TestSerializationInheritFinal.idl:
Test for { inherit, attribute_names... }, and multi-level inherit.

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