WebKit.git
2 years agoObject allocation sinking phase doesn't properly handle control flow when emitting...
sbarati@apple.com [Sat, 11 Feb 2017 04:05:06 +0000 (04:05 +0000)]
Object allocation sinking phase doesn't properly handle control flow when emitting a PutHint of a materialized object into a PromotedHeapLocation of a still sunken object
https://bugs.webkit.org/show_bug.cgi?id=168140
<rdar://problem/30205880>

Reviewed by Filip Pizlo.

JSTests:

* stress/allocation-sinking-puthint-control-flow.js: Added.
(e):
(bar):
(let.y):
(else.let.y):
(baz):
(foo):
(catch):

Source/JavaScriptCore:

This patch fixes a bug in allocation sinking phase where
we don't properly handle control flow when materializing
an object and also PutHinting that materialization into
a still sunken object. We were performing the PutHint
for the materialization at the point of materialization,
however, we may have materialized along both edges
of a control flow diamond, in which case, we need to
also PutHint at the join point. Consider this program:

```
bb#0:
b: PhantomActivation()
a: PhantomNewFunction()
c: PutHint(@a, @b, ActivationLoc)
Branch(#1, #2)

bb#1:
d: MaterializeActivation()
e: PutHint(@a, @d, ActivationLoc)
f: Upsilon(@d, ^p)
Jump(#3)

bb#2:
g: MaterializeActivation()
h: PutHint(@a, @g, ActivationLoc)
i: Upsilon(@d, ^p)
Jump(#3)

bb#3:
p: Phi()
// What is PromotedHeapLocation(@a, ActivationLoc) here?
// What would we do if we exited?
```
Before this patch, we didn't perform a PutHint of the Phi.
However, we need to, otherwise when exit, we won't know
the value of PromotedHeapLocation(@a, ActivationLoc)

The program we need then, for correctness, is this:
```
bb#0:
b: PhantomActivation()
a: PhantomNewFunction()
c: PutHint(@a, @b, ActivationLoc)
Branch(#1, #2)

bb#1:
d: MaterializeActivation()
e: PutHint(@a, @d, ActivationLoc)
f: Upsilon(@d, ^p)
Jump(#3)

bb#2:
g: MaterializeActivation()
h: PutHint(@a, @g, ActivationLoc)
i: Upsilon(@d, ^p)
Jump(#3)

bb#3:
p: Phi()
j: PutHint(@a, @p, ActivationLoc)
```

This patch makes it so that we emit the necessary PutHint at node `j`.
I've also added more validation to the OSRAvailabilityAnalysisPhase
to catch this problem during validation.

* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):

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

2 years agoZero out some WKWebView state in the case of a web content crash
simon.fraser@apple.com [Sat, 11 Feb 2017 03:59:06 +0000 (03:59 +0000)]
Zero out some WKWebView state in the case of a web content crash
https://bugs.webkit.org/show_bug.cgi?id=168157

Reviewed by Tim Horton.

Reset some bits of state in WKWebView when the web content process crashes, in
to try to avoid states that might cause the web view to stay blank.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):

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

2 years agoAttempt to fix the WinCairo 64-Bit Release build following <https://trac.webkit.org...
dbates@webkit.org [Sat, 11 Feb 2017 03:32:40 +0000 (03:32 +0000)]
Attempt to fix the WinCairo 64-Bit Release build following <https://trac.webkit.org/changeset/212173>
(https://bugs.webkit.org/show_bug.cgi?id=166774)

Touch WebKit.idl in the hopes that it will cause CMake to regenerate the COM interface files.

* Interfaces/WebKit.idl:

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

2 years agoAttempt to fix the build following <https://trac.webkit.org/changeset/212173>
dbates@webkit.org [Sat, 11 Feb 2017 03:09:10 +0000 (03:09 +0000)]
Attempt to fix the build following <https://trac.webkit.org/changeset/212173>
(https://bugs.webkit.org/show_bug.cgi?id=166774)

* dom/Document.cpp:
(WebCore::Document::detachFromCachedFrame): Use ASSER_UNUSED() instead of ASSERT() since
the parameter cachedFrame is unused in non-debug build.

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

2 years agoDetach frame from document when entering page cache
dbates@webkit.org [Sat, 11 Feb 2017 02:53:53 +0000 (02:53 +0000)]
Detach frame from document when entering page cache
https://bugs.webkit.org/show_bug.cgi?id=166774
<rdar://problem/29904368>

Reviewed by Chris Dumez.

Source/WebCore:

When a page enters the page cache it is unnecessary for it to hold a reference to its
associated frame because subsequent interactions with the page do not need to make use
of it. Once a page exits the page cache we associate it with its frame.

* dom/Document.cpp:
(WebCore::Document::frameDestroyed): Update comment to reflect the renaming of disconnectFromFrame().
(WebCore::Document::attachToCachedFrame): Added.
(WebCore::Document::detachFromCachedFrame): Added.
(WebCore::Document::prepareForDestruction): Only call CSSAnimationController::detachFromDocument() if
we have a frame. Substitute detachFromFrame() for disconnectFromFrame() as the latter was renamed to
the former.
(WebCore::Document::hasEverCalledWindowOpen): Deleted.
(WebCore::Document::markHasCalledWindowOpen): Deleted.
(WebCore::Document::disconnectFromFrame): Renamed to detachFromFrame.
* dom/Document.h:
(WebCore::Document::detachFromFrame): Renamed; formerly named disconnectFromFrame(). Changed
visibility from public to private and made this function inline.
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::pruneDetachedChildFrames): Remove cached child frames that were
removed from the page when it was in the page cache as there is no need to restore such frames.
(WebCore::CachedFrameBase::restore): Call pruneDetachedChildFrames() before restoring the
frame tree.
(WebCore::CachedFrame::CachedFrame): Detach from the frame.
(WebCore::CachedFrame::open): Assert that we have a document and re-attach the frame.
(WebCore::CachedFrame::destroy): Update assertion as this function should only be called for a
frameless document. Only detach the FrameView, DocumentLoader, and Page when the cached frame is for
subframe and is associated with a Page object. Call CSSAnimationController::detachFromDocument() to
detach the animation controller from the document as it is being destroyed. We have to do this here
because the document does not have a frame. And Document::prepareForDestruction() only calls
CSSAnimationController::detachFromDocument() if the document has a frame.
* history/CachedFrame.h:
* history/PageCache.cpp:
(WebCore::canCachePage): Remove logic that prevents caching of a page that called window.open()
or has an opener as it is feasible to keep such pages in the page cache.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Fix style nit.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::frameDetached): Only stop all loaders and stop active DOM objects if the
page is not in- or about to enter- the page cache. A page in the page cache has finished loading
and its active DOM objects are suspended. Also fix style nit in comment.
(WebCore::FrameLoader::detachFromParent): Only stop all loaders if the page is not in- or about to
enter- the page cache. A page in the page cache has finished loading. Also added a comment to explain
that we protect the frame because stopAllLoaders() can cause the frame to be deallocated.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow): Remove logic to call markHasCalledWindowOpen() as this
function will be removed.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::hasCalledWindowOpenKey): Deleted.
(WebCore::DiagnosticLoggingKeys::hasOpenerKey): Deleted.
* page/DiagnosticLoggingKeys.h:
* page/Page.cpp:
(WebCore::Page::openedByWindowOpen): Deleted.
* page/Page.h:
* page/Settings.in: Remove setting allowsPageCacheWithWindowOpener.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences allowsPageCacheWithWindowOpener]): Deleted.
(-[WebPreferences setAllowsPageCacheWithWindowOpener:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setAllowsPageCacheWithWindowOpener): Deleted.
(WebPreferences::allowsPageCacheWithWindowOpener): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAllowsPageCacheWithWindowOpener): Deleted.
(WKPreferencesGetAllowsPageCacheWithWindowOpener): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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

2 years agoREGRESSION (r211845): [ios-simulator] LayoutTest compositing/masks/solid-color-masked...
simon.fraser@apple.com [Sat, 11 Feb 2017 02:30:23 +0000 (02:30 +0000)]
REGRESSION (r211845): [ios-simulator] LayoutTest compositing/masks/solid-color-masked.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168054

Reviewed by Tim Horton.

Source/WebCore:

When adding mask layers, there was an ordering dependency. There was a hack in GraphicsLayerCA::setVisibleAndCoverageRects()
to propagate m_intersectsCoverageRect to masks. However, if GraphicsLayerCA::setVisibleAndCoverageRects()
ran on the masked layer before the mask was added, nothing updated the "m_intersectsCoverageRect" state of the mask layer.

Fix by explicitly calling setVisibleAndCoverageRects() on the mask layer, passing the same rects and
viewport-constrained state as for its host layer (we already assume that their geometry matches).

Tested by compositing/masks/solid-color-masked.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):

LayoutTests:

Make the timeout 10ms so the test consistently fails with the old code.

* compositing/masks/solid-color-masked.html:

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

2 years agoWeb Inspector: Debugger sidebar panel should not have multiple tree selections
mattbaker@apple.com [Sat, 11 Feb 2017 02:25:04 +0000 (02:25 +0000)]
Web Inspector: Debugger sidebar panel should not have multiple tree selections
https://bugs.webkit.org/show_bug.cgi?id=166000
<rdar://problem/29721988>

Reviewed by Timothy Hatcher.

The method for synchronizing tree element selection across a sidebar's
tree outlines fails for selections made during startup, because it depends
on events which are being suppressed.

This adds a new class, TreeOutlineGroup, which restricts tree element selection
inside a group of tree outlines by receiving messages directly from TreeElement.

* UserInterface/Main.html:
Add file for TreeOutlineGroup class.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
(WebInspector.ContentBrowserTabContentView):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
Update `createContentTreeOutline` calls for new signature.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
Replace _visibleContentTreeOutlines with a TreeOutlineGroup, which
contains the single-selection behavior previously handled by the sidebar.

(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlines):
(WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement):
Implement using the sidebar's tree outline group.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
Remove first parameter, which is always true.
(WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
(WebInspector.NavigationSidebarPanel.prototype.pruneStaleResourceTreeElements):
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): Deleted.
Remove unused setter.
(WebInspector.NavigationSidebarPanel.prototype.get visibleContentTreeOutlines): Deleted.
Renamed to contentTreeOutlines.
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus): Deleted.
No longer needed.
(WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange): Deleted.
Selection across trees handled by the tree outline group.

* UserInterface/Views/TreeElement.js:
(WebInspector.TreeElement.prototype.select):
Inform the element's tree outline group (if any), of the selection changed.

* UserInterface/Views/TreeOutlineGroup.js: Added.
(WebInspector.TreeOutlineGroup):
(WebInspector.TreeOutlineGroup.groupForTreeOutline):
(WebInspector.TreeOutlineGroup.prototype.get selectedTreeElement):
(WebInspector.TreeOutlineGroup.prototype.itemAdded):
Associate tree outline with the group and wrap tree elements. If the
incoming tree outline has a selection, deselect the group's currently
selected tree element.

