WebKit-https.git
2 years agoMultiple HTTP tests fail with Apache 2.4.25
ap@apple.com [Fri, 3 Feb 2017 01:46:25 +0000 (01:46 +0000)]
Multiple HTTP tests fail with Apache 2.4.25
https://bugs.webkit.org/show_bug.cgi?id=167678
<rdar://problem/30060142>

Reviewed by Sam Weinig.

Newer versions of Apache have a security fix where they generate an internal server
error upon seeing an invalid HTTP header field. There is an opt-out configuration
option which didn't quite work in my testing, but regardless, we should only use
"nph-" CGIs for invalid responses. This is how Apache knows that it shouldn't
attempt to parse the response.

This also uncovered a test bug.

* http/tests/cache/disk-cache/resources/cache-test.js: (generateTestURL):
Without escaping, we were getting a broken response in attachment tests:
   Content-Disposition: attachment
    filename: "f.txt"
Note how ";" turned into a newline.

* http/tests/misc/non-utf8-header-name-expected.txt: Removed.
* http/tests/misc/non-utf8-header-name.php: Removed.
* http/tests/misc/nph-non-utf8-header-name-expected.txt: Copied from LayoutTests/http/tests/misc/non-utf8-header-name-expected.txt.
* http/tests/misc/nph-non-utf8-header-name.pl: Copied from LayoutTests/http/tests/misc/non-utf8-header-name.php.
* http/tests/preload/download_resources_from_invalid_headers.html:
* http/tests/preload/resources/invalid_resources_from_header.php: Removed.
* http/tests/preload/resources/nph-invalid_resources_from_header.pl: Copied from LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php.
* http/tests/security/contentSecurityPolicy/directive-parsing-01.html:
* http/tests/security/contentSecurityPolicy/directive-parsing-02.html:
* http/tests/security/contentSecurityPolicy/directive-parsing-03.html:
* http/tests/security/contentSecurityPolicy/directive-parsing-04.html:
* http/tests/security/contentSecurityPolicy/directive-parsing-05.html:
* http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl: Removed.
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js:
* http/tests/security/contentSecurityPolicy/resources/nph-echo-script-src.pl: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl.
* http/tests/security/contentSecurityPolicy/script-loads-with-img-src.html:
* http/tests/security/contentSecurityPolicy/script-src-none.html:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-01.html:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-02.html:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-03.html:
* http/tests/security/contentSecurityPolicy/script-src-self.html:
* http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html:
Changed scripts that are used to generate invalid responses to "nph-" ones.

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

2 years agoCrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::URL...
wenson_hsieh@apple.com [Fri, 3 Feb 2017 01:01:32 +0000 (01:01 +0000)]
CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::URL::host const + 9
https://bugs.webkit.org/show_bug.cgi?id=167766
<rdar://problem/30132707>

Reviewed by Chris Dumez.

The mainframe's document pointer may be null when tearing down a page upon navigation to a page that is in the
page cache. If this triggers a GC sweep, we will attempt to reload touch bar media controls, which (as a part of
the media controller heuristic) checks the mainframe's document URL to see if quirks should be enabled. This
assumes that the mainframe's document exists, which is not a safe assumption if page navigation is occurring. As
such, we need a null check for the mainframe's document in needsPlaybackControlsManagerQuirk().

No test, as we were unable to reproduce this crash.

* html/HTMLMediaElement.cpp:
(WebCore::needsPlaybackControlsManagerQuirk):

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

2 years agoSuspend SVG animations in hidden pages
cdumez@apple.com [Fri, 3 Feb 2017 01:00:30 +0000 (01:00 +0000)]
Suspend SVG animations in hidden pages
https://bugs.webkit.org/show_bug.cgi?id=167763
<rdar://problem/29986313>

Reviewed by Simon Fraser.

Source/WebCore:

Suspend SVG animations in hidden pages to save power, similarly to what
we already do for another types of animations.

Test: svg/animations/animations-paused-page-non-visible.html

* page/Page.cpp:
(WebCore::setSVGAnimationSuspended):
(WebCore::Page::setIsVisibleInternal):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::pauseAnimations):
(WebCore::SVGDocumentExtensions::unpauseAnimations):
* svg/SVGDocumentExtensions.h:
(WebCore::SVGDocumentExtensions::areAnimationsPaused):
* testing/Internals.cpp:
(WebCore::Internals::areSVGAnimationsPaused):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add layout test coverage.

* svg/animations/animations-paused-page-non-visible-expected.txt: Added.
* svg/animations/animations-paused-page-non-visible.html: Added.

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

2 years agoUnreviewed, rolling out r211596 and r211605.
ryanhaddad@apple.com [Fri, 3 Feb 2017 00:35:30 +0000 (00:35 +0000)]
Unreviewed, rolling out r211596 and r211605.
https://bugs.webkit.org/show_bug.cgi?id=167767

This change broke certain build configurations (Requested by
ryanhaddad on #webkit).

Reverted changesets:

"[Mac] Add classes to manage audio samples"
https://bugs.webkit.org/show_bug.cgi?id=167739
http://trac.webkit.org/changeset/211596

"Unreviewed speculative build fix."
http://trac.webkit.org/changeset/211605

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-02

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

2 years agoAdd a SIGILL crash analyzer to make debugging SIGILLs easier.
mark.lam@apple.com [Fri, 3 Feb 2017 00:26:00 +0000 (00:26 +0000)]
Add a SIGILL crash analyzer to make debugging SIGILLs easier.
https://bugs.webkit.org/show_bug.cgi?id=167714
<rdar://problem/30318237>

Not reviewed.

Build fix for CLOOP build.

* tools/VMInspector.cpp:

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

2 years agoWeb Inspector: can't jump from Search Tab result to see resource in other tabs (Resou...
commit-queue@webkit.org [Fri, 3 Feb 2017 00:22:49 +0000 (00:22 +0000)]
Web Inspector: can't jump from Search Tab result to see resource in other tabs (Resource, Debugger, Network)
https://bugs.webkit.org/show_bug.cgi?id=167072

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-02
Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.tabContentViewForRepresentedObject):
(WebInspector.showRepresentedObject):
(WebInspector.showMainFrameDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
Rework parameters to add optional `options` dictionary that can be used to indicate
additional functionality.

* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
Ignore instances of SearchTabContentView as it can display content views for all types of
searchable data.  Determined by a newly added optional `options` parameter.

* UserInterface/Base/Utilities.js:
(Object.shallowMerge):
Merges the keys of two objects into a new one.

* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):

* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domSearchResults):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch):
(WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):
* UserInterface/Views/TreeElement.js:
(WebInspector.TreeElement.treeElementDoubleClicked):
Add an event dispatch whenever a TreeElement is double clicked via the `dblclick` event.

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

2 years agoBuild fix after r211602
achristensen@apple.com [Fri, 3 Feb 2017 00:15:18 +0000 (00:15 +0000)]
Build fix after r211602
https://bugs.webkit.org/show_bug.cgi?id=167758

* Source/Makefile:
Don't build libwebrtc by default.  It's not used yet anyway.

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

2 years agoRemove check for SkipSafariExecutableEntitlementChecks
ap@apple.com [Fri, 3 Feb 2017 00:09:08 +0000 (00:09 +0000)]
Remove check for SkipSafariExecutableEntitlementChecks
https://bugs.webkit.org/show_bug.cgi?id=167762
rdar://problem/22480673

Reviewed by Dan Bernstein.

* Scripts/webkitdirs.pm:
(safariPathFromSafariBundle):
(skipSafariExecutableEntitlementChecks): Deleted.

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

2 years agoUnreviewed speculative build fix.
ryanhaddad@apple.com [Fri, 3 Feb 2017 00:05:00 +0000 (00:05 +0000)]
Unreviewed speculative build fix.

* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::pushSamples):

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

2 years agoUnreviewed, rolling out r211535, r211566, and r211568.
commit-queue@webkit.org [Thu, 2 Feb 2017 23:39:57 +0000 (23:39 +0000)]
Unreviewed, rolling out r211535, r211566, and r211568.
https://bugs.webkit.org/show_bug.cgi?id=167765