(WebInspector.TreeOutlineGroup.prototype.itemRemoved):
Disassociate the tree outline from the group.
(WebInspector.TreeOutlineGroup.prototype.didSelectTreeElement):
Called by TreeElement when it becomes selected.
(WebInspector.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
Deselect any selected items in all tree outlines belonging to the group,
except for the specified item.

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

2 years agoUnreviewed, rolling out r212154, r212154, and r212156.
commit-queue@webkit.org [Sat, 11 Feb 2017 02:20:21 +0000 (02:20 +0000)]
Unreviewed, rolling out r212154, r212154, and r212156.
https://bugs.webkit.org/show_bug.cgi?id=168156

broke internal builds (Requested by smfr on #webkit).

Reverted changesets:

"Add a DragImage class that wraps a DragImageRef"
https://bugs.webkit.org/show_bug.cgi?id=168131
http://trac.webkit.org/changeset/212154

"Add a DragImage class that wraps a DragImageRef"
https://bugs.webkit.org/show_bug.cgi?id=168131
http://trac.webkit.org/changeset/212154

"Try to fix the iOS and Windows builds."
http://trac.webkit.org/changeset/212156

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

2 years agoWebInspector: refactor RemoteInspector to move cocoa specific code to their own files
bburg@apple.com [Sat, 11 Feb 2017 01:27:21 +0000 (01:27 +0000)]
WebInspector: refactor RemoteInspector to move cocoa specific code to their own files
https://bugs.webkit.org/show_bug.cgi?id=166681

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-10
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Move RemoteConnectionToTarget.mm and RemoteInspector.mm to a cocoa directory renamed with a Cocoa prefix,
because those are now the cocoa implementation of RemoteConnectionToTarget and RemoteInspector. The
cross-platform parts of RemoteInspector have been moced to a new RemoteInspector.cpp file. Also moved to cocoa
directory RemoteInspectorXPCConnection.h and RemoteInspectorXPCConnection.mm keeping the same name. Other than
that there aren't important code changes, only some cocoa specific types like NSString used in common headers,
and some other platform ifdefs needed. This is in preparation for adding a remote inspector implementation for
the GTK+ port.

* API/JSRemoteInspector.cpp:
(JSRemoteInspectorSetParentProcessInformation): Add PLATFORM(COCOA) to the ifdef.
* JavaScriptCore.xcodeproj/project.pbxproj:
* PlatformMac.cmake:
* inspector/remote/RemoteConnectionToTarget.h: Add platform ifdefs for cocoa specific parts and change
sendMessageToTarget to receive a WTF String instead of an NSString.
* inspector/remote/RemoteControllableTarget.h: Add platform ifdefs for CF specific parts.
* inspector/remote/RemoteInspectionTarget.h:
* inspector/remote/RemoteInspector.cpp: Added.
(Inspector::RemoteInspector::startDisabled):
(Inspector::RemoteInspector::nextAvailableTargetIdentifier):
(Inspector::RemoteInspector::registerTarget):
(Inspector::RemoteInspector::unregisterTarget):
(Inspector::RemoteInspector::updateTarget):
(Inspector::RemoteInspector::updateClientCapabilities):
(Inspector::RemoteInspector::setRemoteInspectorClient):
(Inspector::RemoteInspector::setupFailed):
(Inspector::RemoteInspector::setupCompleted):
(Inspector::RemoteInspector::waitingForAutomaticInspection):
(Inspector::RemoteInspector::clientCapabilitiesDidChange):
(Inspector::RemoteInspector::stop):
(Inspector::RemoteInspector::listingForTarget):
(Inspector::RemoteInspector::updateHasActiveDebugSession):
* inspector/remote/RemoteInspector.h: Add platform ifdefs for cocoa specific parts. Also add TargetListing
typedef to define platform specific types for the listings without more ifdefs.
* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm: Renamed from Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.mm.
(Inspector::RemoteTargetInitializeGlobalQueue):
(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::close):
(Inspector::RemoteConnectionToTarget::sendMessageToTarget):
(Inspector::RemoteConnectionToTarget::setupRunLoop):
* inspector/remote/cocoa/RemoteInspectorCocoa.mm: Renamed from Source/JavaScriptCore/inspector/remote/RemoteInspector.mm.
(Inspector::canAccessWebInspectorMachPort):
(Inspector::RemoteInspector::singleton):
(Inspector::RemoteInspector::updateAutomaticInspectionCandidate):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::pushListingsSoon):
(Inspector::RemoteInspector::receivedIndicateMessage):
(Inspector::RemoteInspector::receivedProxyApplicationSetupMessage):
* inspector/remote/cocoa/RemoteInspectorXPCConnection.h: Renamed from Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h.
* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm: Renamed from Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm.
(Inspector::RemoteInspectorXPCConnection::closeFromMessage):

Source/WebKit2:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Add PLATFORM(COCOA) to the ifdef.

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

2 years agoUnreviewed test gardening.
ryanhaddad@apple.com [Sat, 11 Feb 2017 01:12:07 +0000 (01:12 +0000)]
Unreviewed test gardening.

* TestExpectations:

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

2 years agoInfinite UI process hang under ensurePositionInformationIsUpToDate
timothy_horton@apple.com [Sat, 11 Feb 2017 01:09:55 +0000 (01:09 +0000)]
Infinite UI process hang under ensurePositionInformationIsUpToDate
https://bugs.webkit.org/show_bug.cgi?id=168154
<rdar://problem/30428673>

Reviewed by Simon Fraser.

Source/WebKit2:

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
If the web process crashes or we're being torn down for another reason,
assume that we aren't ever going to receive any pending async interaction
information update. Otherwise, ensurePositionInformationIsUpToDate can end
up waiting for it forever.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/InteractionDeadlockAfterCrash.mm: Added.
(recursiveFindHighlightLongPressRecognizer):
(TEST):
Add a somewhat nasty test that does an async interaction information update, but
kills the Web process before it arrives, and then does a sync interaction
information update, which will wait for the oustanding async interaction
information update if we still think it's coming. Before the patch, this
test times out with the UI process stuck under ensurePositionInformationIsUpToDate.

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

2 years agoWeb Inspector: ContentViewContainer can have redundant back-forward entries after...
mattbaker@apple.com [Sat, 11 Feb 2017 00:44:42 +0000 (00:44 +0000)]
Web Inspector: ContentViewContainer can have redundant back-forward entries after ContentView close
https://bugs.webkit.org/show_bug.cgi?id=168105

Reviewed by Joseph Pecoraro.

* UserInterface/Models/BackForwardEntry.js:
(WebInspector.BackForwardEntry.prototype.isEqual):
Make check for equal ContentView/cookie reusable.

* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView):
Use BackForwardEntry.prototype.isEqual.
(WebInspector.ContentViewContainer.prototype.replaceContentView):
(WebInspector.ContentViewContainer.prototype.closeContentView):
Clean-up the BackForwardEntry list after changes that can cause
identical entries to become adjacent.

(WebInspector.ContentViewContainer.prototype._removeIdenticalAdjacentBackForwardEntries):
Remove consecutive entries with the same ContentView and cookie.
(WebInspector.ContentViewContainer):
(WebInspector.ContentViewContainer.closeAllContentViewsOfPrototype): Deleted.
Drive-by cleanup: removed dead code.

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

2 years agoUnreviewed, rolling out r212139.
commit-queue@webkit.org [Sat, 11 Feb 2017 00:19:06 +0000 (00:19 +0000)]
Unreviewed, rolling out r212139.
https://bugs.webkit.org/show_bug.cgi?id=168152

Caused some assertions (Requested by JoePeck on #webkit).

Reverted changeset:

"Fix misleading comment in RunLoop.h"
https://bugs.webkit.org/show_bug.cgi?id=167832
http://trac.webkit.org/changeset/212139

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

2 years agoFix the !ENABLE(WEBGL) build
ossy@webkit.org [Sat, 11 Feb 2017 00:12:41 +0000 (00:12 +0000)]
Fix the !ENABLE(WEBGL) build
https://bugs.webkit.org/show_bug.cgi?id=168112

Reviewed by Alex Christensen.

* html/canvas/WebGLRenderingContextBase.h:

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

2 years agoAdd mediaStreamEnabled property to WKPreferences for Cocoa.
commit-queue@webkit.org [Fri, 10 Feb 2017 23:55:14 +0000 (23:55 +0000)]
Add mediaStreamEnabled property to WKPreferences for Cocoa.
https://bugs.webkit.org/show_bug.cgi?id=168080

Patch by Andrew Gold <agold@apple.com> on 2017-02-10
Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Sets the pageConfiguration's mediaStreamEnabled preference value.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]): Copies the mediaStreamEnabled property.
(-[WKWebViewConfiguration _mediaStreamEnabled]): Gets the mediaStreamEnabled property.
(-[WKWebViewConfiguration _setMediaStreamEnabled:]): Sets the mediaStreamEnabled property.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

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

2 years ago[Fetch API] fetch fails when undefined is passed as headers
commit-queue@webkit.org [Fri, 10 Feb 2017 23:53:31 +0000 (23:53 +0000)]
[Fetch API] fetch fails when undefined is passed as headers
https://bugs.webkit.org/show_bug.cgi?id=168043

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

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/request/request-headers-expected.txt:
* web-platform-tests/fetch/api/request/request-headers.html:

Source/WebCore:

Covered by updated test.

* Modules/fetch/FetchInternals.js:
(fillFetchHeaders): Exit early in case of undefined headers, since it is an optional parameter.

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

2 years agoFix the !ENABLE(WEB_TIMING) build
ossy@webkit.org [Fri, 10 Feb 2017 23:51:47 +0000 (23:51 +0000)]
Fix the !ENABLE(WEB_TIMING) build
https://bugs.webkit.org/show_bug.cgi?id=168113

Reviewed by Alex Christensen.

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):

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

2 years agoWebProcess: remove unused m_inDidClose
commit-queue@webkit.org [Fri, 10 Feb 2017 23:49:26 +0000 (23:49 +0000)]
WebProcess: remove unused m_inDidClose
https://bugs.webkit.org/show_bug.cgi?id=168121

Patch by Olivier Blin <olivier.blin@softathome.com> on 2017-02-10
Reviewed by Alex Christensen.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):
* WebProcess/WebProcess.h:
m_inDidClose has been unused since r83774

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

2 years agoUpdate features.json for Performance Timing APIs
commit-queue@webkit.org [Fri, 10 Feb 2017 23:47:41 +0000 (23:47 +0000)]
Update features.json for Performance Timing APIs
https://bugs.webkit.org/show_bug.cgi?id=168148

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-10
Reviewed by Simon Fraser.

* features.json:

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

2 years ago[Cocoa] Web Inspector: payload initializers for ObjC protocol types handles special...
bburg@apple.com [Fri, 10 Feb 2017 23:47:02 +0000 (23:47 +0000)]
[Cocoa] Web Inspector: payload initializers for ObjC protocol types handles special-cased property names incorrectly
https://bugs.webkit.org/show_bug.cgi?id=168141

Reviewed by Joseph Pecoraro.

The generated code erroneously uses the ObjC variable name as the payload key,
rather than the raw type member name. For example, 'identifier' would be used instead of 'id'.

* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload):

* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
Rebaseline an affected test.

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

2 years agoTry to fix the iOS and Windows builds.
andersca@apple.com [Fri, 10 Feb 2017 23:41:35 +0000 (23:41 +0000)]
Try to fix the iOS and Windows builds.

* platform/ios/DragImageIOS.mm:
(WebCore::deleteDragImage):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::setDragImage):

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

2 years agoAdd basic debugging macros for CMake
bburg@apple.com [Fri, 10 Feb 2017 23:14:39 +0000 (23:14 +0000)]
Add basic debugging macros for CMake
https://bugs.webkit.org/show_bug.cgi?id=161538

Reviewed by Michael Catanzaro.

It's useful to be able to dump the state of everything when debugging
CMake build problems, especially when they happen on EWS (but not locally).

Start with macros for:
    - dumping out all CMake variables
    - dumping all executed commands (by turning off pretty-printing)

* Source/cmake/WebKitMacros.cmake:

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

2 years agoAdd a DragImage class that wraps a DragImageRef
andersca@apple.com [Fri, 10 Feb 2017 23:09:45 +0000 (23:09 +0000)]
Add a DragImage class that wraps a DragImageRef
https://bugs.webkit.org/show_bug.cgi?id=168131

Reviewed by Beth Dakin.

This allows us to get rid of the explicit deleteDragImage calls and will make additional cleanup of the
various drag code paths possible. No functionality change.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::updateDragImage):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):
* page/DragController.h:
* platform/DragImage.cpp:
(WebCore::DragImage::DragImage):
(WebCore::DragImage::operator=):
(WebCore::DragImage::~DragImage):
* platform/DragImage.h:
* platform/Pasteboard.h:
* platform/StaticPasteboard.h:
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage):

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

2 years agoMake sure the "inwindow" flag propagates to TiledBackings for masks and reflections
simon.fraser@apple.com [Fri, 10 Feb 2017 23:02:36 +0000 (23:02 +0000)]
Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections
https://bugs.webkit.org/show_bug.cgi?id=168127
rdar://problem/30467120

Reviewed by Tim Horton.
Source/WebCore:

Replace the special-case, but wrong, GraphicsLayer traversal in setIsInWindowIncludingDescendants()
which forgot to hit masks and replica layers with a generic traverse() function, which
is then used for setting 'inWindow' as well as resetting tracked repaints.

Tests: compositing/tiling/tiled-mask-inwindow.html
       compositing/tiling/tiled-reflection-inwindow.html

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setIsInWindow):
(WebCore::GraphicsLayer::setReplicatedByLayer):
(WebCore::GraphicsLayer::traverse):
(WebCore::GraphicsLayer::setIsInWindowIncludingDescendants): Deleted.
* platform/graphics/GraphicsLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::resetTrackedRepaintRects):
(WebCore::resetTrackedRepaintRectsRecursive): Deleted.

Tools:

Reparent the web view before we try to fetch it via:
    [[[window contentView] subviews] objectAtIndex:0];
which would throw an exception if the test unparented it.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
(runTest):

LayoutTests:

* compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
* compositing/tiling/tiled-mask-inwindow.html: Added.
* compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
* compositing/tiling/tiled-reflection-inwindow.html: Added.
* platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
* platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
* platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
* platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.

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

2 years agoTiled layers are sometimes left with some tiles when outside the viewport
simon.fraser@apple.com [Fri, 10 Feb 2017 22:40:18 +0000 (22:40 +0000)]
Tiled layers are sometimes left with some tiles when outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=168104
Source/WebCore:

rdar://problem/30459055

Reviewed by Tim Horton.

When the coverage rect of a TiledBacking goes from a non-empty rect to an empty rect, we
shouldn't just early return from TileGrid::revalidateTiles(), otherwise we are left with some
tiles. Run through the function as normal, which will remove all the tiles for an empty coverage rect.

Minor logging changes.

Test: tiled-drawing/tile-coverage-iframe-to-zero-coverage.html

* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::revalidateTiles):

LayoutTests:

Reviewed by Tim Horton.

* tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt: Added.
* tiled-drawing/tile-coverage-iframe-to-zero-coverage.html: Added.

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

2 years agoMail hangs when removing multiple rows from large table.
zalan@apple.com [Fri, 10 Feb 2017 22:36:12 +0000 (22:36 +0000)]
Mail hangs when removing multiple rows from large table.
https://bugs.webkit.org/show_bug.cgi?id=168103
<rdar://problem/30090186>

Reviewed by Ryosuke Niwa.

PerformanceTests:

* DOM/large-table-edit.html: Added.

Source/WebCore:

DeleteSelectionCommand::removeNode doesn't actually destroy table structure items,
but instead it removes their content. In order to be able to continue editing the table after
the delete, we need to ensure that its cells' width and height are > 0. Currently we issue layout on
each table item recursively.
This patch delays the layout until after we've finished with the entire subtree delete (10x progression).

Performance test added.

* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::insertBlockPlaceholderForTableCellIfNeeded):
(WebCore::DeleteSelectionCommand::removeNodeUpdatingStates):
(WebCore::shouldRemoveContentOnly):
(WebCore::DeleteSelectionCommand::removeNode):
* editing/DeleteSelectionCommand.h:

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

2 years ago[Resource Timing] Enable Resource Timing by default in Tests
joepeck@webkit.org [Fri, 10 Feb 2017 22:28:56 +0000 (22:28 +0000)]
[Resource Timing] Enable Resource Timing by default in Tests
https://bugs.webkit.org/show_bug.cgi?id=168145

Reviewed by Ryosuke Niwa.

Source/WebCore:

* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setResourceTimingEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
No longer needed for tests.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences resourceTimingEnabled]):
(-[WebPreferences setResourceTimingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setResourceTimingEnabled):
(WebPreferences::resourceTimingEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetResourceTimingEnabled):
(WKPreferencesGetResourceTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* fast/dom/Window/window-properties-performance-resource-timing.html:
* http/tests/misc/resource-timing-resolution.html:
* http/tests/performance/performance-resource-timing-cached-entries-expected.txt:
* http/tests/performance/performance-resource-timing-cached-entries.html:
* http/tests/performance/performance-resource-timing-entries-iterable.html:
* http/tests/performance/performance-resource-timing-entries.html:
* http/tests/performance/performance-resource-timing-initiator-css.html:
* http/tests/performance/performance-resource-timing-initiator-no-override.html:
* http/tests/performance/performance-resource-timing-xhr-single-entry.html:
* http/tests/preload/dynamic_remove_preload_href-expected.txt:
* http/tests/preload/dynamic_remove_preload_href.html:
* http/tests/preload/dynamic_removing_preload.html:
* http/tests/preload/not_evicting_preload_at_onload.html:
* http/tests/preload/single_download_preload-expected.txt:
* http/tests/preload/single_download_preload.html:
* resources/testharnessreport.js:
Eliminate the internals setResourceTimingEnabled way to toggle a runtime feature.

* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
Update results when ResourceTiming is enabled.

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

2 years ago[Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
mitz@apple.com [Fri, 10 Feb 2017 22:16:19 +0000 (22:16 +0000)]
[Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
https://bugs.webkit.org/show_bug.cgi?id=168097

Reviewed by Tim Horton.

Source/WebCore:

Added a userTriggered argument to FrameSelection::setSelectedRange so that WebKit2 can
indicate that changes should be agreed to by the delegate.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectedRange): If the change is user-triggered, check with
  shouldChangeSelection.
* editing/FrameSelection.h:

Source/WebKit2:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
  Declared new delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Dispatch new delegate
  method.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Pass UserTriggered whan calling
  WebCore::Frame::Selection::setSelectedRange, so that the delegate is consulted.
(WebKit::WebPage::changeBlockSelection): Ditto.
(WebKit::WebPage::updateSelectionWithTouches): Ditto.
(WebKit::WebPage::selectWithTwoTouches): Ditto.
(WebKit::WebPage::extendSelection): Ditto.
(WebKit::WebPage::selectWordBackward): Ditto,
(WebKit::WebPage::moveSelectionByOffset): Ditto.
(WebKit::WebPage::selectPositionAtPoint): Ditto.
(WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
(WebKit::WebPage::moveSelectionAtBoundaryWithDirection): Ditto.
(WebKit::WebPage::selectTextWithGranularityAtPoint): Ditto.
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): Ditto.
(WebKit::WebPage::updateSelectionWithExtentPoint): Ditto.

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

2 years agoRemoving LayoutTestRelay
jbedard@apple.com [Fri, 10 Feb 2017 21:58:23 +0000 (21:58 +0000)]
Removing LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=165927

Reviewed by Daniel Bates.
Part 2

LayoutTestRelay uses SPI, since recent versions of the iOS SDK allow for installing apps on
simulators through simctl (iOS 10 and later), use this functionality instead.

Source/WebCore:

* platform/RuntimeApplicationChecks.mm:
(WebCore::IOSApplication::isDumpRenderTree): Update comment to reflect removal of LayoutTestRelay.

Tools:

* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct): Remove archiving of LayoutTestRelay as it is no longer being built.
Added a FIXME that we will need to implement similar archiving machinery once we build
ImageDiff for Mac when building WebKit for iOS. Currently ImageDiff is built with the iOS SDK.
* BuildSlaveSupport/kill-old-processes:
(main): Remove LayoutTestRelay from list of processes.
* LayoutTestRelay: Removed LayoutTestRelay.
* Makefile:
* Scripts/build-layouttestrelay: Removed.
* Scripts/build-webkit: Removed LayoutTestRelay references.

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

2 years agoUpdate LayoutTests/resources/testharness.js
cdumez@apple.com [Fri, 10 Feb 2017 21:51:44 +0000 (21:51 +0000)]
Update LayoutTests/resources/testharness.js
https://bugs.webkit.org/show_bug.cgi?id=168100

Reviewed by Youenn Fablet.

Update LayoutTests/resources/testharness.js to match the web-platform-tests
one landed in r211930.

* media/track/w3c/interfaces/HTMLTrackElement/srclang-expected.txt:
* media/track/w3c/interfaces/TextTrack/language-expected.txt:
* resources/testharness.js:
(SharedWorkerTestEnvironment):
(ServiceWorkerTestEnvironment):
(create_test_environment):
(promise_test):
(EventWatcher):
(is_node):
(format_value):
* streams/shadowing-Promise-expected.txt:
* streams/shadowing-Promise.html:
* streams/streams-public-array-api-expected.txt: Added.
* streams/streams-public-array-api.html: Added.

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

2 years agoStructureStubInfo::considerCaching() should write barrier its owner CodeBlock when...
mark.lam@apple.com [Fri, 10 Feb 2017 21:34:27 +0000 (21:34 +0000)]
StructureStubInfo::considerCaching() should write barrier its owner CodeBlock when buffering a new Structure.
https://bugs.webkit.org/show_bug.cgi?id=168137
<rdar://problem/28656664>

Reviewed by Filip Pizlo.

If we're adding a new structure to StructureStubInfo's bufferedStructures, we
should write barrier the StubInfo's owner CodeBlock because that structure may be
collected during the next GC.  Write barrier-ing the owner CodeBlock ensures that
CodeBlock::finalizeBaselineJITInlineCaches() is called on it during the GC,
which, in turn, gives the StructureStubInfo the opportunity to filter out the
dead structure.

* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
* jit/JITOperations.cpp:

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

2 years agoFix iOS libwebrtc build after r212127
achristensen@apple.com [Fri, 10 Feb 2017 21:31:28 +0000 (21:31 +0000)]
Fix iOS libwebrtc build after r212127
https://bugs.webkit.org/show_bug.cgi?id=168134

* Configurations/libwebrtc.xcconfig:
* libwebrtc.xcodeproj/project.pbxproj:
I got a little carried away removing ObjC sources.
We still need RTCLogging.mm and RTCUIApplication.mm on iOS.
Also sorted the project file.

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

2 years ago[WebRTC] Implement Outgoing libwebrtc audio source support
commit-queue@webkit.org [Fri, 10 Feb 2017 21:29:32 +0000 (21:29 +0000)]
[WebRTC] Implement Outgoing libwebrtc audio source support
https://bugs.webkit.org/show_bug.cgi?id=168118

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

No new automated tests as we need the audio rendering to work to test the whole loop.

Using an AudioSampleDataSource to convert the captured data to libwebrtc expected format.
Capturing and pushing data happens in the capture thread.
Pulling of converted data happens in libwebrtc thread.

Introducing LibWebRTCAudioFormat.h to centralize libwbebrtc expected audio format.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/WebAudioBufferList.cpp:
(WebCore::WebAudioBufferList::WebAudioBufferList): Missing initialization leads to assertion failure.
* platform/audio/mac/AudioSampleBufferList.cpp:
(WebCore::AudioSampleBufferList::copyFrom): In case of interleaved channels, there is one buffer but two channels.
* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullAvalaibleSamplesAsChunks):
* platform/audio/mac/AudioSampleDataSource.h:
* platform/mediastream/libwebrtc/LibWebRTCAudioFormat.h: Added.
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::libwebrtcAudioFormat):
(WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::sourceMutedChanged):
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
(WebCore::RealtimeOutgoingAudioSource::pullAudioData):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

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