Causing timeouts? (Requested by andersca_ on #webkit).

Reverted changesets:

"IPC::Connection receive ports should be guarded"
https://bugs.webkit.org/show_bug.cgi?id=167704
http://trac.webkit.org/changeset/211535

"<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
http://trac.webkit.org/changeset/211566

"<rdar://problem/30323148> Webkit Nightly on 10.10 broken"
http://trac.webkit.org/changeset/211568

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

2 years agoAdd a SIGILL crash analyzer to make debugging SIGILLs easier.
mark.lam@apple.com [Thu, 2 Feb 2017 23:32:36 +0000 (23:32 +0000)]
Add a SIGILL crash analyzer to make debugging SIGILLs easier.
https://bugs.webkit.org/show_bug.cgi?id=167714
<rdar://problem/30318237>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

The current implementation is only for X86_64 and ARM64 on OS(DARWIN).  The
analyzer is not enabled for all other ports.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* API/JSVirtualMachine.mm:
* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::illegalInstruction):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::illegalInstruction):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::illegalInstruction):
* assembler/X86Assembler.h:
(JSC::X86Assembler::illegalInstruction):
* heap/Heap.cpp:
(JSC::Heap::forEachCodeBlockIgnoringJITPlansImpl):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::forEachCodeBlockIgnoringJITPlans):
* runtime/Options.cpp:
(JSC::Options::isAvailable):
(JSC::recomputeDependentOptions):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
* runtime/VM.h:
* tools/SigillCrashAnalyzer.cpp: Added.
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::dump):
(JSC::handleCrash):
(JSC::initializeCrashHandler):
(JSC::ensureSigillCrashAnalyzer):
(JSC::SigillCrashAnalyzer::analyze):
(JSC::SigillCrashAnalyzer::dumpCodeBlock):
* tools/SigillCrashAnalyzer.h: Added.
* tools/VMInspector.cpp: Added.
(JSC::VMInspector::instance):
(JSC::VMInspector::add):
(JSC::VMInspector::remove):
(JSC::ensureIsSafeToLock):
* tools/VMInspector.h: Added.
(JSC::VMInspector::iterate):

Source/WTF:

* wtf/StdLibExtras.h:

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

2 years agoBuild libwebrtc and dependencies with Xcode
achristensen@apple.com [Thu, 2 Feb 2017 23:31:02 +0000 (23:31 +0000)]
Build libwebrtc and dependencies with Xcode
https://bugs.webkit.org/show_bug.cgi?id=167758

Reviewed by Dean Jackson.

Source/ThirdParty/libwebrtc:

* Configurations: Added.
* Configurations/Base.xcconfig: Added.
* Configurations/DebugRelease.xcconfig: Added.
* Configurations/boringssl.xcconfig: Added.
* Configurations/libwebrtc.xcconfig: Added.
* Configurations/opus.xcconfig: Added.
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:

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

2 years agoDon't attempt wide gammut on older OSes
megan_gardner@apple.com [Thu, 2 Feb 2017 23:21:34 +0000 (23:21 +0000)]
Don't attempt wide gammut on older OSes
https://bugs.webkit.org/show_bug.cgi?id=167754
<rdar://problem/29931587>

Reviewed by Tim Horton.

We need to guard our extended color checks the same way throughout the code, or we will attempt to set up
support for wide gamut partially, which causes crashes when using sharable bitmap.

* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::convertImageToBitmap):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

2 years ago{}.toString.call(crossOriginWindow) should return "[object Object]"
cdumez@apple.com [Thu, 2 Feb 2017 23:18:34 +0000 (23:18 +0000)]
{}.toString.call(crossOriginWindow) should return "[object Object]"
https://bugs.webkit.org/show_bug.cgi?id=167701
<rdar://problem/30330797>

Reviewed by Keith Miller.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

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

Source/JavaScriptCore:

Have JSProxy forward toStringName calls to its target so Window
can override it.

* runtime/JSProxy.cpp:
(JSC::JSProxy::toStringName):
* runtime/JSProxy.h:

Source/WebCore:

{}.toString.call() to should "[object Object] for cross origin
Window / Location objects. This new behavior is consistent with
Firefox and Chrome.

No new tests, rebaselined existing tests.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::toStringName):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::toStringName):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* page/Location.idl:

LayoutTests:

Rebaselined existing test now that more checks are passing.

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

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

2 years agoMark inspector/debugger/breakpoint-scope.html as flaky on macOS debug.
ryanhaddad@apple.com [Thu, 2 Feb 2017 23:15:31 +0000 (23:15 +0000)]
Mark inspector/debugger/breakpoint-scope.html as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=164293

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoWK2: cannot tap on candidate view with hardware keyboard.
enrica@apple.com [Thu, 2 Feb 2017 23:12:43 +0000 (23:12 +0000)]
WK2: cannot tap on candidate view with hardware keyboard.
https://bugs.webkit.org/show_bug.cgi?id=167761
rdar://problem/28775395

Reviewed by Tim Horton.

The candidate view is a subview of the view returned by
automaticallySelectedOverlay and it should be the unscaled view
instead of the WKContentView.

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

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

2 years agoDrag images should be anchored to the mouse location
wenson_hsieh@apple.com [Thu, 2 Feb 2017 23:03:38 +0000 (23:03 +0000)]
Drag images should be anchored to the mouse location
https://bugs.webkit.org/show_bug.cgi?id=167690
<rdar://problem/30295261>

Reviewed by Enrica Casucci.

Source/WebCore:

Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
used by any client yet; this patch only computes and vends this information from WebCore.

* loader/EmptyClients.cpp:
* page/DragClient.h:
* page/DragController.cpp:
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):
* page/DragController.h:
* platform/DragImage.h:

Source/WebKit/mac:

Adds some plumbing for the anchor point in the WK1 client layer.

* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::startDrag):

Source/WebKit/win:

Adds some plumbing for the anchor point in the WK1 client layer.

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::startDrag):
* WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
for handling data interaction.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setDragImage):
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):

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

2 years ago[Mac] Add classes to manage audio samples
eric.carlson@apple.com [Thu, 2 Feb 2017 23:01:54 +0000 (23:01 +0000)]
[Mac] Add classes to manage audio samples
https://bugs.webkit.org/show_bug.cgi?id=167739

Reviewed by Jer Noble.

No new tests, this code isn't used yet.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/mac/AudioSampleBufferList.cpp: Added.
(WebCore::AudioSampleBufferList::create):
(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::~AudioSampleBufferList):
(WebCore::AudioSampleBufferList::setSampleCount):
(WebCore::AudioSampleBufferList::applyGain):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::zero):
(WebCore::AudioSampleBufferList::zeroABL):
(WebCore::AudioSampleBufferList::convertInput):
(WebCore::AudioSampleBufferList::audioConverterCallback):
(WebCore::AudioSampleBufferList::configureBufferListForStream):
* platform/audio/mac/AudioSampleBufferList.h: Added.
(WebCore::AudioSampleBufferList::streamDescription):
(WebCore::AudioSampleBufferList::bufferList):
(WebCore::AudioSampleBufferList::sampleCapacity):
(WebCore::AudioSampleBufferList::sampleCount):
(WebCore::AudioSampleBufferList::timestamp):
(WebCore::AudioSampleBufferList::hostTime):
(WebCore::AudioSampleBufferList::setTimes):
(WebCore::AudioSampleBufferList::audioBufferListSizeForStream):
* platform/audio/mac/AudioSampleDataSource.cpp: Added.
(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::~AudioSampleDataSource):
(WebCore::AudioSampleDataSource::setPaused):
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::setInputFormat):
(WebCore::AudioSampleDataSource::setOutputFormat):
(WebCore::AudioSampleDataSource::hostTime):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamples):
* platform/audio/mac/AudioSampleDataSource.h: Added.
(WebCore::AudioSampleDataSource::setVolume):
(WebCore::AudioSampleDataSource::volume):
(WebCore::AudioSampleDataSource::setMuted):
(WebCore::AudioSampleDataSource::muted):

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

2 years agoMark workesr/bomb/html as flaky on macOS.
ryanhaddad@apple.com [Thu, 2 Feb 2017 22:45:59 +0000 (22:45 +0000)]
Mark workesr/bomb/html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167757

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoSupport Performance API (performance.now(), UserTiming) in Workers
joepeck@webkit.org [Thu, 2 Feb 2017 22:07:28 +0000 (22:07 +0000)]
Support Performance API (performance.now(), UserTiming) in Workers
https://bugs.webkit.org/show_bug.cgi?id=167717

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: performance-api/performance-mark-name.html
       performance-api/performance-now-api.html
       performance-api/performance-now-time-origin-in-worker.html
       performance-api/user-timing-apis.html

* CMakeLists.txt:
* DerivedSources.make:
New files.

* page/DOMWindow.idl:
* page/GlobalPerformance.idl:
* workers/WorkerGlobalScope.idl:
Add partial interface for performance attribute.

* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceObserver.idl:
* page/PerformanceObserverEntryList.idl:
Expose these to Workers.