2 years agocleanup WebLocalizableStrings.
aakash_jain@apple.com [Fri, 10 Feb 2017 21:24:43 +0000 (21:24 +0000)]
cleanup WebLocalizableStrings.
https://bugs.webkit.org/show_bug.cgi?id=168078

Reviewed by Alexey Proskuryakov.

* Misc/WebLocalizableStrings.h: Make visibility hidden for WebLocalizableStringsBundle
as it's for each framework's own consumption, and never needs to be exported.

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

2 years agoREGRESSION (r211829): Web Inspector: Elements tab is blank when added after page...
mattbaker@apple.com [Fri, 10 Feb 2017 21:17:37 +0000 (21:17 +0000)]
REGRESSION (r211829): Web Inspector: Elements tab is blank when added after page load
https://bugs.webkit.org/show_bug.cgi?id=168142

Reviewed by Brian Burg.

The Elements tab can be shown in two ways: by adding the Elements tab
from the "New Tab" tab, or via Inspect Element. In both cases we should
be checking that the ContentView exists, and create it if needed.

* UserInterface/Views/ElementsTabContentView.js:
(WebInspector.ElementsTabContentView.prototype.showRepresentedObject):
(WebInspector.ElementsTabContentView.prototype.shown):

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

2 years agoSkip some very slow WebCryptoAPI tests.
ryanhaddad@apple.com [Fri, 10 Feb 2017 21:15:57 +0000 (21:15 +0000)]
Skip some very slow WebCryptoAPI tests.

Unreviewed test gardening.

* TestExpectations:

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

2 years agoHTMLConstructionSiteTask::Insert should never be called on a node with a parent
rniwa@webkit.org [Fri, 10 Feb 2017 21:15:51 +0000 (21:15 +0000)]
HTMLConstructionSiteTask::Insert should never be called on a node with a parent
https://bugs.webkit.org/show_bug.cgi?id=168099

Reviewed by Sam Weinig.

insertAlreadyParsedChild always use HTMLConstructionSiteTask::InsertAlreadyParsedChild instead
of using HTMLConstructionSiteTask::Insert when fostering a child.

Also combine the step to take all children and re-parenting into a single task instead of
separately issuing TakeAllChildren and Reparent tasks.

No new tests since this is a refactoring.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::insert): Now asserts that the child node never have a parent.
(WebCore::executeInsertAlreadyParsedChildTask): Moved the code to remove the parent here.
(WebCore::executeTakeAllChildrenAndReparentTask): Renamed from executeTakeAllChildrenTask
now that this function also does the reparenting.
(WebCore::executeTask):
(WebCore::HTMLConstructionSite::reparent): Removed the variant only used with takeAllChildren.
(WebCore::HTMLConstructionSite::insertAlreadyParsedChild): Always use InsertAlreadyParsedChild
instead of calling fosterParent which uses Insert when fostering parents.
(WebCore::HTMLConstructionSite::takeAllChildrenAndReparent): Renamed from takeAllChildren.
* html/parser/HTMLConstructionSite.h:
(WebCore::HTMLConstructionSiteTask:Operation):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):

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

2 years agoFix misleading comment in RunLoop.h
commit-queue@webkit.org [Fri, 10 Feb 2017 21:08:32 +0000 (21:08 +0000)]
Fix misleading comment in RunLoop.h
https://bugs.webkit.org/show_bug.cgi?id=167832

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

* wtf/RunLoop.h:
Mac initialization used to force using CFRunLoopGetMain(). Now however it just
uses RunLoop::current which uses CFRunLoopGetCurrent(). So this comment that
it can be done on any thread is misleading and can lead to incorrect behavior
if it is actually done on a non-main thread on Mac.

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

2 years ago[WebCrypto] Remove imported/w3c/WebCryptoAPI tests
jiewen_tan@apple.com [Fri, 10 Feb 2017 20:59:40 +0000 (20:59 +0000)]
[WebCrypto] Remove imported/w3c/WebCryptoAPI tests
https://bugs.webkit.org/show_bug.cgi?id=168064

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* WebCryptoAPI/OWNERS: Removed.
* WebCryptoAPI/README.md: Removed.
* WebCryptoAPI/WebCryptoAPI.idl: Removed.
* WebCryptoAPI/digest/digest.js: Removed.
* WebCryptoAPI/digest/digest.worker.js: Removed.
* WebCryptoAPI/digest/test_digest-expected.txt: Removed.
* WebCryptoAPI/digest/test_digest.html: Removed.
* WebCryptoAPI/digest/w3c-import.log: Removed.
* WebCryptoAPI/encrypt_decrypt/aes.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_cbc_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_ctr_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/rsa.js: Removed.
* WebCryptoAPI/encrypt_decrypt/rsa.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/rsa_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html: Removed.
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html: Removed.
* WebCryptoAPI/encrypt_decrypt/w3c-import.log: Removed.
* WebCryptoAPI/generateKey/failures.js: Removed.
* WebCryptoAPI/generateKey/failures.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-CTR.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-GCM.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-KW.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_ECDH.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_ECDSA.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_HMAC.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js: Removed.
* WebCryptoAPI/generateKey/successes.js: Removed.
* WebCryptoAPI/generateKey/successes.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-CBC.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-CTR.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-GCM.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-KW.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_ECDH.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_ECDSA.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_HMAC.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js: Removed.
* WebCryptoAPI/generateKey/test_aes-cbc-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_aes-cbc.html: Removed.
* WebCryptoAPI/generateKey/test_aes-ctr-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_aes-ctr.html: Removed.
* WebCryptoAPI/generateKey/test_failures-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CBC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CBC.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CTR.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-GCM-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-GCM.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-KW-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-KW.html: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDH.html: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDSA.html: Removed.
* WebCryptoAPI/generateKey/test_failures_HMAC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_HMAC.html: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-OAEP-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-OAEP.html: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-PSS-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-PSS.html: Removed.
* WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5.html: Removed.
* WebCryptoAPI/generateKey/test_successes-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CBC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CBC.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CTR.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-GCM.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-KW-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-KW.html: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDH.html: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDSA.html: Removed.
* WebCryptoAPI/generateKey/test_successes_HMAC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_HMAC.html: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-OAEP-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-PSS-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-PSS.html: Removed.
* WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html: Removed.
* WebCryptoAPI/generateKey/w3c-import.log: Removed.
* WebCryptoAPI/getRandomValues.js: Removed.
* WebCryptoAPI/getRandomValues.worker.js: Removed.
* WebCryptoAPI/idlharness-expected.txt: Removed.
* WebCryptoAPI/idlharness.html: Removed.
* WebCryptoAPI/idlharness.worker.js: Removed.
* WebCryptoAPI/test_getRandomValues-expected.txt: Removed.
* WebCryptoAPI/test_getRandomValues.html: Removed.
* WebCryptoAPI/tools/generate.py: Removed.
* WebCryptoAPI/tools/w3c-import.log: Removed.
* WebCryptoAPI/util/helpers.js: Removed.
* WebCryptoAPI/util/w3c-import.log: Removed.
* WebCryptoAPI/w3c-import.log: Removed.

LayoutTests:

* TestExpectations:
Remove test expectations of imported/w3c/WebCryptoAPI tests.

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

2 years agoRemove platform expectations without tests
commit-queue@webkit.org [Fri, 10 Feb 2017 20:51:00 +0000 (20:51 +0000)]
Remove platform expectations without tests
https://bugs.webkit.org/show_bug.cgi?id=168139

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

* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_performance_attributes_exist_in_object-expected.txt: Removed.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_xserver_redirect-expected.txt: Removed.

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

2 years agofast/forms/formsubmission-appendFormData-crash.html times out on WebKit1
cdumez@apple.com [Fri, 10 Feb 2017 20:45:00 +0000 (20:45 +0000)]
fast/forms/formsubmission-appendFormData-crash.html times out on WebKit1
https://bugs.webkit.org/show_bug.cgi?id=168133

Reviewed by Brent Fulgham.

Call testRunner.notifyDone() synchronously instead of doing it in a
setTimeout(). The test no longer times out on WK1 and still reproduces
the original bug.

* fast/forms/formsubmission-appendFormData-crash.html:

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

2 years ago[WebCrypto] Add WebCryptoAPI to watchlist
jiewen_tan@apple.com [Fri, 10 Feb 2017 20:39:54 +0000 (20:39 +0000)]
[WebCrypto] Add WebCryptoAPI to watchlist
https://bugs.webkit.org/show_bug.cgi?id=168138

Reviewed by Youenn Fablet.

* Scripts/webkitpy/common/config/watchlist:

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

2 years agoReplace all WebKit Library Version checks in WK2 with SDK version checks.
beidson@apple.com [Fri, 10 Feb 2017 20:38:35 +0000 (20:38 +0000)]
Replace all WebKit Library Version checks in WK2 with SDK version checks.
https://bugs.webkit.org/show_bug.cgi?id=168124