* page/Performance.cpp:
(WebCore::Performance::Performance):
(WebCore::Performance::contextDestroyed):
* page/Performance.h:
Use the EventQueue variant that works with any ScriptExectionContext.

* page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::PerformanceObserver):
Get the Performance base in a Worker context.

* page/PerformanceUserTiming.cpp:
(WebCore::UserTiming::mark):
Only reject legacy special mark names in a Window, not a Worker.

(WebCore::UserTiming::findExistingMarkStartTime):
Simple implementation returns 0 as the start time in Workers. The spec
is currently imprecise here, but it does not have the unusual
PerformanceTiming behavior in a Window which is part of User Timing 1.

* workers/Worker.cpp:
(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):
* workers/Worker.h:
Record the moment of Worker creation.

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::performance):
* workers/WorkerGlobalScope.h:
Construct the Performance object with the moment of creation (timeOrigin).

* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:
Pass the moment of creation (timeOrigin) through to WorkerGlobalScope creation.

LayoutTests:

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
Updated now that Performance classes are in Workers.

* performance-api/performance-now-api-expected.txt: Added.
* performance-api/performance-now-api.html: Added.
* performance-api/performance-now-time-origin-in-worker-expected.txt: Added.
* performance-api/performance-now-time-origin-in-worker.html: Added.
New tests to cover performance.now.

* performance-api/performance-mark-name-expected.txt: Added.
* performance-api/performance-mark-name.html: Added.
* performance-api/resources/mark-name.js: Added.
* performance-api/resources/user-timing-api.js: Added.
* performance-api/user-timing-apis-expected.txt: Added.
* performance-api/user-timing-apis.html: Added.
New tests to cover user-timing and performance.mark behavior.

* performance-api/performance-observer-api-expected.txt:
* performance-api/performance-observer-api.html:
* performance-api/performance-observer-basic-expected.txt:
* performance-api/performance-observer-basic.html:
* performance-api/performance-timeline-api-expected.txt:
* performance-api/performance-timeline-api.html:
* performance-api/resources/now-api.js: Added.
* performance-api/resources/observer-api.js: Copied from LayoutTests/performance-api/performance-observer-api.html.
* performance-api/resources/observer-basic.js: Copied from LayoutTests/performance-api/performance-observer-basic.html.
* performance-api/resources/time-origin-in-worker.js: Added.
* performance-api/resources/timeline-api.js: Copied from LayoutTests/performance-api/performance-timeline-api.html.
Update some of the existing tests to check in a Document and Worker.

* imported/w3c/web-platform-tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes-expected.txt:
Minor progression.

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

2 years agoMark imported/w3c/web-platform-tests/shadow-dom/slotchange.html as flaky on macOS.
ryanhaddad@apple.com [Thu, 2 Feb 2017 21:36:44 +0000 (21:36 +0000)]
Mark imported/w3c/web-platform-tests/shadow-dom/slotchange.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167652

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoUnreviewed, rolling out r211579.
commit-queue@webkit.org [Thu, 2 Feb 2017 21:31:20 +0000 (21:31 +0000)]
Unreviewed, rolling out r211579.
https://bugs.webkit.org/show_bug.cgi?id=167753

Caused mediastream crashes. (Requested by bfulgham_ on
#webkit).

Reverted changeset:

"Correct memory leak in MediaConstraints"
https://bugs.webkit.org/show_bug.cgi?id=167744
http://trac.webkit.org/changeset/211579

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

2 years agoRename Node::inDocument() to isConnected()
cdumez@apple.com [Thu, 2 Feb 2017 21:29:15 +0000 (21:29 +0000)]
Rename Node::inDocument() to isConnected()
https://bugs.webkit.org/show_bug.cgi?id=167743

Reviewed by Sam Weinig.

Rename Node::inDocument() to isConnected() to match the DOM specification more closely:
- https://dom.spec.whatwg.org/#connected
Source/WebKit/mac:

* DOM/DOMNode.mm:
(-[DOMNode isConnected]):
* WebView/WebFrame.mm:
(-[WebFrame selectNSRange:onElement:]):

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

2 years ago[Modern Media Controls] Provide a compact mode for when the controls are small
graouts@webkit.org [Thu, 2 Feb 2017 21:25:19 +0000 (21:25 +0000)]
[Modern Media Controls] Provide a compact mode for when the controls are small
https://bugs.webkit.org/show_bug.cgi?id=167746
<rdar://problem/29565842>

Reviewed by Dean Jackson.

Source/WebCore:

When the macOS inline media controls become too narrow to display both the volume and fullscreen
buttons in their right container (width < 242), we switch to a compact mode where the controls bar
is shorter and the buttons smaller.

To facilitate this, we provide a new subclass of MacOSInlineMediaControls called MacOSCompactInlineMediaControls
which changes some of the layout properties of the buttons to have shorter margins around buttons.

We also added a new "Compact" LayoutTrait and improved IconService to provide specific icons
for this mode for the buttons that can exist in compact mode.

To correctly implement the design, we needed to add a way to provide different margins around the
left and right edges of the container, so the "padding" property is now split between "leftMargin"
and "rightMargin", and to make property naming cleaner, the "margin" property which specifies the
space between each button in a container is now called "buttonMargin". We also set the default
values for those properties to be 24 (instead of 0) which are the most widely used values, requiring
less customization.

Tests: media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html
       media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html
       media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html
       media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html
       media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html
       media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html

* Modules/modern-media-controls/controls/buttons-container.js:
(ButtonsContainer.prototype.layout): Refactor the "margin" and "padding" properties into
"leftMargin", "rightMargin" and "buttonMargin".
* Modules/modern-media-controls/controls/icon-button.js:
(IconButton.prototype._updateImage): Fix a small bug that would prevent the image source
change to occur after changing the "iconName" property should the previous and new icons
share the same metrics, which is the case for the "play" and "pause" icons in compact mode.
* Modules/modern-media-controls/controls/icon-service.js: Add support for compact variants.
(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits):
(const.iconService.new.IconService):
* Modules/modern-media-controls/controls/ios-inline-media-controls.js: Adopt new margin defaults.
* Modules/modern-media-controls/controls/layout-item.js: Add the new "Compact" LayoutTrait.
* Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: Added.
(.media-controls.mac.inline.compact > .controls-bar):
(.media-controls.mac.inline.compact button.play-pause):
(.media-controls.mac.inline.compact button.skip-back):
(.media-controls.mac.inline.compact .scrubber.slider):
(.media-controls.mac.inline.compact button.mute):
(.media-controls.mac.inline.compact button.fullscreen):
(.media-controls.mac.inline.compact .time-label,):
(.media-controls.mac.inline.compact .volume-slider-container):
(.media-controls.mac.inline.compact .volume.slider):
(.media-controls.mac.inline.compact .scrubber.slider > input::-webkit-slider-thumb):
* Modules/modern-media-controls/controls/macos-compact-inline-media-controls.js: Added.
(MacOSCompactInlineMediaControls):
* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: Adopt new margin defaults.
(MacOSFullscreenMediaControls.prototype.layout):
* Modules/modern-media-controls/controls/macos-inline-media-controls.js: Adopt new margin defaults
and make the _leftContainer and _rightContainer properties public such that the MacOSCompactInlineMediaControls
subclass may customize them without accessing a private property.
(MacOSInlineMediaControls.prototype.layout):
(MacOSInlineMediaControls.prototype.showTracksPanel):
* Modules/modern-media-controls/images/macOS/enter-fullscreen-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/enter-fullscreen-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/interval-skip-back-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/interval-skip-back-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/pause-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/pause-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/play-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/play-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/volume-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/volume-compact@2x.png: Added.
* Modules/modern-media-controls/js-files: Add the new files so they are concatenated by the build script.
* Modules/modern-media-controls/media/media-controller.js: Toggle compact mode if controls
are below the 242px width threshold.
(MediaController.prototype.get layoutTraits):
(MediaController.prototype.handleEvent):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._shouldFadeBetweenControls):
(MediaController.prototype._updateControlsSize):
(MediaController.prototype._controlsWidth):
(MediaController.prototype._controlsClass):
(MediaController):
* WebCore.xcodeproj/project.pbxproj: Add new files and perform some cleanup so that the
project accurately lists all the existing project files and remove some older ones.

LayoutTests:

Add some new tests for the compact mode and update some tests after the ButtonsContainer
"padding" and "margin" properties refactoring.

* media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
* media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt:
* media/modern-media-controls/buttons-container/buttons-container-constructor.html:
* media/modern-media-controls/buttons-container/buttons-container-layout.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor-expected.txt:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html:
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles-expected.txt: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor-expected.txt: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles-expected.txt: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout-expected.txt: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles-expected.txt: Added.
* media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html: Added.
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html:
* media/modern-media-controls/media-controller/media-controller-toggle-compact-mode-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html: Added.
* media/modern-media-controls/resources/media-controls-loader.js:
* platform/ios-simulator/TestExpectations:

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

2 years agoUnreviewed, rolling out r211571 and r211582.
commit-queue@webkit.org [Thu, 2 Feb 2017 21:24:11 +0000 (21:24 +0000)]
Unreviewed, rolling out r211571 and r211582.
https://bugs.webkit.org/show_bug.cgi?id=167751

This change caused API test WebKit1.MemoryPressureHandler to
fail with an assertion. (Requested by ryanhaddad on #webkit).

Reverted changesets:

"[Mac] In-process memory pressure monitor for WebContent
processes."
https://bugs.webkit.org/show_bug.cgi?id=167491
http://trac.webkit.org/changeset/211571

"Unreviewed attempt to fix the Windows build after r211571."
http://trac.webkit.org/changeset/211582

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

2 years agoThe Make Frameworks Symbolic Link build phase can end up creating a symlink inside...
mitz@apple.com [Thu, 2 Feb 2017 21:05:17 +0000 (21:05 +0000)]
The Make Frameworks Symbolic Link build phase can end up creating a symlink inside the Frameworks subdirectory
https://bugs.webkit.org/show_bug.cgi?id=167745

Reviewed by Tim Horton.

* WebKit2.xcodeproj/project.pbxproj: Pass the -h option to ln(1) so that it will replace,
  rather than follow, an existing symlink.

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

2 years agoVersioning.
jmarcell@apple.com [Thu, 2 Feb 2017 21:00:43 +0000 (21:00 +0000)]
Versioning.

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

2 years agoMark imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details...
ryanhaddad@apple.com [Thu, 2 Feb 2017 20:56:52 +0000 (20:56 +0000)]
Mark imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164041

Unreviewed test gardening.

* TestExpectations:

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

2 years ago[Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
pvollan@apple.com [Thu, 2 Feb 2017 20:42:23 +0000 (20:42 +0000)]
[Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
https://bugs.webkit.org/show_bug.cgi?id=167732

Reviewed by Brent Fulgham.

Backing layer should not be scaled when CACFLayerSetContentsScale is used for scaling.

* WebView.cpp:
(WebView::setAcceleratedCompositing):

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

2 years agoUnreviewed ios-simulator test gardening.
ryanhaddad@apple.com [Thu, 2 Feb 2017 20:24:49 +0000 (20:24 +0000)]
Unreviewed ios-simulator test gardening.

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

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

2 years agoUnreviewed attempt to fix the Windows build after r211571.
cdumez@apple.com [Thu, 2 Feb 2017 20:22:15 +0000 (20:22 +0000)]
Unreviewed attempt to fix the Windows build after r211571.

* platform/MemoryPressureHandler.cpp:
(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):

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

2 years agoClean up css3/filters/backdrop/dynamic-with-clip-path.html
simon.fraser@apple.com [Thu, 2 Feb 2017 20:21:58 +0000 (20:21 +0000)]
Clean up css3/filters/backdrop/dynamic-with-clip-path.html

This test used a clip-path that was entirely outside the element, making it confusing.
Move the clipping circle to the center.

* css3/filters/backdrop/dynamic-with-clip-path-expected.html:
* css3/filters/backdrop/dynamic-with-clip-path.html:

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

2 years agoMake the Makefile great again after r211570, r211572
ddkilzer@apple.com [Thu, 2 Feb 2017 19:34:09 +0000 (19:34 +0000)]
Make the Makefile great again after r211570, r211572

* Makefile: Restore tabs and ending newline.

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

2 years agoCorrect memory leak in MediaConstraints
bfulgham@apple.com [Thu, 2 Feb 2017 19:33:09 +0000 (19:33 +0000)]
Correct memory leak in MediaConstraints
https://bugs.webkit.org/show_bug.cgi?id=167744
<rdar://problem/30331444>

Reviewed by Anders Carlsson.

ConstraintHolder returns a reference to an object created by operator new. When the
returned value is assigned or stored in Vector or other containers we leak memory.
Instead, this value should just be returned as a regular object so that the return
value optimization can make sure memory is properly (and efficiently) used.

* platform/mediastream/MediaConstraints.h:
(WebCore::FlattenedConstraint::ConstraintHolder::create): Return by value.

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

2 years agoMarking http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts...
ryanhaddad@apple.com [Thu, 2 Feb 2017 19:12:03 +0000 (19:12 +0000)]
Marking http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167607

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years agoClean up accessibility & animations tests to stop calling testRunner.waitUntilDone...
ddkilzer@apple.com [Thu, 2 Feb 2017 18:55:23 +0000 (18:55 +0000)]
Clean up accessibility & animations tests to stop calling testRunner.waitUntilDone() twice
<https://webkit.org/b/167598>

Reviewed by Alexey Proskuryakov.

* accessibility/frame-disconnect-textmarker-cache-crash.html:
* accessibility/loading-iframe-sends-notification.html:
* accessibility/mac/combobox-activedescendant-notifications.html:
* accessibility/mac/ordered-textmarker-crash.html:
* accessibility/mac/stale-textmarker-crash.html:
* accessibility/notification-listeners.html:
* accessibility/scroll-to-global-point-iframe-nested.html:
* accessibility/scroll-to-global-point-iframe.html:
* accessibility/scroll-to-make-visible-iframe.html:
* accessibility/svg-element-press.html:
- Remove call to testRunner.waitUntilDone() since
  window.jsTestIsAsync is set to true, and thus waitUntilDone()
  is called from either js-test.js or js-test-post.js.

* animations/animation-delay-changed.html:
* animations/change-keyframes-name.html:
* animations/font-variations/font-variation-settings-order.html:
* animations/font-variations/font-variation-settings-unlike.html:
* animations/font-variations/font-variation-settings.html:
* animations/longhand-timing-function.html:
* animations/transition-and-animation-3.html:
* animations/unanimated-style.html:
- Remove call to testRunner.waitUntilDone() since that's moved
  into animation-test-helpers.js.

* animations/resources/animation-test-helpers.js:
(runAnimationTest): Call testRunner.waitUntilDone() when this
script resource is included instead of when runAnimationTest()
is called since runAnimationTest() expects it to be set anyway.

* animations/animation-direction-reverse-fill-mode-hardware.html:
* animations/animation-direction-reverse-fill-mode.html:
* animations/animation-hit-test-transform.html:
* animations/animation-hit-test.html:
* animations/animation-internals-api-multiple-keyframes.html:
* animations/animation-internals-api.html:
* animations/change-transform-style-during-animation.html:
* animations/keyframes-iteration-count-non-integer.html:
- Remove call to testRunner.waitUntilDone() since that now
  happens when loading animation-test-helpers.js.  These tests
  don't currently call runAnimationTest(), but they manage their
  own state by calling testRunner.notifyDone() themselves.

* animations/crash-on-removing-animation.html:
* animations/resources/crash-on-removing-animation-window.html: Copied from LayoutTests/animations/crash-on-removing-animation.html.
- Split this test into a main resource and a window resource.
  Previously testRunner.waitUntilDone() was being called twice
  when js-test-post.js was loaded in the main window and then
  loaded a second time when the window was opened.  The new
  resource file doesn't load either js-test-pre.js or
  js-test-post.js, avoiding the duplicate call.

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

2 years agoUnreviewed build fix after r211570
jbedard@apple.com [Thu, 2 Feb 2017 18:42:02 +0000 (18:42 +0000)]
Unreviewed build fix after r211570

* Makefile: Placed back.

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

2 years agoSource/JavaScriptCore:
akling@apple.com [Thu, 2 Feb 2017 18:35:55 +0000 (18:35 +0000)]
Source/JavaScriptCore:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Remove the sloppy "max live heap size" mechanism from JSC in favor of the new
WebCore-side memory footprint monitor.

* heap/Heap.cpp:
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didExceedMaxLiveSize): Deleted.
* heap/Heap.h:
(JSC::Heap::setMaxLiveSize): Deleted.

Source/WebCore:
[Mac] In-process memory pressure monitor for WebContent processes AKA websam
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Add a new timer-based memory pressure monitor that checks the process memory
footprint every 30 seconds and reacts to changes by setting a MemoryUsagePolicy.

There are four MemoryUsagePolicy values:

    - Unrestricted (below 1GB)
    - Conservative (above 1GB)
    - Strict (above 2GB)
    - Panic (above 4GB, or 3GB if 32-bit)

For Strict and above, the old-style "isUnderMemoryPressure()" API will return true.

Transitioning to a higher policy will cause memory pressure handlers to run:

At Strict, we run the "non-critical" memory pressure handler, then carry on.

At Panic, we run the "critical" memory pressure handler. If that fails to recover
enough memory to bring us back below 4GB, we may kill the process:

A process is eligible to get killed for using too much memory if:

    - It's not visible on screen (i.e it's a background tab.)
    - It's not playing audio.
    - It has not performed a main frame navigation in the last hour.

Before killing the process, an exit-time callback will run. This patch installs such
a callback that prints out some time-of-death statistics about C++ and JavaScript memory
usage to hopefully help understand what was soaking up all the memory.

* bindings/js/CommonVM.cpp:
(WebCore::commonVMSlow):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setState):
* page/MainFrame.cpp:
(WebCore::MainFrame::didCompleteLoad):
* page/MainFrame.h:
* page/MemoryRelease.cpp:
(WebCore::pageCount):
(WebCore::logMemoryStatisticsAtTimeOfDeath):
(WebCore::didExceedMemoryLimitAndFailedToRecover):
(WebCore::processIsEligibleForMemoryKill):
* page/MemoryRelease.h:
* page/ResourceUsageThread.h:
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::vmPageSize):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
(WebCore::toString):
(WebCore::thresholdForPolicy):
(WebCore::policyForFootprint):
(WebCore::MemoryPressureHandler::measurementTimerFired):
* platform/MemoryPressureHandler.h:
(WebCore::MemoryPressureHandler::setMemoryKillCallback):
(WebCore::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback):
(WebCore::MemoryPressureHandler::isUnderMemoryPressure):