Reviewed by Geoffrey Garen.

Source/WebKit2:

This change gets rid of WebKit Library Version checks and replaces them with SDK version checks.

To allow our tools to still be able to test new behaviors even when built against older SDKs,
it also opts them into an SPI default to have "linkedOnOrAfter()" always return true.

* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):

* UIProcess/Cocoa/VersionChecks.h:
(WebKit::linkedOnOrAfter): Deleted.
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::isNetworkCacheEnabled):

Tools:

For each of our tools that use WebKit2, opt them in to the new linkedOnOrAfter(Everything) setting.

* MiniBrowser/mac/main.m:
(main):
* MobileMiniBrowser/MobileMiniBrowser/main.m:
(main):
* TestWebKitAPI/ios/mainIOS.mm:
(main):
* TestWebKitAPI/mac/mainMac.mm:
(main):
* WebKitTestRunner/ios/mainIOS.mm:
(main):
* WebKitTestRunner/mac/main.mm:
(setDefaultsToConsistentValuesForTesting):

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

2 years agoLayoutTest workers/sab/postMessage-clones.html is a flaky failure
fpizlo@apple.com [Fri, 10 Feb 2017 20:34:15 +0000 (20:34 +0000)]
LayoutTest workers/sab/postMessage-clones.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168129

Unreviewed, make this test more deterministic.

* workers/sab/postMessage-clones.html:

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

2 years ago[CSS Parser] Make intercap property values serialize correctly
hyatt@apple.com [Fri, 10 Feb 2017 20:26:30 +0000 (20:26 +0000)]
[CSS Parser] Make intercap property values serialize correctly
https://bugs.webkit.org/show_bug.cgi?id=168073

Reviewed by Zalan Bujtas.

Source/WebCore:

Fix CSS value keywords to preserve case when the value contains capital
letters. Examples include optimizeSpeed, translateX, scaleY, etc.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
* css/MediaQueryEvaluator.cpp:
(WebCore::colorGamutEvaluate):
* css/SVGCSSValueKeywords.in:
* css/TransformFunctions.cpp:
(WebCore::transformOperationType):
(WebCore::transformsForValue):
* css/makevalues.pl:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::parseTransformTranslateArguments):
(WebCore::parseSimpleTransformValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTransformValue):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/image-rendering-parsing-expected.txt:
* fast/css/parsing-text-rendering-expected.txt:
* fast/css/resources/parsing-text-rendering.js:
* fast/css/script-tests/image-rendering-parsing.js:
* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/script-tests/shape-rendering-parsing.js:
* svg/css/shape-rendering-parsing-expected.txt:
* transforms/2d/transform-value-types-expected.txt:
* transforms/2d/transform-value-types.html:

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

2 years agoFix iOS libwebrtc build after r212127
achristensen@apple.com [Fri, 10 Feb 2017 19:52:57 +0000 (19:52 +0000)]
Fix iOS libwebrtc build after r212127
https://bugs.webkit.org/show_bug.cgi?id=168134

* libwebrtc.xcodeproj/project.pbxproj:
I got a little carried away removing -fobjc-arc.  These files need it.
It was originally added in r211902 and these files are in the
EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] list in libwebrtc.xcconfig
so adding this flag won't break the 32-bit El Capitan build.

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

2 years agoBeef up the ARES-6 explainer text
fpizlo@apple.com [Fri, 10 Feb 2017 19:49:55 +0000 (19:49 +0000)]
Beef up the ARES-6 explainer text
https://bugs.webkit.org/show_bug.cgi?id=167867

Reviewed by Saam Barati.

Added appropriate links.

Added text that explains the subscores.

* ARES-6/index.html:

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

2 years agoWebResourceLoadDelegatePrivate.h cannot be imported standalone
aakash_jain@apple.com [Fri, 10 Feb 2017 19:26:36 +0000 (19:26 +0000)]
WebResourceLoadDelegatePrivate.h cannot be imported standalone
https://bugs.webkit.org/show_bug.cgi?id=168096

Reviewed by Alexey Proskuryakov.

* WebView/WebResourceLoadDelegatePrivate.h: Change WebNSInteger to NSInteger.

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

2 years agoRemove unnecessary automatic reference counting in libwebrtc
achristensen@apple.com [Fri, 10 Feb 2017 19:16:59 +0000 (19:16 +0000)]
Remove unnecessary automatic reference counting in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=168134

Reviewed by Youenn Fablet.

* libwebrtc.xcodeproj/project.pbxproj:

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

2 years ago[WebRTC] Activate libwebrtc G711/G722 audio codecs
commit-queue@webkit.org [Fri, 10 Feb 2017 19:03:56 +0000 (19:03 +0000)]
[WebRTC] Activate libwebrtc G711/G722 audio codecs
https://bugs.webkit.org/show_bug.cgi?id=168123

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

Adding G711/G722 missing codec files.
Activating use of these in the build system.

* Configurations/libwebrtc.xcconfig:
* Source/webrtc/modules/audio_coding/codecs/g711/g711.c: Added.
(ulaw_to_alaw):
* Source/webrtc/modules/audio_coding/codecs/g711/g711.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_decode.c: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_encode.c: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_interface.c: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_interface.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/test/testG722.cc: Added.
* libwebrtc.xcodeproj/project.pbxproj:

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

2 years ago[WebCrypto] Import imported/w3c/web-platform-tests/WebCryptoAPI tests
jiewen_tan@apple.com [Fri, 10 Feb 2017 18:21:16 +0000 (18:21 +0000)]
[WebCrypto] Import imported/w3c/web-platform-tests/WebCryptoAPI tests
https://bugs.webkit.org/show_bug.cgi?id=165723

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/WebCryptoAPI/OWNERS: Added.
* web-platform-tests/WebCryptoAPI/README.md: Added.
* web-platform-tests/WebCryptoAPI/WebCryptoAPI.idl: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.js: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.worker.html: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.worker.js: Added.
* web-platform-tests/WebCryptoAPI/digest/test_digest-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/digest/test_digest.html: Added.
* web-platform-tests/WebCryptoAPI/digest/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-cbc-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-cbc.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-ctr-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-ctr.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CBC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CBC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CTR.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-GCM-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-GCM.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-KW-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-KW.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_HMAC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_HMAC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-OAEP-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-OAEP.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CBC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CBC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CTR.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-GCM.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-KW-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-KW.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_HMAC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_HMAC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-OAEP-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.js: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.worker.html: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.worker.js: Added.
* web-platform-tests/WebCryptoAPI/idlharness-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/idlharness.html: Added.
* web-platform-tests/WebCryptoAPI/idlharness.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/idlharness.worker.html: Added.
* web-platform-tests/WebCryptoAPI/idlharness.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_rsa_importKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_rsa_importKey.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_hmac-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_hmac.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pkcs-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pkcs.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pss-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pss.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/test_getRandomValues-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/test_getRandomValues.html: Added.
* web-platform-tests/WebCryptoAPI/tools/generate.py: Added.
* web-platform-tests/WebCryptoAPI/tools/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/util/helpers.js: Added.
* web-platform-tests/WebCryptoAPI/util/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey.html: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.js: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.js: Added.

LayoutTests:

* TestExpectations:
Skip superset/unsupported tests and mark slow tests as Slow.
* tests-options.json:

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

2 years agoMark compositing/masks/solid-color-masked.html as failing on ios-simulator.
ryanhaddad@apple.com [Fri, 10 Feb 2017 18:01:38 +0000 (18:01 +0000)]
Mark compositing/masks/solid-color-masked.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=168054

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

2 years agoAdd platform specific expected.txt file for fast/text/mark-matches-overflow-clip...
ryanhaddad@apple.com [Fri, 10 Feb 2017 17:44:36 +0000 (17:44 +0000)]
Add platform specific expected.txt  file for fast/text/mark-matches-overflow-clip.html after r212113.

Unreviewed test gardening.

* fast/text/mark-matches-overflow-clip-expected.txt:
* platform/gtk/fast/text/mark-matches-overflow-clip-expected.txt: Copied from LayoutTests/fast/text/mark-matches-overflow-clip-expected.txt.

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

2 years ago[Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the...
bburg@apple.com [Fri, 10 Feb 2017 17:29:36 +0000 (17:29 +0000)]
[Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
https://bugs.webkit.org/show_bug.cgi?id=168019
<rdar://problem/28718990>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

It's useful to have an symbolic value (not a string) for each of the supported platform values.
Generate this once per protocol for the Objective-C bindings. Covered by existing tests.

* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator.generate_output):
(ObjCHeaderGenerator._generate_enum_for_platforms):
Create an NS_ENUM for Platform values in Platforms.

* inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
(ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_for_platforms):
Add type conversion/parsing methods for the newly added enum.

* inspector/scripts/codegen/generator.py:
(Generator.stylized_name_for_enum_value):
(Generator.stylized_name_for_enum_value.replaceCallback):
Support arbitrary special-cased substrings in enums, not just all-caps. Add 'IOS' and 'MacOS'.

* inspector/scripts/codegen/models.py:
(Platforms):
Use lower-case string values for platform names, to avoid guesswork.

(Platforms.__metaclass__):
(Platforms.__metaclass__.__iter__):
Make it possible to iterate over Platform instances of Platforms.

* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
* inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
Rebaseline results.

Source/WebKit2:

* UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.

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

2 years agoWeb Automation: fail gracefully when a screenshot cannot be encoded as base64
bburg@apple.com [Fri, 10 Feb 2017 17:25:36 +0000 (17:25 +0000)]
Web Automation: fail gracefully when a screenshot cannot be encoded as base64
https://bugs.webkit.org/show_bug.cgi?id=168095
<rdar://problem/30297427>

Reviewed by Joseph Pecoraro.

Convert platformGetBase64EncodedPNGData to return a std::optional<String>.
Return nullopt if we can't create a screenshot or convert it to base64.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::didTakeScreenshot):
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):

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

2 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 16:50:57 +0000 (16:50 +0000)]
Fix El Capitan build.

* Scripts/build-webkit:
Don't build libwebrtc anywhere for now.

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

2 years agoUnreviewed GTK+ gardening. Rebaseline several fast/text/ tests.
carlosgc@webkit.org [Fri, 10 Feb 2017 14:32:59 +0000 (14:32 +0000)]
Unreviewed GTK+ gardening. Rebaseline several fast/text/ tests.

* fast/text/mark-matches-overflow-clip-expected.txt:
* platform/gtk/fast/text/crash-complex-text-surrogate-expected.txt:
* platform/gtk/fast/text/hyphenate-first-word-expected.png:
* platform/gtk/fast/text/hyphenate-first-word-expected.txt:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.png:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
* platform/gtk/fast/text/hyphens-expected.png:
* platform/gtk/fast/text/hyphens-expected.txt:
* platform/gtk/fast/text/international/text-combine-image-test-expected.png:
* platform/gtk/fast/text/international/text-combine-image-test-expected.txt:
* platform/gtk/fast/text/international/thai-line-breaks-expected.png:
* platform/gtk/fast/text/international/thai-line-breaks-expected.txt:
* platform/gtk/fast/text/orientation-sideways-expected.png:
* platform/gtk/fast/text/orientation-sideways-expected.txt:
* platform/gtk/fast/text/whitespace/023-expected.txt:

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