Source/WebKit2:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Enable the in-process memory monitor for WebContent processes on macOS 10.12+

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

Source/WTF:
[Mac] In-process memory pressure monitor for WebContent processes.
<https://webkit.org/b/167491>
<rdar://problem/30116072>

Reviewed by Antti Koivisto.

Add a WTF helper function for getting the current process's memory footprint.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MemoryFootprint.cpp:
(WTF::memoryFootprint):
* wtf/MemoryFootprint.h:

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

2 years agoUndefined subroutine in svn-create-patch
jbedard@apple.com [Thu, 2 Feb 2017 18:33:29 +0000 (18:33 +0000)]
Undefined subroutine in svn-create-patch
https://bugs.webkit.org/show_bug.cgi?id=167742

Unreviewed build-fix after r211543.

* Scripts/VCSUtils.pm: fixSVNPatchForAdditionWithHistory was not exported.

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

2 years ago[Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
cdumez@apple.com [Thu, 2 Feb 2017 18:31:54 +0000 (18:31 +0000)]
[Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
https://bugs.webkit.org/show_bug.cgi?id=167738
<rdar://problem/30229990>

Reviewed by Andreas Kling.

Source/WebCore:

Upon destruction of a Page, we destroy the BackForwardClient, which is supposed
to keep track of HistoryItems associated to this particular page and remove them
from the PageCache. Given the crash trace, the issue seems to be that some
HistoryItems associated with the Page sometimes linger in the PageCache *after*
the Page has been destroyed, which leads to crashes later on when pruning the
PageCache.

In order to make the process more robust, this patch refactors the code so that
the Page is now in charge of removing all its associated HistoryItems from the
PageCache instead of relying on the BackForwardClient. Also, instead of having
the Page keep track of which HistoryItems are associated with it (which is
error prone), we now scan all PageCache entries instead to find which ones are
associated with the Page. While this is in theory slower, this is much safer
and in practice not an issue because the PageCache usually has 3-5 entries.

No new tests, could not reproduce.

* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
* history/CachedPage.h:
(WebCore::CachedPage::page):
* history/PageCache.cpp:
(WebCore::PageCache::removeAllItemsForPage):
* history/PageCache.h:
* page/Page.cpp:
(WebCore::Page::~Page):

Source/WebKit/mac:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

* History/BackForwardList.mm:
(BackForwardList::close):

Source/WebKit/win:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

* BackForwardList.cpp:
(BackForwardList::close):

Source/WebKit2:

The BackForwardClient no longer needs to worry about removing HistoryItems
from the PageCache now that WebCore takes care of it.

* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::close):
* WebProcess/WebPage/WebBackForwardListProxy.h:

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

2 years ago<rdar://problem/30323148> Webkit Nightly on 10.10 broken
andersca@apple.com [Thu, 2 Feb 2017 17:52:44 +0000 (17:52 +0000)]
<rdar://problem/30323148> Webkit Nightly on 10.10 broken

Follow-up fix.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):

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

2 years agoUnreviewed. Fix jhbuild dependencies build.
calvaris@igalia.com [Thu, 2 Feb 2017 17:46:20 +0000 (17:46 +0000)]
Unreviewed. Fix jhbuild dependencies build.

* gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:
Patch updated.

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

2 years ago<rdar://problem/30323148> Webkit Nightly on 10.10 broken
andersca@apple.com [Thu, 2 Feb 2017 17:39:57 +0000 (17:39 +0000)]
<rdar://problem/30323148> Webkit Nightly on 10.10 broken

Try to fix the 10.10 build.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):

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

2 years agoHandle m_processLauncher being null in ChildProcessProxy::processIdentifier()
andersca@apple.com [Thu, 2 Feb 2017 17:37:16 +0000 (17:37 +0000)]
Handle m_processLauncher being null in ChildProcessProxy::processIdentifier()
https://bugs.webkit.org/show_bug.cgi?id=167713
rdar://problem/28896113

Reviewed by Dan Bernstein.

This can happen if the process has been explicitly terminated.

* UIProcess/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::processIdentifier):

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

2 years agoColumn progression wrong after enabling pagination on RTL document
antti@apple.com [Thu, 2 Feb 2017 17:06:25 +0000 (17:06 +0000)]
Column progression wrong after enabling pagination on RTL document
https://bugs.webkit.org/show_bug.cgi?id=167733
<rdar://problem/29012252>

Reviewed by Zalan Bujtas.

Source/WebCore:

Column progression depends on document direction but was not updated when direction changed.

Test: fast/multicol/pagination/pagination-dynamic-rtl.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):

    Update column styles if document direction changes.

LayoutTests:

* fast/multicol/pagination/pagination-dynamic-rtl-expected.html: Added.
* fast/multicol/pagination/pagination-dynamic-rtl.html: Added.

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

2 years agoMarking http/tests/contentextensions/block-everything-unless-domain.html as flaky...
ryanhaddad@apple.com [Thu, 2 Feb 2017 17:04:42 +0000 (17:04 +0000)]
Marking http/tests/contentextensions/block-everything-unless-domain.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167653

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years ago[EME][GStreamer] Fixed decryptor selection
calvaris@igalia.com [Thu, 2 Feb 2017 16:54:48 +0000 (16:54 +0000)]
[EME][GStreamer] Fixed decryptor selection
https://bugs.webkit.org/show_bug.cgi?id=167588

Reviewed by Žan Doberšek.

Source/WebCore:

GStreamer selected a decryptor automatically but we need to be
able to tell it which decryptor we want because one file can be
encrypted with more than one system and the one we want to use can
depend on what the user tells us.

Now when the demuxer is about to select the demuxer, it runs a
GstContext query with the events, which are forwarded through the
EME api to the application, which will answer the the
generateKeyRequest and then we can instruct the demuxer to select
the one we tell it, not the one that is selected automatically. If
the demuxer has already a preferred decryptor, the codepath will
be similar to the older one.

Something that is also fixed is the report of the keyneeded event,
which will contain all pssh boxes as requested by the spec.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Intercept
the event and handle it.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
Initialize the CDM session.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
Unlock the protection condition just in case and set CDM to null.
(WebCore::extractEventsAndSystemsFromMessage): Access the events
and accepted key systems coming at the message from the demuxer.
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
Handle the protection event not as an element event but as a
context request. It also concatenates all the initdatas in case
there is more than one. The event is sent in the main thread and
the current one blocks until a timeout is hit or the
generateKeyRequest is called.
(WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
Check if the event was already handled and if not, run the need
key event.
(WebCore::MediaPlayerPrivateGStreamerBase::receivedGenerateKeyRequest):
Notify the that the query arrived so that we can unlock the
demuxer thread.
(WebCore::keySystemIdToUuid): Translates ids to uuids, meaning
the ones coming from JS to the ones coming from the media engine.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Attributes and methods.
* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
(webkit_media_clear_key_decrypt_class_init):
(webKitMediaClearKeyDecryptorRequestDecryptionKey): Deleted.
* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
Added the ui and uuid.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webkitMediaCommonEncryptionDecryptSinkEventHandler): Do not rely
on the subclass, just forward the event to the pipeline inside a message.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
Remove unused function signature.
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::appendPipelineNeedContextMessageCallback): Renamed from
appendPipelineElementMessageCallback.
(WebCore::AppendPipeline::AppendPipeline): Connect to the
need-context message instead of the element one.
(WebCore::AppendPipeline::dispatchPendingDecryptionKey):
Dispatches the drm-cypher message if there is one pending.
(WebCore::AppendPipeline::dispatchDecryptionKey): Dispatches the
drm-cypher.
(WebCore::AppendPipeline::handleNeedContextSyncMessage): Handles
the need-context event instead of the element one.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
Dispatches the key to the pipeline if there's any pending.
(WebCore::appendPipelineElementMessageCallback): Deleted.
(WebCore::AppendPipeline::handleElementMessage): Deleted.
* platform/graphics/gstreamer/mse/AppendPipeline.h: New methods
and attributes.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::dispatchDecryptionKey):
Use the dispatchDecryptionKey method of the AppendPipeline.

Tools:

This patches are pending at https://bugzilla.gnome.org/show_bug.cgi?id=770107

* gtk/jhbuild.modules: Added patches to gstreamer and
gst-plugins-good packages.
* gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch: Added.
* gtk/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Added.

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

2 years agoLayoutTest media/modern-media-controls/buttons-container/buttons-container-buttons...
graouts@webkit.org [Thu, 2 Feb 2017 16:30:28 +0000 (16:30 +0000)]
LayoutTest media/modern-media-controls/buttons-container/buttons-container-buttons-property.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167371

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 years agoSkip fast/visual-viewport/ios/bottom-bar-with-keyboard.html on ios-simulator.
ryanhaddad@apple.com [Thu, 2 Feb 2017 16:08:34 +0000 (16:08 +0000)]
Skip fast/visual-viewport/ios/bottom-bar-with-keyboard.html on ios-simulator.

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

2 years agoUnreviewed, rolling out r211529.
ryanhaddad@apple.com [Thu, 2 Feb 2017 16:04:29 +0000 (16:04 +0000)]
Unreviewed, rolling out r211529.

This change caused the test to fail on macOS.

Reverted changeset:

"Clean up css3/filters/backdrop/backdrop-filter-with-clip-
path.html expected results."
http://trac.webkit.org/changeset/211529

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

2 years agoLayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscre...
commit-queue@webkit.org [Thu, 2 Feb 2017 14:59:34 +0000 (14:59 +0000)]
LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=167372

Unreviewed test gardening.

Patch by Antoine Quint <graouts@apple.com> on 2017-02-02

* platform/mac-wk1/TestExpectations:

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

2 years agoLayoutTest media/modern-media-controls/media-controller/media-controller-resize.html...
commit-queue@webkit.org [Thu, 2 Feb 2017 14:26:22 +0000 (14:26 +0000)]
LayoutTest media/modern-media-controls/media-controller/media-controller-resize.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=164571

Unreviewed test gardening.

Patch by Antoine Quint <graouts@apple.com> on 2017-02-02

* platform/mac-wk1/TestExpectations:

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

2 years agoLayoutTest media/modern-media-controls/rewind-button/rewind-button.html is a flaky...
commit-queue@webkit.org [Thu, 2 Feb 2017 14:22:04 +0000 (14:22 +0000)]
LayoutTest media/modern-media-controls/rewind-button/rewind-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167352

Unreviewed test gardening.

Patch by Antoine Quint <graouts@apple.com> on 2017-02-02

* platform/mac-wk1/TestExpectations:

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

2 years agoRemoved unused EventHandler members
commit-queue@webkit.org [Thu, 2 Feb 2017 10:38:00 +0000 (10:38 +0000)]
Removed unused EventHandler members
https://bugs.webkit.org/show_bug.cgi?id=167723

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-02
Reviewed by Yusuke Suzuki.

* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
Remove unused members.

* editing/FrameSelection.cpp:
* html/HTMLTextAreaElement.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderSlider.cpp:
Remove unnecessary includes.

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

2 years agoWeb Inspector: Upgrade Esprima to the latest one to support dynamic import
utatane.tea@gmail.com [Thu, 2 Feb 2017 10:31:18 +0000 (10:31 +0000)]
Web Inspector: Upgrade Esprima to the latest one to support dynamic import
https://bugs.webkit.org/show_bug.cgi?id=167698

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/External/Esprima/esprima.js:
Update to Esprima@5307e30 (4.0.0-dev).

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
* UserInterface/Workers/Formatter/ESTreeWalker.js:
(ESTreeWalker.prototype._walkChildren):
(ESTreeWalker):
Add new nodes, SpreadProperty, RestProperty, and Import.
SpreadProperty and RestProperty are the part of ES2018 rest and spread properties.
https://github.com/sebmarkbage/ecmascript-rest-spread
Import is dynamic import node. The syntax is similar to Super.
https://github.com/tc39/proposal-dynamic-import

* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):

LayoutTests:

* inspector/formatting/formatting-javascript-expected.txt:
* inspector/formatting/formatting-javascript.html:
* inspector/formatting/resources/javascript-tests/import-expected.js: Added.
(async.load):
* inspector/formatting/resources/javascript-tests/import.js: Added.
(async.load):
* inspector/formatting/resources/javascript-tests/object-array-literal-expected.js:
* inspector/formatting/resources/javascript-tests/object-array-literal.js:
* inspector/formatting/resources/javascript-tests/variable-declaration-expected.js:
* inspector/formatting/resources/javascript-tests/variable-declaration.js:
* inspector/formatting/resources/utilities.js:
(TestPage.registerInitializer.):
(TestPage.registerInitializer):
Fix a bug which occurs when output is not expected one.

* inspector/model/parse-script-syntax-tree-expected.txt:
* inspector/model/parse-script-syntax-tree.html:

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

2 years agoRemoved unused m_navigationStart from NavigatorGamepad
commit-queue@webkit.org [Thu, 2 Feb 2017 10:30:17 +0000 (10:30 +0000)]
Removed unused m_navigationStart from NavigatorGamepad
https://bugs.webkit.org/show_bug.cgi?id=167722

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-02
Reviewed by Yusuke Suzuki.

* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::NavigatorGamepad):
(WebCore::NavigatorGamepad::from):
* Modules/gamepad/NavigatorGamepad.h:
(WebCore::NavigatorGamepad::navigationStart): Deleted.

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

2 years agoRemoved unused m_errorHandlingModeReentry from Interpreter
commit-queue@webkit.org [Thu, 2 Feb 2017 09:49:53 +0000 (09:49 +0000)]
Removed unused m_errorHandlingModeReentry from Interpreter
https://bugs.webkit.org/show_bug.cgi?id=167726

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-02
Reviewed by Yusuke Suzuki.

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

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

2 years agoIn iOS, we should take background assertion when accessing localstorage databases.
commit-queue@webkit.org [Thu, 2 Feb 2017 08:33:29 +0000 (08:33 +0000)]
In iOS, we should take background assertion when accessing localstorage databases.
https://bugs.webkit.org/show_bug.cgi?id=165478

Source/WebCore:

Move WebSQLiteDatabaseTrackerClient from WebKitLegacy to WebCore so that it can be accessible from
WebKit1 and WebKit2. Previously, to avoid dependencies on UIKit, WebKitLegacy introduced several
global methods for UIKit to setup the start/end background task blocks on runtime (WebKitSetStartBackgroundTaskBlock,
WebKitSetInvalidWebBackgroundTaskIdentifier and WebKitSetEndBackgroundTaskBlock). Since we have to
move the background task handling to WebCore, to avoid adding WebCore dependencies on UIKit, this
patch introdues a new WebCore class WebBackgroundTaskController which holds the start/end background
task blocks. The existing WebKitSetStartBackgroundTaskBlock and WebKitSetEndBackgroundTaskBlock methods
in WebKit1 will use WebBackgroundTaskController to store the blocks set by UIKit.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

No new test since this is code refactoring.

* WebCore.xcodeproj/project.pbxproj: Add a new class WebBackgroundTaskController to the project. Also move
    WebSQLiteDatabaseTrackerClient from WebKitLegacy to WebCore.