2 years agoUnreviewed GTK+ gardening. Rebaseline fast/table/ tests.
carlosgc@webkit.org [Fri, 10 Feb 2017 13:57:16 +0000 (13:57 +0000)]
Unreviewed GTK+ gardening. Rebaseline fast/table/ tests.

* platform/gtk/fast/table/border-collapsing/004-vertical-expected.png:
* platform/gtk/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/gtk/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt:

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

2 years agoUnreviewed GTK+ gardening. Update expectations of CSS shapes duplicated tests.
carlosgc@webkit.org [Fri, 10 Feb 2017 10:51:20 +0000 (10:51 +0000)]
Unreviewed GTK+ gardening. Update expectations of CSS shapes duplicated tests.

* platform/gtk/TestExpectations:

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

2 years ago[EME] Implement MediaKeySession::load()
zandobersek@gmail.com [Fri, 10 Feb 2017 10:40:29 +0000 (10:40 +0000)]
[EME] Implement MediaKeySession::load()
https://bugs.webkit.org/show_bug.cgi?id=168041

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the MediaKeySession::load() method, tracing the steps as they
are defined in the EME specification. The only exception is step 8.3,
which requires additional facility that tracks currently open sessions
and provides information whether for a given session ID there's already
a MediaKeySession that's not yet been closed.

Session ID sanitization is done through the CDM::sanitizeSessionId()
method, which relays the task to the CDMPrivate implementation.

The CDMInstance::loadSession() virtual method is called with the session
type, sanitized ID, the Document's origin (in string form) and the
callback that's invoked upon completion of the task. The callback
checks whether the operation was successful, or examines the reason for
the load failure in case it wasn't, rejecting the promise in the latter
case either immediately or in the following task at the latest.

When the load was successful, the optional known keys, expiration time
and message are handled appropriately, and the promise is resolved.

MockCDM::sanitizeSessionId() implementation only treats
'valid-loaded-session' as a valid session ID.
MockCDMInstance::loadSession() implementation is kept slim for now, only
providing the 'license-renewal' message when invoking the passed-in
callback. Known keys and expiration time will also be tested once the
relevant MediaKeySession algorithms are implemented.

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

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::sanitizeSessionId):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::load):
* testing/MockCDMFactory.cpp:
(WebCore::MockCDM::sanitizeSessionId):
(WebCore::MockCDMInstance::loadSession):
* testing/MockCDMFactory.h:

LayoutTests:

Add the mock-MediaKeySession-load.html test, testing the basic behavior
of the MediaKeySession::load() implementation. Invalid session IDs and
session types are tested to ensure the returned promise is rejected.
A simplistic test case also tests that for a valid session ID and
session type, the basic MockCDM implementation correctly 'loads' the
specified session and provides the 'license-renewal' message in return.
More tests should be added as the EME implementation advances and the
MockCDM implementations improve to cover additional cases.

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

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

2 years ago[EME] Implement MediaKeySession::sessionClosed()
zandobersek@gmail.com [Fri, 10 Feb 2017 10:31:57 +0000 (10:31 +0000)]
[EME] Implement MediaKeySession::sessionClosed()
https://bugs.webkit.org/show_bug.cgi?id=168039

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the 'session closed' algorithm for MediaKeySession by
following the specified steps. After this algorithm is run, the
session should be considered closed, which we track via the m_closed
member variable on the class. This is set to true before the promise
that's accessible through the 'closed' attribute is resolved.

Because the algorithm requires the CDM instance to store any record
of key usage when the session's type is 'persistent-usage-record', the
storeRecordOfKeyUsage() virtual method is added to the CDMInstance
interface. MockCDMInstance implementation is left unimplemented for now.

JSMediaKeySession::closed() accessor now has a custom implementation
that creates a deferred promise for that object if there's none yet, and
shares it with the wrapped class through the registerClosedPromise()
method, storing a reference to the promise in the m_closedPromise
member variable, or resolving the promise immediately if the session was
already closed.

Test cases added to media/encrypted-media/mock-MediaKeySession-close.html.

* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::registerClosedPromise):
(WebCore::MediaKeySession::sessionClosed):
* Modules/encryptedmedia/MediaKeySession.h:
* bindings/js/JSMediaKeySessionCustom.cpp:
(WebCore::JSMediaKeySession::closed):
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstance::storeRecordOfKeyUsage):
* testing/MockCDMFactory.h:

LayoutTests:

Enhance the mock-MediaKeySession-close.html test by adding test cases
covering the dispatch of the promise that's accessible through the
'closed' attribute and covering the session closure status, making
sure that various operations properly resolve or reject after the
session object was closed.

* media/encrypted-media/mock-MediaKeySession-close-expected.txt:
* media/encrypted-media/mock-MediaKeySession-close.html:

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

2 years agoMove two MiniBrowserBundle settings out of the .pbxproj
aestes@apple.com [Fri, 10 Feb 2017 10:28:59 +0000 (10:28 +0000)]
Move two MiniBrowserBundle settings out of the .pbxproj
https://bugs.webkit.org/show_bug.cgi?id=168106

Reviewed by Tim Horton.

INFOPLIST_FILE was specified in MiniBrowserBundle.xcconfig but overridden to "" in
the project file. This removes the project file override.

WRAPPER_EXTENSION was moved from the project file to MiniBrowserBundle.xcconfig.

* MiniBrowser/Configurations/MiniBrowserBundle.xcconfig:
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:

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

2 years ago[EME] Implement MediaKeySession::updateKeyStatuses(), MediaKeyStatusMap
zandobersek@gmail.com [Fri, 10 Feb 2017 10:22:50 +0000 (10:22 +0000)]
[EME] Implement MediaKeySession::updateKeyStatuses(), MediaKeyStatusMap
https://bugs.webkit.org/show_bug.cgi?id=167888

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement MediaKeySession::updateKeyStatuses(), transforming the passed-in
KeyStatusVector into a Vector mapping the key IDs to MediaKeyStatus values.
A keystatuseschange event is fired on the MediaKeySession object afterwards.
The queueing of the task that runs the 'attemp to resume playback' on the
related HTMLMediaElement objects isn't done yet since that algorithm isn't
implemented yet.

The statuses Vector is stored on the MediaKeySession object. That Vector is
then exposed through the MediaKeyStatusMap object, each such object being
unique to one MediaKeySession object. The implementation of MediaKeyStatusMap
thus keeps a reference to the session object as long as that object is alive,
and queries the MediaKeySession::statuses() getter to access the Vector that
contains status information for all the key IDs.

MediaKeyStatusMap::Iterator object keeps a reference to the MediaKeyStatusMap
object and accesses the statuses by indexing into the status Vector of the
related MediaKeySession object.

CDMInstance::updateLicense() now accepts the session ID string as the first
argument, making it possible to specify which session should be updated.

MockCDMFactory::keysForSessionWithID() returns an optional reference to the
Vector value in the session map that lists all the key IDs that are being
stored for that session.

MockCDMInstance::updateLicense() now detects the 'keys-changed' entry in the
passed-in response data, and upon detecting that constructs a KeyStatusVector
object containing all the keys for that session. KeyStatus::Usable is returned
for each object at the moment, but this should be adjustable in the future
through additional parameters passed through the response data. The Vector
object is then passed to the callback and is then passed to the 'update key
statuses' algorithm in MediaKeySession.

Covered by a test case in media/encrypted-media/mock-MediaKeySession-update.html.

* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::updateKeyStatuses):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeyStatusMap.cpp:
(WebCore::MediaKeyStatusMap::MediaKeyStatusMap):
(WebCore::MediaKeyStatusMap::detachSession):
(WebCore::MediaKeyStatusMap::size):
(WebCore::keyIdsMatch):
(WebCore::MediaKeyStatusMap::has):
(WebCore::MediaKeyStatusMap::get):
(WebCore::MediaKeyStatusMap::Iterator::Iterator):
(WebCore::MediaKeyStatusMap::Iterator::next):
* Modules/encryptedmedia/MediaKeyStatusMap.h:
(WebCore::MediaKeyStatusMap::create):
* Modules/encryptedmedia/MediaKeyStatusMap.idl:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMFactory::keysForSessionWithID):
(WebCore::MockCDMInstance::updateLicense):
* testing/MockCDMFactory.h:

LayoutTests:

Add another test case to the mock-MediaKeySession-update.html test that
ensures the keystatuseschange event is fired on the MediaKeySession object
and that the status of the keys is properly reported through the
MediaKeyStatusMap object associated with this MediaKeySession.

* media/encrypted-media/mock-MediaKeySession-update-expected.txt:
* media/encrypted-media/mock-MediaKeySession-update.html:

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

2 years agoFix 32-and-64-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 09:17:12 +0000 (09:17 +0000)]
Fix 32-and-64-bit build on El Capitan.

* Scripts/build-webkit:
Somebody's building with something like this:
build-webkit ARCHS="i386 x86_64"
We want this to also not build libwebrtc for now.

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

2 years agoFix ASAN build.
achristensen@apple.com [Fri, 10 Feb 2017 09:04:32 +0000 (09:04 +0000)]
Fix ASAN build.

* Source/webrtc/base/sanitizer.h:
SANITIZER_UNUSED3 wasn't defined if we are using address_sanitizer but not memory_sanitizer.

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

2 years agoFix 32-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 08:41:56 +0000 (08:41 +0000)]
Fix 32-bit build on El Capitan.

* Scripts/build-webkit:
The bot uses ARCHS=i386 instead of --32-bit.
This is a hack, but it should fix the bot until I can do a better fix in the morning.

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

2 years agoUnreviewed. Fix GTK+ build with threaded compositor disabled.
carlosgc@webkit.org [Fri, 10 Feb 2017 08:26:45 +0000 (08:26 +0000)]
Unreviewed. Fix GTK+ build with threaded compositor disabled.

* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):

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

2 years agoFix 32-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 08:12:42 +0000 (08:12 +0000)]
Fix 32-bit build on El Capitan.

* Scripts/build-webkit:
Don't build i386 libwebrtc.

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

2 years agoUnreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line...
carlosgc@webkit.org [Fri, 10 Feb 2017 07:12:12 +0000 (07:12 +0000)]
Unreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line and hanging indent.

* platform/gtk/TestExpectations:

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

2 years agoImprove IOSurfacePool logging
simon.fraser@apple.com [Fri, 10 Feb 2017 05:26:08 +0000 (05:26 +0000)]
Improve IOSurfacePool logging
https://bugs.webkit.org/show_bug.cgi?id=168098

Reviewed by Tim Horton.

Pass a string to DUMP_POOL_STATISTICS so we can tell what's triggering the
logging.

* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::addSurface):
(WebCore::IOSurfacePool::evict):
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::showPoolStatistics):
* platform/graphics/cg/IOSurfacePool.h:

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

2 years agoUnreviewed, rolling out r212040.
achristensen@apple.com [Fri, 10 Feb 2017 05:08:59 +0000 (05:08 +0000)]
Unreviewed, rolling out r212040.

Broke build.  I'm not surprised

Reverted changeset:

"[WebRTC][Mac] Activate libwebrtc"
https://bugs.webkit.org/show_bug.cgi?id=167293
http://trac.webkit.org/changeset/212040

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

2 years ago[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames...
cdumez@apple.com [Fri, 10 Feb 2017 04:00:52 +0000 (04:00 +0000)]
[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
https://bugs.webkit.org/show_bug.cgi?id=168077
<rdar://problem/30412595>

Reviewed by Alex Christensen.

Source/WebCore:

Add utility function to MIMETypeRegistry that appends an extension to
a filename if necessary, based on a provided MIME type.

Tests: fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html
       http/tests/download/anchor-download-no-extension.html

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):
* platform/MIMETypeRegistry.h:
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):

Source/WebKit2:

Use MIME type to add file extension to downloads' suggested filenames when missing:
- https://html.spec.whatwg.org/#as-a-download (step 19)

This new behavior matches Chrome.

* NetworkProcess/Downloads/BlobDownloadClient.cpp:
(WebKit::BlobDownloadClient::didReceiveResponseAsync):
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveResponse):
(WebKit::Download::decideDestinationWithSuggestedFilename):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::findPendingDownloadLocation):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:

LayoutTests:

Rebaseline a couple of download tests where suggested filenames now have an extension
and extend test coverage.

* fast/dom/HTMLAnchorElement/anchor-download-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html: Added.
* fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt:
* http/tests/download/anchor-download-no-extension-expected.txt: Added.
* http/tests/download/anchor-download-no-extension.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

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

2 years ago[WebRTC][Mac] Activate libwebrtc
achristensen@apple.com [Fri, 10 Feb 2017 03:39:17 +0000 (03:39 +0000)]
[WebRTC][Mac] Activate libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167293

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

Source/WebCore:

* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig:

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:

Source/WTF:

* wtf/Platform.h:

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

2 years agoFix libwebrtc build on case-sensitive file systems.
achristensen@apple.com [Fri, 10 Feb 2017 03:33:55 +0000 (03:33 +0000)]
Fix libwebrtc build on case-sensitive file systems.

* WebProcess/Network/webrtc/WebRTCMonitor.cpp:

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

2 years agoSVG clip-path references can clip out later content
pdr@google.com [Fri, 10 Feb 2017 03:27:40 +0000 (03:27 +0000)]
SVG clip-path references can clip out later content
https://bugs.webkit.org/show_bug.cgi?id=164181

Reviewed by Said Abou-Hallawa.

Source/WebCore:

RenderSVGResourceClipper can modify the GraphicsContext state (through the path-only
clipping codepath) so we need to ensure RenderLayer::setupClipPath saves the context
and its caller restores it back so later content is not clipped as well.

This patch is based on a chromium patch by fs@opera.com:
https://chromium.googlesource.com/chromium/src/+/b3f7e7d2c4afb3c7e5c7eb438ff5933cbe2109b3

Test: css3/masking/clip-path-reference-restore.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath): Add a GC save and return true to restore. Also switch to downcast instead of static_cast.

LayoutTests:

Make sure applying multiple clip-path references does not clip out later content.

* css3/masking/clip-path-reference-restore-expected.html: Added.
* css3/masking/clip-path-reference-restore.html: Added.

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

2 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 03:02:25 +0000 (03:02 +0000)]
Fix El Capitan build.

* libwebrtc.xcodeproj/project.pbxproj:
Remove more SSE4 code.

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

2 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 02:59:06 +0000 (02:59 +0000)]
Fix El Capitan build.

* libwebrtc.xcodeproj/project.pbxproj:
Remove more SSE4 code.

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

2 years agoSharedArrayBuffer does not need to be in the transfer list
fpizlo@apple.com [Fri, 10 Feb 2017 02:42:20 +0000 (02:42 +0000)]
SharedArrayBuffer does not need to be in the transfer list
https://bugs.webkit.org/show_bug.cgi?id=168079

Reviewed by Geoffrey Garen and Keith Miller.
Source/JavaScriptCore:

Exposes a simple shareWith() API for when you know you want to share the contents of
a shared buffer. Also a useful explicit operator bool.

* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::shareWith):
* runtime/ArrayBuffer.h:
(JSC::ArrayBufferContents::operator bool):

Source/WebCore:

Tests: workers/sab/multi-memory-multi-buffer.html
       workers/sab/multi-memory.html
       workers/sab/no-transfer.html
       workers/sab/postMessage-clones.html
       workers/sab/sent-from-worker-no-transfer.html
       workers/sab/sent-from-worker-transfer.html

The SAB API that we originally implemented required that SABs get put in transfer lists
when they are sent to workers.

The new SAB API that everyone is converging towards requires that you do not put the
SAB in the transfer list. That's supposed to be an error. Instead, anytime that a SAB
is part of any message to or from a dedicated worker then it is automatically shared.

The new API provides a lot more clarity about what is supposed to happen in contexts
that support transfering but don't support sharing.

Right now this patch allows both styles to work, but I hope we can disable the transfer
list capability soon.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueToJSValue):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
* bindings/js/SerializedScriptValue.h:
(): Deleted.
* dom/CustomEvent.cpp:
(WebCore::CustomEvent::trySerializeDetail):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::trySerializeError):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::trySerializeData):
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::trySerializeState):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* workers/Worker.cpp:
(WebCore::Worker::postMessage):

LayoutTests:

This adds tests that ensure that SABs behave correctly (are either cloned or shared)
depending on context, and that we currently share SABs whether they are in the transfer
list or not. This also adds tests for SABs being passed around via more complicated
data structures.

* workers/sab/multi-memory-expected.txt: Added.
* workers/sab/multi-memory-multi-buffer-expected.txt: Added.
* workers/sab/multi-memory-multi-buffer.html: Added.
* workers/sab/multi-memory-worker-1.js: Added.
(onmessage):
* workers/sab/multi-memory-worker-2.js: Added.
(onmessage):
* workers/sab/multi-memory.html: Added.
* workers/sab/no-transfer-expected.txt: Added.
* workers/sab/no-transfer.html: Added.
* workers/sab/postMessage-clones-expected.txt: Added.
* workers/sab/postMessage-clones.html: Added.
* workers/sab/sab-creator-no-transfer.js: Added.
* workers/sab/sab-creator-transfer.js: Added.
* workers/sab/sent-from-worker-no-transfer-expected.txt: Added.
* workers/sab/sent-from-worker-no-transfer.html: Added.
* workers/sab/sent-from-worker-transfer-expected.txt: Added.
* workers/sab/sent-from-worker-transfer.html: Added.
* workers/sab/worker-resources.js:

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

2 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Fri, 10 Feb 2017 02:35:51 +0000 (02:35 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:

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

2 years agoFix iOS and El Capitan builds of libwebrtc.
achristensen@apple.com [Fri, 10 Feb 2017 02:35:01 +0000 (02:35 +0000)]
Fix iOS and El Capitan builds of libwebrtc.

* Configurations/libwebrtc.xcconfig:
Skip building audio_mixer_manager_mac.cc on iOS.
* libwebrtc.xcodeproj/project.pbxproj:
El Capitan doesn't like the SSE4 optimizations in opus.
Just don't include them for now.

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

2 years agoUnreviewed build fix after r212025.
bfulgham@apple.com [Fri, 10 Feb 2017 02:34:17 +0000 (02:34 +0000)]
Unreviewed build fix after r212025.

inDocument -> isConnected

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):

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

2 years agoMake sure Event keeps its current target element alive
bfulgham@apple.com [Fri, 10 Feb 2017 02:21:09 +0000 (02:21 +0000)]
Make sure Event keeps its current target element alive
https://bugs.webkit.org/show_bug.cgi?id=167885
<rdar://problem/30376972>

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Brent Fulgham.

Source/WebCore:

Make sure Event keeps its current target element alive to avoid
crashes if it is accessed by JS after it has been garbage collected.

Test: fast/events/currentTarget-gc-crash.html

* dom/Event.cpp:
(WebCore::Event::setCurrentTarget):
* dom/Event.h:
(WebCore::Event::currentTarget):

LayoutTests:

Add layout test reproducing the crash.

* fast/events/currentTarget-gc-crash-expected.txt: Added.
* fast/events/currentTarget-gc-crash.html: Added.

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

2 years agoCrash in render tree after dynamically mutating the slot value
bfulgham@apple.com [Fri, 10 Feb 2017 02:19:04 +0000 (02:19 +0000)]
Crash in render tree after dynamically mutating the slot value
https://bugs.webkit.org/show_bug.cgi?id=167502

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Antti Koivisto.

Source/WebCore:

The crash was caused by attributeChanged not destructing the render tree after an assigned element had been
removed from its slot. Since the style resolver can no longer find this element in the flat tree, we need to
delete its render object as if the element had been removed from the DOM tree.

Tests: fast/html/details-summary-slot.html
       fast/shadow-dom/shadow-slot-attribute-change-crash.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* html/HTMLSummaryElement.cpp:
(WebCore::SummarySlotElement): Added. Always use the default slot regardless of the slot attribute's value.
(WebCore::HTMLSummaryElement::create): Use SummarySlotElement

LayoutTests:

Added regression tests for the crash, and one for assigning non-empty slot value to a child
of a summary element. The slot attribute should always be ignored since the fact summary
element has its own shadow tree is an implementation detail that should never be exposed.

* fast/html/details-summary-slot-expected.html: Added.
* fast/html/details-summary-slot.html: Added.
* fast/shadow-dom/shadow-slot-attribute-change-crash-expected.txt: Added.
* fast/shadow-dom/shadow-slot-attribute-change-crash.html: Added.

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

2 years agoDetails element doesn't work correctly when mutating content between closing and...
bfulgham@apple.com [Fri, 10 Feb 2017 02:17:05 +0000 (02:17 +0000)]
Details element doesn't work correctly when mutating content between closing and opening
https://bugs.webkit.org/show_bug.cgi?id=167310

Patch by Antti Koivisto <antti@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: fast/html/details-close-modify-open.html
       fast/shadow-dom/slot-remove-mutate-add.html

* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::didChangeSlot):

    Always reset the slot assignment when content is mutated.

LayoutTests:

* fast/html/details-close-modify-open-expected.html: Added.
* fast/html/details-close-modify-open.html: Added.
* fast/shadow-dom/slot-remove-mutate-add-expected.html: Added.
* fast/shadow-dom/slot-remove-mutate-add.html: Added.

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

2 years agoCrash under FormSubmission::create()
bfulgham@apple.com [Fri, 10 Feb 2017 02:15:02 +0000 (02:15 +0000)]
Crash under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=167200
<rdar://problem/30096323>

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The issue is that FormSubmission::create() was iterating over
form.associatedElements() as was calling Element::appendFormData()
in the loop. HTMLObjectElement::appendFormData() was calling
pluginWidget(PluginLoadingPolicy::Load) which causes a synchronous
layout and can fire events (such as focus event) synchronously.
Firing those events synchronously allows the JS to modify the
form.associatedElements() vector we are currently iterating on.