* platform/ios/WebBackgroundTaskController.h: Use properties to hold the blocks for starting or ending background tasks.
* platform/ios/WebBackgroundTaskController.mm:
(+[WebBackgroundTaskController sharedController]):
(-[WebBackgroundTaskController dealloc]):
(-[WebBackgroundTaskController startBackgroundTaskWithExpirationHandler:]): Start a background task with a expiration handler;
    to start the background task, we will use backgroundTaskStartBlock set up by UIKit.
(-[WebBackgroundTaskController endBackgroundTaskWithIdentifier:]): Call backgroundTaskEndBlack to end a background task.
* platform/ios/WebSQLiteDatabaseTrackerClient.h: Copied from Source/WebKit/ios/Storage/WebSQLiteDatabaseTrackerClient.h.
* platform/ios/WebSQLiteDatabaseTrackerClient.mm: Copied from Source/WebKit/ios/Storage/WebSQLiteDatabaseTrackerClient.mm.
(WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient): Make WebSQLiteDatabaseTrackerClient a singleton.
(WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::~WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction): Use a utility class WebDatabaseTransactionBackgroundTaskController
    to schedule database transaction background task.
(WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction): Use WebDatabaseTransactionBackgroundTaskController to stop
    databas transaction background task.
(transactionBackgroundTaskIdentifierLock: Moved from Source/WebKit/mac/Storage/WebDatabaseManager.mm.
(setTransactionBackgroundTaskIdentifier): Ditto.
(getTransactionBackgroundTaskIdentifier): Ditto.
(+[WebDatabaseTransactionBackgroundTaskController startBackgroundTask]): Ditto.
(+[WebDatabaseTransactionBackgroundTaskController endBackgroundTask]): Ditto.

Source/WebKit:

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

* WebKit.xcodeproj/project.pbxproj: Moved WebSQLiteDatabaseTrackerClient to WebCore.

Source/WebKit/ios:

Move application background task handling code from WebKit to WebCore.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

* Misc/WebUIKitSupport.h: Remove several methods that only used internally for background
    task handling. They are not needed in WebKit any more since background task handling
    is moved to WebCore and wrapped in WebBackgroundTaskController class.
* Misc/WebUIKitSupport.mm:
(WebKitSetInvalidWebBackgroundTaskIdentifier): Instead of storing the value in a static global
    variable, save it in WebBackgroundTaskController.
(WebKitSetStartBackgroundTaskBlock): Ditto.
(WebKitSetEndBackgroundTaskBlock): Ditto.

Source/WebKit/mac:

Move database transaction background task handling code from WebDatabaseManager to
WebCore's WebSQLiteDatabaseTrackerClient.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

* Storage/WebDatabaseManager.mm:
* Storage/WebDatabaseManagerInternal.h: Remove a category for background task handling.
* WebCoreSupport/WebApplicationCache.mm:
(+[WebApplicationCache initializeWithBundleIdentifier:]): Use WebCore::WebSQLiteDatabaseTrackerClient.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]): Ditto.

Source/WebKit2:

Just like in WebKit1, when initializing a WKWebView, initialize the database transaction
tracker client. Also, we should set up the start and end background task blocks here. In
WebKit1, this is done inside UIKit.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-02
Reviewed by Brady Eidson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Set up the start/end background task blocks
    and database transaction tracker client.

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

2 years ago[EME] Implement MediaKeySession::update()
zandobersek@gmail.com [Thu, 2 Feb 2017 06:28:03 +0000 (06:28 +0000)]
[EME] Implement MediaKeySession::update()
https://bugs.webkit.org/show_bug.cgi?id=167636

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the MediaKeySession::update() method by following the steps as
they are described in the specification.

In order to sanitize the passed-in response data, CDM::sanitizeResponse()
is added. It passes the SharedBuffer object by reference to the CDMPrivate
interface implementor, which returns a SharedBuffer object containing
sanitized response data.

CDMInstance::updateLicense() virtual method is added to perform the license
update for some specific CDMInstance object. After the update the CDMInstance
invokes the callback that's passed to updateLicense(), providing information
about session being closed, changed keys or expiration value, any message
that has to be enqueued, and whether the update was successful.

After that callback is invoked, MediaKeySession::update() goes on to handle
all the provided information in a future task, finally resolving the promise
(or rejecting it beforehand in case of any failure during response handling
or license update).

Three algorithms that can be invoked from MediaKeySession::update() (key
status update, expiration update and session closure) will be implemented
separately. Placeholder methods are provided until then.

MockCDM::sanitizeResponse() and MockCDMInstance::updateLicense() are
implemented for testing purposes. For now only the response sanitization
and sanitized response format are checked there. Key status update,
expiration update and session closure should be tested once the
implementations for those algorithms are added.

Test: media/encrypted-media/mock-MediaKeySession-update.html

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::sanitizeResponse):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::updateKeyStatuses):
(WebCore::MediaKeySession::updateExpiration):
(WebCore::MediaKeySession::sessionClosed):
* Modules/encryptedmedia/MediaKeySession.h:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDM::sanitizeResponse):
(WebCore::MockCDMInstance::updateLicense):
* testing/MockCDMFactory.h:

LayoutTests:

Add the mock-MediaKeySession-update.html test, cotaining a few cases that check
the basic operations of MediaKeySession::update(), focusing on proper promise
resolution and rejection based on the state of the object and the passed-in
response argument. Skip the test on all platforms for now.

* media/encrypted-media/mock-MediaKeySession-update-expected.txt: Added.
* media/encrypted-media/mock-MediaKeySession-update.html: Added.
* platform/efl/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoMake run-benchmark script supports 'config' key in test plan.
dewei_zhu@apple.com [Thu, 2 Feb 2017 03:10:58 +0000 (03:10 +0000)]
Make run-benchmark script supports 'config' key in test plan.
https://bugs.webkit.org/show_bug.cgi?id=167715

Reviewed by Ryosuke Niwa.

Add support for 'config' key in test paln.
'config' key is a dictionary that specifies environment configurations while test is running.
Specifies orientation to be portrait in MotionMark benchmark.

* Scripts/webkitpy/benchmark_runner/README.md:
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
(BenchmarkRunner._run_benchmark):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver.prepare_env):
* Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:
(LinuxBrowserDriver.prepare_env):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver.prepare_env):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.prepare_env):
* Scripts/webkitpy/benchmark_runner/data/plans/motionmark.plan:

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

2 years agoUnreviewed, rolling out r211461.
commit-queue@webkit.org [Thu, 2 Feb 2017 01:57:00 +0000 (01:57 +0000)]
Unreviewed, rolling out r211461.
https://bugs.webkit.org/show_bug.cgi?id=167721

Big regression on kraken (Requested by jfbastien on #webkit).

Reverted changeset:

"OSR entry: delay outer-loop compilation when at inner-loop"
https://bugs.webkit.org/show_bug.cgi?id=167149
http://trac.webkit.org/changeset/211461

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

2 years agoUnreviewed, fix the nightly open source build.
wenson_hsieh@apple.com [Thu, 2 Feb 2017 01:54:46 +0000 (01:54 +0000)]
Unreviewed, fix the nightly open source build.

Adds more header checks when importing from WebKitAdditions.

* UIProcess/Cocoa/WebPageProxyCocoa.mm:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

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

2 years agoUnreviewed, fix unintended change.
keith_miller@apple.com [Thu, 2 Feb 2017 01:49:20 +0000 (01:49 +0000)]
Unreviewed, fix unintended change.

* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::StackFrame::displayName):

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

2 years ago[Mac] Update CARingBuffer class
eric.carlson@apple.com [Thu, 2 Feb 2017 01:48:29 +0000 (01:48 +0000)]
[Mac] Update CARingBuffer class
https://bugs.webkit.org/show_bug.cgi?id=167656
<rdar://problem/30318329>

Unreviewed fix the 32-bit build after r211539.

* platform/audio/mac/CAAudioStreamDescription.cpp:
(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):

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

2 years agoRebaseline compositing/geometry/fixed-in-composited.html for ios-simulator.
ryanhaddad@apple.com [Thu, 2 Feb 2017 01:47:37 +0000 (01:47 +0000)]
Rebaseline compositing/geometry/fixed-in-composited.html for ios-simulator.

Unreviewed test gardening.

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

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

2 years agoREGRESSION (r210820): svn-create-patch does not emit property change only diff
dbates@webkit.org [Thu, 2 Feb 2017 01:41:24 +0000 (01:41 +0000)]
REGRESSION (r210820): svn-create-patch does not emit property change only diff
https://bugs.webkit.org/show_bug.cgi?id=167169

Reviewed by David Kilzer.