To avoid this issue, we now call pluginWidget(PluginLoadingPolicy::DoNotLoad)
in HTMLObjectElement::appendFormData() as we are not allowed to fire
synchronous events at this point. I also added a security assertion
in FormSubmission::create() to catch cases where we fire JS events
while iterating over the form associated elements to more easily
notice these things in the future.

Test: fast/forms/formsubmission-appendFormData-crash.html

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::appendFormData):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

* fast/forms/formsubmission-appendFormData-crash-expected.txt: Added.
* fast/forms/formsubmission-appendFormData-crash.html: Added.

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

2 years agoCrash under HTMLFormElement::registerFormElement()
bfulgham@apple.com [Fri, 10 Feb 2017 02:13:07 +0000 (02:13 +0000)]
Crash under HTMLFormElement::registerFormElement()
https://bugs.webkit.org/show_bug.cgi?id=167162

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

didMoveToNewDocument() was re-registering FormAttributeTargetObserver
even if the element's inDocument was not set yet. As a result, it was
possible for FormAssociatedElement::resetFormOwner() to be called
when the element was in the tree but with its inDocument still being
false (because insertedInto() has not been called yet). This could
end up calling HTMLFormElement::registerFormElement() even though
the element is still recognized as detached. This is an issue because
HTMLFormElement::m_associatedElements's order and its corresponding
indexes (m_associatedElementsBeforeIndex / m_associatedElementsAfterIndex)
rely on the position of the element with regards to the form element
(before / inside / after).

To address the issue, we now only register the FormAttributeTargetObserver
in didMoveToNewDocument() if the inDocument flag is set to true. This
is similar to what is done at other call sites of
resetFormAttributeTargetObserver(). We also ignore the form content
attribute in HTMLFormElement::formElementIndex() if the element is
not connected.

As per the HTML specification [1], the form content attribute is only
taken if the element is connected (i.e. inDocument flag is true).

Note that FormAssociatedElement::findAssociatedForm() was already
ignoring the form content attribute if the element is disconnected.

[1] https://html.spec.whatwg.org/#reset-the-form-owner (step 3)

Test: fast/forms/registerFormElement-crash.html

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
Only call resetFormAttributeTargetObserver() if inDocument flag is set,
similarly to what is done at other call sites.

(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
Add an assertion to make sure no one call this method on an element that
is not connected.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
Ignore the form content attribute if the element is not connected, as
per the HTML specification [1].

LayoutTests:

Add layout test coverage.

* fast/forms/registerFormElement-crash-expected.txt: Added.
* fast/forms/registerFormElement-crash.html: Added.

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

2 years agoTear down existing renderers when adding a shadow root.
bfulgham@apple.com [Fri, 10 Feb 2017 02:11:28 +0000 (02:11 +0000)]
Tear down existing renderers when adding a shadow root.
https://bugs.webkit.org/show_bug.cgi?id=167117

Patch by Antti Koivisto <antti@apple.com> on 2017-02-09
Reviewed by Andreas Kling.

Source/WebCore:

Adding a shadow root may cause children no longer be part of the flat tree. If they had renderers
tear down code would no longer reach them.

Test: fast/shadow-dom/attach-shadow-teardown.html

* dom/Element.cpp:
(WebCore::Element::addShadowRoot):

    Tear down existing render tree when adding a shadow root.

LayoutTests:

* fast/shadow-dom/attach-shadow-teardown-expected.txt: Added.
* fast/shadow-dom/attach-shadow-teardown.html: Added.

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

2 years agoHandle synchronous layout when setting a selection range
bfulgham@apple.com [Fri, 10 Feb 2017 02:09:25 +0000 (02:09 +0000)]
Handle synchronous layout when setting a selection range
https://bugs.webkit.org/show_bug.cgi?id=167092
<rdar://problem/30041640>

Reviewed by Antti Koivisto.

Source/WebCore:

The 'innerTextElement' of a form control can change during layout due
to arbitrary JavaScript executing. Handle the case where the inner text
element has changed so that current render box height is while setting
a selection range.

Test: fast/forms/input-type-change-during-selection.html

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

* fast/forms/input-type-change-during-selection-expected.txt: Added.
* fast/forms/input-type-change-during-selection.html: Added.

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

2 years agoB3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
bfulgham@apple.com [Fri, 10 Feb 2017 02:07:18 +0000 (02:07 +0000)]
B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
https://bugs.webkit.org/show_bug.cgi?id=167437
<rdar://problem/30198083>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

* stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.

Source/JavaScriptCore:

* b3/B3Procedure.cpp:
(JSC::B3::Procedure::deleteOrphans):

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

2 years agoSloppy mode: We don't properly hoist functions names "arguments" when we have a non...
bfulgham@apple.com [Fri, 10 Feb 2017 02:02:30 +0000 (02:02 +0000)]
Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
https://bugs.webkit.org/show_bug.cgi?id=167319
<rdar://problem/30149432>

Patch by Saam Barati <sbarati@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

* stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
(assert):
(assert.arguments):
(assert.b):
(x.arguments):
(x.b):
(x):

Source/JavaScriptCore:

When hoisting a function inside sloppy mode, we were assuming all "var"s are inside
what we call the "var" SymbolTableEntry. This was almost true, execpt for "arguments",
which has sufficiently weird behavior. "arguments" can be visible to the default
parameter expressions inside a function, therefore can't go inside the "var"
SymbolTableEntry since the parameter SymbolTableEntry comes before the "var"
SymbolTableEntry in the scope chain.  Therefore, if we hoist a function named
"arguments", then we must also look for that variable inside the parameter scope
stack entry.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):

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

2 years agoUnreviewed, fix test for new .caller with native code caller semantics.
keith_miller@apple.com [Fri, 10 Feb 2017 01:55:30 +0000 (01:55 +0000)]
Unreviewed, fix test for new .caller with native code caller semantics.

* js/dom/function-dot-arguments-and-caller.html:

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

2 years agoFix max length check in ArrayPrototype.js' concatSlowPath().
bfulgham@apple.com [Fri, 10 Feb 2017 01:54:24 +0000 (01:54 +0000)]
Fix max length check in ArrayPrototype.js' concatSlowPath().
https://bugs.webkit.org/show_bug.cgi?id=167270
<rdar://problem/30128133>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

* stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
* stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.

Source/JavaScriptCore:

1. Fixed concatSlowPath() to ensure that the result array length does not exceed
   @MAX_ARRAY_INDEX.  The old code was checking against @MAX_SAFE_INTEGER in some
   cases, but this is overly permissive.

2. Changed concatSlowPath() to throw a RangeError instead of a TypeError to be
   consistent with the C++ runtime functions in JSArray.cpp.

3. Changed the RangeError message in concatSlowPath() and JSArray.cpp to "Length
   exceeded the maximum array length" when the error is that the result length
   exceeds MAX_ARRAY_INDEX.  We do this for 2 reasons:
   a. "Length exceeded the maximum array length" is more informative than
      "Invalid array length".
   b. We want to use the same string consistently for the same error.

   There are still 2 places in JSArray.cpp that still throws a RangeError with
   message "Invalid array length".  In those cases, the error is not necessarily
   due to the result length exceeding MAX_ARRAY_INDEX, but is due to attempting to
   set a length value that is not an integer that fits in MAX_ARRAY_INDEX e.g.
   an attempt to set a fractional length value.  Hence, "Invalid array length" is
   appropriate for those cases.

4. Fixed JSArray::appendMemcpy() to handle overflows when computing the result
   array length.

* builtins/ArrayPrototype.js:
(concatSlowPath):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* runtime/ArrayPrototype.cpp:
(JSC::concatAppendOne):
(JSC::arrayProtoPrivateFuncAppendMemcpy):
* runtime/JSArray.cpp:
(JSC::JSArray::appendMemcpy):
(JSC::JSArray::push):

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

2 years agoConstructed object's global object should be the global object of the constructor.
bfulgham@apple.com [Fri, 10 Feb 2017 01:39:13 +0000 (01:39 +0000)]
Constructed object's global object should be the global object of the constructor.
https://bugs.webkit.org/show_bug.cgi?id=167121
<rdar://problem/30054759>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo and Geoffrey Garen.

Source/JavaScriptCore:

The realm (i.e. globalObject) of any object should be the same as the constructor
that instantiated the object.  Changed PrototypeMap::createEmptyStructure() to
be passed the correct globalObject to use instead of assuming it's the same one
as the prototype object.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::initialize):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::initializeObjectAllocationProfile):
* runtime/FunctionRareData.h:
(JSC::FunctionRareData::createInternalFunctionAllocationStructureFromBase):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructure):
* runtime/IteratorOperations.cpp:
(JSC::createIteratorResultObjectStructure):
* runtime/JSBoundFunction.cpp:
(JSC::getBoundFunctionStructure):
* runtime/JSFunction.cpp:
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSProxy.cpp:
(JSC::JSProxy::setTarget):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
* runtime/PrototypeMap.cpp:
(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):
(JSC::PrototypeMap::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):
* runtime/PrototypeMap.h:

LayoutTests:

* http/tests/security/xssAuditor/regress-167121-expected.txt: Added.
* http/tests/security/xssAuditor/regress-167121.html: Added.

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

2 years agoDon't build libwebrtc.
achristensen@apple.com [Fri, 10 Feb 2017 01:33:43 +0000 (01:33 +0000)]
Don't build libwebrtc.

* Scripts/build-webkit:
Not ready yet.  It broke El Capitan and iOS.

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

2 years agoFix CMake build.
achristensen@apple.com [Fri, 10 Feb 2017 01:27:38 +0000 (01:27 +0000)]
Fix CMake build.

* PlatformMac.cmake:

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

2 years agoREGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending...
cdumez@apple.com [Fri, 10 Feb 2017 01:23:30 +0000 (01:23 +0000)]
REGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161650

Reviewed by Alexey Proskuryakov.

Make sure we clear the memory cache before trigerring new loads as this
test is meant to cover the disk cache.

* http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html:
* platform/mac/TestExpectations:

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

2 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Fri, 10 Feb 2017 01:11:20 +0000 (01:11 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:

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

2 years agoMark inspector/model/remote-object-weak-collection.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 10 Feb 2017 01:07:35 +0000 (01:07 +0000)]
Mark inspector/model/remote-object-weak-collection.html as a flaky timeout.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoWe should not allow Function.caller to be used on native functions
bfulgham@apple.com [Fri, 10 Feb 2017 00:59:15 +0000 (00:59 +0000)]
We should not allow Function.caller to be used on native functions
https://bugs.webkit.org/show_bug.cgi?id=165628

Patch by Keith Miller <keith_miller@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

* stress/caller-native-code.js: Added.
(f):

Source/JavaScriptCore:

Also remove unneeded dynamic cast.

* runtime/JSFunction.cpp:
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::JSFunction::callerGetter):

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

2 years agoMark pointer-lock/mouse-event-delivery.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:49:12 +0000 (00:49 +0000)]
Mark pointer-lock/mouse-event-delivery.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167965

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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