More directly handle the SVN 1.9 or newer syntax change for a diff of a copied or moved file
- a SVN diff header and an empty body. In particular, remove a duplicate leading SVN diff
header from the output of "svn diff" on a file that was copied or moved.

Following r210820 svn-create-patch emits to standard output a diff only if it has at least one
chunk range line (e.g. @@ -0,0 +1,7 @@) as a means to workaround a syntax change in the diff
output of a copied or moved file in SVN version 1.9 or newer. In SVN 1.9 or newer "svn diff"
of a copied or moved file always emits to standard output a leading SVN diff header (an "Index:"
line followed by a separator line) with an empty body; => no chunk range lines. However a diff
of a file with only a property change also does not contain any chunk range lines. Therefore
svn-create-patch no longer emitted to standard output such a diff. Instead of indirectly detecting
a SVN diff header with an empty body by counting the number of chunk range lines in the diff
we should directly test for the presence of a leading SVN diff header with an empty body and
remove such lines from the diff.

* Scripts/VCSUtils.pm:
(fixSVNPatchForAdditionWithHistory): Added.
* Scripts/svn-create-patch:
(generateDiff): Pass the output from "svn diff" to fixSVNPatchForAdditionWithHistory() when
we have a non empty patch for an added file with history (i.e. a copied or moved file).
* Scripts/webkitperl/VCSUtils_unittest/fixSVNPatchForAdditionWithHistory.pl: Added.

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

2 years agoThe sampling profile should have an option to sample from C frames.
keith_miller@apple.com [Thu, 2 Feb 2017 01:23:37 +0000 (01:23 +0000)]
The sampling profile should have an option to sample from C frames.
https://bugs.webkit.org/show_bug.cgi?id=167614

Reviewed by Saam Barati.

We should be able to use the sampling profiler, at least
internally, to trace C calls.  This patch only modifies the JSC
shell although it would be nice to add it to the Web Inspector in
a future patch.

* runtime/Options.h:
* runtime/SamplingProfiler.cpp:
(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::walk):
(JSC::FrameWalker::recordJSFrame):
(JSC::CFrameWalker::CFrameWalker):
(JSC::CFrameWalker::walk):
(JSC::CFrameWalker::isCFrame):
(JSC::CFrameWalker::advanceToParentFrame):
(JSC::CFrameWalker::frame):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::StackFrame::displayName):
* runtime/SamplingProfiler.h:
(JSC::SamplingProfiler::UnprocessedStackFrame::UnprocessedStackFrame):

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

2 years ago[iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keybo...
simon.fraser@apple.com [Thu, 2 Feb 2017 01:12:53 +0000 (01:12 +0000)]
[iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keyboard is visible
https://bugs.webkit.org/show_bug.cgi?id=167710
rdar://problem/30100286

Reviewed by Wenson Hsieh.
Source/WebCore:

Add a bit of logging to show when RLC decides to not composite a fixed element which
is out of bounds.

Test: fast/visual-viewport/ios/bottom-bar-with-keyboard.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

Source/WebKit2:

The unobscuredRectInContentCoordinates passed to -didUpdateVisibleRect:... could project outside
of the bounds of the document, which is OK when rubber-banding, but not when we're in a stable state,
because that can cause fixed elements to get pushed outside the doc. This happened when the keyboard
triggered bottom content insets on the scroll view.

LayoutTests:

* fast/visual-viewport/ios/bottom-bar-with-keyboard-expected.txt: Added.
* fast/visual-viewport/ios/bottom-bar-with-keyboard.html: Added.

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

2 years ago[Mac] Update CARingBuffer class
eric.carlson@apple.com [Wed, 1 Feb 2017 23:49:41 +0000 (23:49 +0000)]
[Mac] Update CARingBuffer class
https://bugs.webkit.org/show_bug.cgi?id=167656

Unreviewed build fix after r211539.

* platform/audio/mac/CAAudioStreamDescription.cpp:
(WebCore::CAAudioStreamDescription::CAAudioStreamDescription): Initialize a variable to fix
release builds.

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

2 years ago[Mac] Update CARingBuffer class
eric.carlson@apple.com [Wed, 1 Feb 2017 23:38:04 +0000 (23:38 +0000)]
[Mac] Update CARingBuffer class
https://bugs.webkit.org/show_bug.cgi?id=167656

Reviewed by NOBODY (OOPS!).

Source/WebCore:

API test CARingBufferTest added.

* WebCore.xcodeproj/project.pbxproj: Add headers to framework so they can be used from the API test.

* platform/audio/AudioStreamDescription.h: Add Int32.

* platform/audio/mac/CAAudioStreamDescription.cpp:
(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::~CAAudioStreamDescription):
(WebCore::CAAudioStreamDescription::format): Support Int32.
(WebCore::CAAudioStreamDescription::operator==): Make inline.
* platform/audio/mac/CAAudioStreamDescription.h:

* platform/audio/mac/CARingBuffer.cpp:
(WebCore::CARingBuffer::CARingBuffer): Move initializers into class declaration.
(WebCore::CARingBuffer::allocate): Use flush method, get allocation info from a CAAudioStreamDescription.
(WebCore::FetchABL): Add a mode parameter to allow samples to replace or mix into destination.
(WebCore::CARingBuffer::flush): New.
(WebCore::CARingBuffer::fetch): Add mode parameter.
(WebCore::CARingBuffer::~CARingBuffer): Deleted.
* platform/audio/mac/CARingBuffer.h:
(WebCore::CARingBuffer::~CARingBuffer):

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::prepare): Use new CARingBuffer constructor.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::prepare): Use new CARingBuffer constructor
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp: Added.
(TestWebKitAPI::CARingBufferTest::SetUp):
(TestWebKitAPI::CARingBufferTest::setup):
(TestWebKitAPI::CARingBufferTest::setListDataBuffer):
(TestWebKitAPI::CARingBufferTest::description):
(TestWebKitAPI::CARingBufferTest::bufferList):
(TestWebKitAPI::CARingBufferTest::ringBuffer):
(TestWebKitAPI::CARingBufferTest::capacity):
(TestWebKitAPI::CARingBufferTest::audioBufferListSizeForStream):
(TestWebKitAPI::CARingBufferTest::configureBufferListForStream):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::MixingTest::run):

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

2 years agoWebProcess crashes in int WTF::__throw_bad_variant_access<int> when expanding/shrink...
enrica@apple.com [Wed, 1 Feb 2017 23:25:15 +0000 (23:25 +0000)]
WebProcess crashes in  int WTF::__throw_bad_variant_access<int> when expanding/shrinking a block selection.
https://bugs.webkit.org/show_bug.cgi?id=167673
rdar://problem/30229620

Reviewed by Anders Carlsson

This is a speculative fix for a bug that might have been introduced
with http://trac.webkit.org/changeset/208479.
The code in containsRange inline fuction in WebPageIOS.mm has not been
updated when the return value of Range::compareBoundaryPoints was changed
to ExceptionOr<short>.
Since there is already a method containsRange in the Range class that
does the right thing, expandedRangeFromHandle now uses that.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::containsRange): Deleted.

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

2 years agoVersioning.
jmarcell@apple.com [Wed, 1 Feb 2017 23:16:20 +0000 (23:16 +0000)]
Versioning.

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

2 years agoMarking compositing/repaint/fixed-background-scroll.html as flaky on macOS WK1.
ryanhaddad@apple.com [Wed, 1 Feb 2017 23:08:08 +0000 (23:08 +0000)]
Marking compositing/repaint/fixed-background-scroll.html as flaky on macOS WK1.
https://bugs.webkit.org/show_bug.cgi?id=154612

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 years agoIPC::Connection receive ports should be guarded
andersca@apple.com [Wed, 1 Feb 2017 22:52:02 +0000 (22:52 +0000)]
IPC::Connection receive ports should be guarded
https://bugs.webkit.org/show_bug.cgi?id=167704

Reviewed by Tim Horton.

Guarding receive rights will make sure that they won't be closed accidentally. They are created
with a context pointer and can only be unguarded or destructed with the same context pointer.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate):
Use mach_port_destruct and pass the connection pointer as the context.

(IPC::Connection::platformInitialize):
Guard the server port with the connection pointer as the context.

(IPC::Connection::open):
Use mach_port_construct to create the port which lets us avoid a call to mach_port_set_attributes and setMachPortQueueLength.
Make the port guarded and use the connection pointer as the context.

(IPC::createReceiveSource):
Get rid of this and just duplicate the five lines of code in two places. For the receive port we want to use mach_port_destruct
in our cancel handler.

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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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