WebKit-https.git
3 years agoSharedArrayBuffer plus WebGL should not equal CRASH
fpizlo@apple.com [Mon, 23 Jan 2017 23:13:41 +0000 (23:13 +0000)]
SharedArrayBuffer plus WebGL should not equal CRASH
https://bugs.webkit.org/show_bug.cgi?id=167329

Reviewed by Saam Barati.

Source/JavaScriptCore:

DOM unwrapping methods should return null rather than crashing. The code expects an
unshared buffer, so we should return null when it's shared. The caller can then decide
if they like null or not.

* runtime/JSArrayBufferViewInlines.h:
(JSC::JSArrayBufferView::toWrapped):

LayoutTests:

This test used to crash and now it doesn't. It throws some exception.

* js/shared-array-buffer-webgl-expected.txt: Added.
* js/shared-array-buffer-webgl.html: Added.

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

3 years agoWeb Inspector: long press on New Tab Tab Item should show context menu with recently...
commit-queue@webkit.org [Mon, 23 Jan 2017 23:06:26 +0000 (23:06 +0000)]
Web Inspector: long press on New Tab Tab Item should show context menu with recently closed tabs that are still closed
https://bugs.webkit.org/show_bug.cgi?id=166901

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

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.Event):
(WebInspector.TabBar.prototype._handleNewTabContextMenu):
Add listener dispatch for contextmenu event on New Tab tab item.

(WebInspector.TabBar.prototype.get newTabTabBarItem): Deleted.
Unused.

* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype._tabBarItemAdded):
(WebInspector.TabBrowser.prototype._tabBarItemRemoved):
(WebInspector.TabBrowser.prototype._handleNewTabContextMenu): Added.
Create an array that keeps track of tabs as they are closed, and populate the contextmenu
of the New Tab tab item with entries for each of these tabs.

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

3 years agoObjCCallbackFunction::destroy() should not use jsCast().
mark.lam@apple.com [Mon, 23 Jan 2017 22:49:26 +0000 (22:49 +0000)]
ObjCCallbackFunction::destroy() should not use jsCast().
https://bugs.webkit.org/show_bug.cgi?id=167322

Reviewed by Filip Pizlo.

Since r210829, it is no longer correct for object destructors to use jsCast().
Fixed ObjCCallbackFunction::destroy() to use a static_cast instead.

* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunction::destroy):

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

3 years agoPass down website autoplay policies to media elements
commit-queue@webkit.org [Mon, 23 Jan 2017 22:25:59 +0000 (22:25 +0000)]
Pass down website autoplay policies to media elements
https://bugs.webkit.org/show_bug.cgi?id=167132

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-23
Reviewed by Alex Christensen.

The playbackRequiresUserGesture APIs are already covered by tests. This patch adds API tests
for autoplay website policies.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

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

3 years agoWeb Inspector: tree elements with depth > 1 should have context menu "expand all...
commit-queue@webkit.org [Mon, 23 Jan 2017 22:24:01 +0000 (22:24 +0000)]
Web Inspector: tree elements with depth > 1 should have context menu "expand all"/"collapse all" commands
https://bugs.webkit.org/show_bug.cgi?id=135590

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

Rework the context menu event handlers for all TreeOutline and TreeElement instances such
that the TreeOutline handles the event listener and creates the context menu object and the
TreeElement populates the list with items.  This is necessary due to the way in which
children are laid out, as there is padding on either side of the element that would not
trigger a context menu event.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.ondetach):
(WebInspector.BreakpointTreeElement.prototype.populateContextMenu):
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu): Deleted.
* UserInterface/Views/ContextMenuUtilities.js:
(WebInspector.appendContextMenuItemsForSourceCode):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._onmousedown):
(WebInspector.DOMTreeOutline.prototype._onmousemove):
(WebInspector.DOMTreeOutline.prototype._ondragstart):
(WebInspector.DOMTreeOutline.prototype._ondragover):
(WebInspector.DOMTreeOutline.prototype._ondrop):
(WebInspector.DOMTreeOutline.prototype._treeElementFromEvent): Deleted.
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onattach):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype.ondetach): Deleted.
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype.populateContextMenu):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):
(WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu): Deleted.
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): Deleted.
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.populateContextMenu):
(WebInspector.ResourceTreeElement.prototype.onattach): Deleted.
(WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Deleted.
* UserInterface/Views/ThreadTreeElement.js:
(WebInspector.ThreadTreeElement.prototype.populateContextMenu):
(WebInspector.ThreadTreeElement.prototype.oncontextmenu): Deleted.
* UserInterface/Views/TreeElement.js:
(WebInspector.TreeElement.prototype.populateContextMenu):
(WebInspector.TreeElement):
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.treeElementFromEvent):
(WebInspector.TreeOutline.prototype.populateContextMenu):
(WebInspector.TreeOutline._generateStyleRulesIfNeeded):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype.onattach):
(WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu):
(WebInspector.VisualStyleSelectorTreeItem.prototype._highlightNodesWithSelector):
(WebInspector.VisualStyleSelectorTreeItem.prototype._hideDOMNodeHighlight):
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): Deleted.
* UserInterface/Views/WorkerTreeElement.js:
(WebInspector.WorkerTreeElement.prototype.populateContextMenu):
(WebInspector.WorkerTreeElement.prototype.onattach):
(WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent): Deleted.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
Add "Expand All"/"Collapse All" context menu items.

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

3 years agoMigrate font variations tests to using David Jonathan Ross's Boxis font
mmaxfield@apple.com [Mon, 23 Jan 2017 21:41:23 +0000 (21:41 +0000)]
Migrate font variations tests to using David Jonathan Ross's Boxis font
https://bugs.webkit.org/show_bug.cgi?id=167222

Reviewed by Dean Jackson.

He extremely generously made this font for doing testing of variation fonts,
and worked with us to licence it appropriately so it can be used in WebKit
directly.

Thanks so much to DJR!!!!

I also took this opportunity to make the tests in animations/font-variations
more robust.

* animations/font-variations/font-variation-settings-expected.html: Removed.
* animations/font-variations/font-variation-settings-expected.txt: Added.
* animations/font-variations/font-variation-settings-order-expected.html: Removed.
* animations/font-variations/font-variation-settings-order-expected.txt: Added.
* animations/font-variations/font-variation-settings-order.html:
* animations/font-variations/font-variation-settings-unlike-expected.html: Removed.
* animations/font-variations/font-variation-settings-unlike-expected.txt: Added.
* animations/font-variations/font-variation-settings-unlike.html:
* animations/font-variations/font-variation-settings.html:
* animations/font-variations/resources/Boxis-VF.ttf: Added.
* fast/backgrounds/background-repeat-x-y.html: Removed.
* fast/text/variations/advances.html:
* fast/text/variations/case-axis-names-expected.html:
* fast/text/variations/case-axis-names.html:
* fast/text/variations/default-value-expected.html:
* fast/text/variations/default-value.html:
* fast/text/variations/duplicate-axis-expected.html: Removed.
* fast/text/variations/duplicate-axis.html: Removed.
* fast/text/variations/duplicate-expected.html:
* fast/text/variations/duplicate.html:
* fast/text/variations/exist-expected-mismatch.html:
* fast/text/variations/exist.html:
* fast/text/variations/getComputedStyle-expected.txt:
* fast/text/variations/getComputedStyle.html:
* fast/text/variations/inheritance-expected.html:
* fast/text/variations/inheritance.html:
* fast/text/variations/order-expected.html:
* fast/text/variations/order.html:
* fast/text/variations/outofbounds-expected-mismatch.html:
* fast/text/variations/outofbounds.html:
* fast/text/variations/resources/Boxis-VF.ttf: Added.
* platform/mac/TestExpectations:

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

3 years agoMarking media/modern-media-controls/tracks-panel/tracks-panel-hide.html as flaky...
ryanhaddad@apple.com [Mon, 23 Jan 2017 21:31:29 +0000 (21:31 +0000)]
Marking media/modern-media-controls/tracks-panel/tracks-panel-hide.html as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=167311

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMake URLs with non-special schemes and a query or fragment but no slash after the...
achristensen@apple.com [Mon, 23 Jan 2017 21:30:32 +0000 (21:30 +0000)]
Make URLs with non-special schemes and a query or fragment but no slash after the host more compatible
https://bugs.webkit.org/show_bug.cgi?id=167317
Source/WebCore:

<rdar://problem/29526875>

Reviewed by Sam Weinig.

This is currently being added to the URL spec in https://github.com/whatwg/url/issues/212
Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
Only add a slash if there wasn't one if the URL has a special scheme.
This new behavior matches the old behavior of URL::parse.

Tools:

Reviewed by Sam Weinig.

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoWeb Inspector: color picker should feature an editable CSS value
commit-queue@webkit.org [Mon, 23 Jan 2017 21:27:26 +0000 (21:27 +0000)]
Web Inspector: color picker should feature an editable CSS value
https://bugs.webkit.org/show_bug.cgi?id=124356

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

* UserInterface/Views/ColorPicker.css:
(.color-picker):
(.color-picker.hide-inputs):
(.color-picker > .color-inputs):
(.color-picker > .color-inputs > div):
(.color-picker > .color-inputs > div[hidden]):
(.color-picker > .color-inputs input):

* UserInterface/Views/ColorPicker.js:
(WebInspector.ColorPicker.createColorInput):
(WebInspector.ColorPicker):
(WebInspector.ColorPicker.prototype.set color):
(WebInspector.ColorPicker.prototype.set enableColorComponentInputs):
(WebInspector.ColorPicker.prototype._updateColor):
(WebInspector.ColorPicker.prototype._handleFormatChange):
(WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput):
(WebInspector.ColorPicker.prototype._showColorComponentInputs):
(WebInspector.ColorPicker.prototype._handleColorInputInput):
Add an input element (with a label for the component name and its units) for each component
as part of the current color format (e.g. R, G, B, A).  If any of these inputs are changed
then the color is also changed and the "ColorChanged" event is fired.

* UserInterface/Controllers/CodeMirrorColorEditingController.js:
(WebInspector.CodeMirrorColorEditingController.prototype.popoverWillPresent):
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Add FormatChanged event that fires whenever a new color is set with a different format or
the color value is set for the first time (there is no old format to compare to).  This is
needed because if the format becomes RGB, RGBA, HSL, or HSLA from something not in that list
then the size of the containing popover needs to change since the newly added color inputs
will be displayed.

* UserInterface/Views/GradientEditor.js:
(WebInspector.GradientEditor):
Prevent the color inputs from displaying at all, since there aren't individual swatches for
each color in a gradient.

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

3 years agoMarking media/modern-media-controls/placard-support/placard-support-pip.html as a...
ryanhaddad@apple.com [Mon, 23 Jan 2017 21:22:13 +0000 (21:22 +0000)]
Marking media/modern-media-controls/placard-support/placard-support-pip.html as a flaky crash on Sierra WK1.
https://bugs.webkit.org/show_bug.cgi?id=167320

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoConvert langAttributeAwareFormControlUIEnabled to a Setting
commit-queue@webkit.org [Mon, 23 Jan 2017 21:16:19 +0000 (21:16 +0000)]
Convert langAttributeAwareFormControlUIEnabled to a Setting
https://bugs.webkit.org/show_bug.cgi?id=167279

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

* dom/Document.cpp:
(WebCore::Document::getCachedLocale):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters):
Convert to use Settings instead of RuntimeEnabledFeatures.

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled): Deleted.
* page/Settings.in:
Move to Settings.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
Remove the manual interface for the RuntimeEnabledFeature.
An identical interface is generated from Settings.in!

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

3 years agoWeb Inspector: Asserts seen opening and closing Remote Web Inspector windows
commit-queue@webkit.org [Mon, 23 Jan 2017 21:08:02 +0000 (21:08 +0000)]
Web Inspector: Asserts seen opening and closing Remote Web Inspector windows
https://bugs.webkit.org/show_bug.cgi?id=167316
<rdar://problem/28891161>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-23
Reviewed by Alexey Proskuryakov.

* UIProcess/RemoteWebInspectorProxy.cpp:
(WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
Assume read access, like the local web inspector, to Web Inspector resources.

* WebProcess/WebPage/RemoteWebInspectorUI.cpp:
(WebKit::RemoteWebInspectorUI::closeWindow):
Clear ourselves as the inspector frontend client when closing.

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

3 years agoAdd Sierra flag to TestExpectation for media/modern-media-controls/placard-support...
ryanhaddad@apple.com [Mon, 23 Jan 2017 21:00:21 +0000 (21:00 +0000)]
Add Sierra flag to TestExpectation for media/modern-media-controls/placard-support/placard-support-pip.html.

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoWhen Safari reloads pages with Flash objects after Flash is installed, placeholders...
andersca@apple.com [Mon, 23 Jan 2017 20:58:35 +0000 (20:58 +0000)]
When Safari reloads pages with Flash objects after Flash is installed, placeholders don't paint (but do work!)
https://bugs.webkit.org/show_bug.cgi?id=167268
rdar://problem/29857388

Reviewed by Sam Weinig.

Source/WebCore:

* page/Page.cpp:
(WebCore::Page::refreshPlugins):
Call PluginInfoProvider::refresh instead.

(WebCore::Page::clearPluginData):
Add new setter.

* page/Page.h:
Declare new members.

* plugins/PluginInfoProvider.cpp:
(WebCore::PluginInfoProvider::refresh):
Put the logic to clear plug-in data and reload frames here.

* plugins/PluginInfoProvider.h:
Add new members.

Source/WebKit2:

* WebProcess/Plugins/WebPluginInfoProvider.h:
Make refreshPlugins() private.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::refreshPlugins):
Call the newly added PluginInfoProvider::refresh().

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

3 years agoMarking media/modern-media-controls/tracks-support/tracks-support-show-panel-after...
ryanhaddad@apple.com [Mon, 23 Jan 2017 20:55:09 +0000 (20:55 +0000)]
Marking media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167275

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agogtest fails to link on Linux due to missing -lpthread
timothy@hatcher.name [Mon, 23 Jan 2017 20:29:41 +0000 (20:29 +0000)]
gtest fails to link on Linux due to missing -lpthread
https://bugs.webkit.org/show_bug.cgi?id=167313

* gtest/CMakeLists.txt: Remove find_package(Threads) that was added in my last commit.
This is assumed to already happen in the platform cmake options file.

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

3 years agoUse priorities in speculative revalidation
antti@apple.com [Mon, 23 Jan 2017 20:21:40 +0000 (20:21 +0000)]
Use priorities in speculative revalidation
https://bugs.webkit.org/show_bug.cgi?id=167314

Reviewed by Chris Dumez.

We currently do all speculative cache operations with 'Medium' priority
and network operations with 'Low'. We should use the actual request priorities instead.

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::constructRevalidationRequest):

    Use priority when constructing validation request.

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

    Use priority when retrieving from cache.

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

    Save and restore the priority.

* NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
(WebKit::NetworkCache::SubresourceInfo::priority):

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

3 years agosvn-create-patch should emit properties when files are moved or copied
jbedard@apple.com [Mon, 23 Jan 2017 20:15:15 +0000 (20:15 +0000)]
svn-create-patch should emit properties when files are moved or copied
https://bugs.webkit.org/show_bug.cgi?id=167264

Reviewed by Daniel Bates.

* Scripts/svn-create-patch:
(manufacturePatchForAdditionWithHistory): Diff the source file against nothing to get properties.

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

3 years ago[WebRTC] Filter libwebrtc link flags
commit-queue@webkit.org [Mon, 23 Jan 2017 19:32:54 +0000 (19:32 +0000)]
[WebRTC] Filter libwebrtc link flags
https://bugs.webkit.org/show_bug.cgi?id=167287

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

Source/ThirdParty/libwebrtc:

* CMakeLists.txt:

Tools:

* Scripts/webkitpy/libwebrtc/generate_cmake.py:
(CMakeGenerator._compute_link_flags):
(CMakeGenerator._compute_link_flags.keep_flag):
(CMakeGenerator._generate_compile_target_options):

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

3 years ago[WebRTC] Make VP8 optional in libwebrtc
commit-queue@webkit.org [Mon, 23 Jan 2017 19:32:37 +0000 (19:32 +0000)]
[WebRTC] Make VP8 optional in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167257

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-23
Reviewed by Darin Adler.

Source/ThirdParty/libwebrtc:

Reusing strategy used to have VP9 optional for VP8 codec.

* CMakeLists.txt: Updated tocompile and link vp8_noop.cc
* Source/webrtc/media/engine/webrtcvideoengine2.cc:
* Source/webrtc/modules/video_coding/codecs/vp8/include/vp8.h:
* Source/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc:
* Source/webrtc/modules/video_coding/codecs/vp8/vp8_noop.cc: Added.
* Source/webrtc/video/video_encoder.cc:

Tools:

* Scripts/webkitpy/libwebrtc/generate_cmake.py:
(CMakeGenerator.remove_libvpx): Adding vp8_noop.cc to the build system.

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

3 years agoSource/WebCore:
jer.noble@apple.com [Mon, 23 Jan 2017 19:23:34 +0000 (19:23 +0000)]
Source/WebCore:
REGRESSION (r208149): Video details does not apear and missing scrubber in Control Center
https://bugs.webkit.org/show_bug.cgi?id=167233

Reviewed by Alex Christensen.

Test: In TestWebKitAPI, NowPlayingControlsTests.NowPlayingControlsIOS

In r208149, we introduced a new media type, Video, and renamed the old type to
VideoAudio (to be able to distinguish between video-with-audio and silent-video).
But we missed one place where that type needs to be renamed.

For testing purposes, overload methods from PlatformMediaSessionManager which WebKit2 uses
to report the current now playing session and it's information.

* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::nowPlayingEligibleSession):
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo):

Source/WebKit2:
Video details does not apear and missing scrubber in Control Center
https://bugs.webkit.org/show_bug.cgi?id=167233

Reviewed by Alex Christensen.

Make requestActiveNowPlayingSessionInfo() and handleActiveNowPlayingSessionInfoResponse()
work in PLATFORM(IOS).

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _requestActiveNowPlayingSessionInfo]):
(-[WKWebView _handleActiveNowPlayingSessionInfoResponse:title:duration:elapsedTime:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo):
(WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse):
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo): Deleted.

Tools:
Video details does not apear and missing scrubber in Control Center
https://bugs.webkit.org/show_bug.cgi?id=167233

Reviewed by Alex Christensen.

Refactor TestWKWebViewMac to work on PLATFORM(IOS). Add a new test to
NowPlayingControlTests for iOS.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView setWindowVisible:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/SnapshotStore.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewCandidateTests.mm:
* TestWebKitAPI/cocoa/TestWKWebView.h: Renamed from Tools/TestWebKitAPI/mac/TestWKWebViewMac.h.
* TestWebKitAPI/cocoa/TestWKWebView.mm: Renamed from Tools/TestWebKitAPI/mac/TestWKWebViewMac.mm.
(SOFT_LINK_CLASS):
(-[TestMessageHandler addMessage:withHandler:]):
(-[TestMessageHandler userContentController:didReceiveScriptMessage:]):
(__simulated_forceClickAssociatedEventsMask):
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebViewHostWindow isKeyWindow]):
(-[TestWKWebViewHostWindow makeKeyWindow]):
(-[TestWKWebViewHostWindow resignKeyWindow]):
(-[TestWKWebView initWithFrame:]):
(-[TestWKWebView initWithFrame:configuration:]):
(-[TestWKWebView _setUpTestWindow:]):
(-[TestWKWebView performAfterReceivingMessage:action:]):
(-[TestWKWebView loadTestPageNamed:]):
(-[TestWKWebView synchronouslyLoadTestPageNamed:]):
(-[TestWKWebView stringByEvaluatingJavaScript:]):
(-[TestWKWebView waitForMessage:]):
(-[TestWKWebView performAfterLoading:]):
(-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView typeCharacter:]):

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

3 years agogtest fails to link on Linux due to missing -lpthread
timothy@hatcher.name [Mon, 23 Jan 2017 18:45:51 +0000 (18:45 +0000)]
gtest fails to link on Linux due to missing -lpthread
https://bugs.webkit.org/show_bug.cgi?id=167313

Reviewed by Alex Christensen.

* gtest/CMakeLists.txt: Add call to find_package(Threads) before testing CMAKE_USE_PTHREADS_INIT.
Without the find_package call, CMAKE_USE_PTHREADS_INIT was always false for me. Also explicitly
define GTEST_HAS_PTHREAD to 0 when CMAKE_USE_PTHREADS_INIT is false to prevent gtest-port.h from
setting GTEST_HAS_PTHREAD based on the platform.

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

3 years agoIntlObject uses JSArray::tryCreateUninitialized in an unsafe way
msaboff@apple.com [Mon, 23 Jan 2017 18:45:17 +0000 (18:45 +0000)]
IntlObject uses JSArray::tryCreateUninitialized in an unsafe way
https://bugs.webkit.org/show_bug.cgi?id=167288

Reviewed by Filip Pizlo.

Refactored the following "create" methods into a "tryCreate" method and a
"create" wrapper: JSArray::create(), Butterfly::create() and
createArrayButterfly().

Changed IntlObject.cpp to use JSArray::tryCreate() as it is simpler to use
by not requiring the caller to be GC savey.  The performance benefits of
tryCreateUninitialized() are not needed by the IntlObject c++ code.

Did not add a new test as the bug caused LayoutTests/js/intl.html to fail
reliably with the JSC option values scribbleFreeCells=true,
collectContinuously=true and JSC_useGenerationalGC=false.

* runtime/Butterfly.h:
* runtime/ButterflyInlines.h:
(JSC::Butterfly::tryCreate): Added.
(JSC::Butterfly::create):
* runtime/IntlObject.cpp:
(JSC::canonicalizeLocaleList):
(JSC::lookupSupportedLocales):
(JSC::intlObjectFuncGetCanonicalLocales):
* runtime/JSArray.h:
(JSC::createContiguousArrayButterfly): Deleted.
(JSC::tryCreateArrayButterfly): Added.
(JSC::createArrayButterfly):
(JSC::JSArray::tryCreate): Added.
(JSC::JSArray::create):

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

3 years agoREGRESSION (r211033): ASSERTION FAILED: m_ptr in com.apple.WebCore: WTF::RefPtr<WebCo...
cdumez@apple.com [Mon, 23 Jan 2017 18:39:48 +0000 (18:39 +0000)]
REGRESSION (r211033): ASSERTION FAILED: m_ptr in com.apple.WebCore: WTF::RefPtr<WebCore::Element>::operator* const + 70
https://bugs.webkit.org/show_bug.cgi?id=167308
<rdar://problem/30144964>

Unreviewed, do a partial revert of r211033 to fix assertion.

Source/WebCore:

No new tests, already covered by:
fullscreen/exit-full-screen-iframe.html

* dom/Document.cpp:
(WebCore::Document::webkitExitFullscreen):
* page/ChromeClient.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::exitFullScreenForElement):

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::exitFullScreenForElement):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exitFullScreenForElement):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

3 years agoREGRESSION (r210941): LayoutTest scrollingcoordinator/ios/sync-layer-positions-after...
megan_gardner@apple.com [Mon, 23 Jan 2017 18:30:25 +0000 (18:30 +0000)]
REGRESSION (r210941): LayoutTest scrollingcoordinator/ios/sync-layer-positions-after-scroll.html failing
https://bugs.webkit.org/show_bug.cgi?id=167262

Unreviewed test gardening.

Fix to interpolation code caused a different result.

* scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt:

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

3 years ago[GTK] asserting on unknown locale for hyphenation is wrong
gns@gnome.org [Mon, 23 Jan 2017 18:20:10 +0000 (18:20 +0000)]
[GTK] asserting on unknown locale for hyphenation is wrong
https://bugs.webkit.org/show_bug.cgi?id=167312

Reviewed by Carlos Garcia Campos.

The fact that we hit the assert on a test called 'hyphenation-unknown-locale' is already
a strong indication we should not have it. In addition to that, Carlos Lopez pointed out
a similar assert was removed from the Mac codepaths when the test was introduced.

* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::lastHyphenLocation): early return when a locale that is not available is provided
for hyphenation, instead of asserting.

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

3 years agoUnreviewed attempt to fix the iOS build after r211033.
cdumez@apple.com [Mon, 23 Jan 2017 17:40:30 +0000 (17:40 +0000)]
Unreviewed attempt to fix the iOS build after r211033.

* dom/Node.cpp:
(WebCore::Node::defaultEventHandler):

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

3 years agourlParserEnabled parameter is only encoded for COCOA ports
gns@gnome.org [Mon, 23 Jan 2017 11:28:08 +0000 (11:28 +0000)]
urlParserEnabled parameter is only encoded for COCOA ports
https://bugs.webkit.org/show_bug.cgi?id=167238

Reviewed by Alex Christensen.

This leads to URLParser being enabled on the UI process, since it is
the default, but disabled on the WebProcess, which is the default for
WebProcessCreationParameters, casuing asserts like on tests such as these
due to differences in parsing:

- fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate.html
- fast/loader/window-open-to-invalid-url-calls-policy-delegate.html
- http/tests/inspector/network/copy-as-curl.html

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): encode urlParserEnabled
(WebKit::WebProcessCreationParameters::decode): decode urlParserEnabled

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

3 years agoJavaScriptCore has a weak external symbol in it
commit-queue@webkit.org [Mon, 23 Jan 2017 10:41:42 +0000 (10:41 +0000)]
JavaScriptCore has a weak external symbol in it
https://bugs.webkit.org/show_bug.cgi?id=167282

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

* debugger/Debugger.cpp:
(JSC::Debugger::ProfilingClient::~ProfilingClient):
* debugger/Debugger.h:
Avoid possible weak external symbol.

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

3 years agoRemove allowWindowOpenWithoutUserGesture setting
commit-queue@webkit.org [Mon, 23 Jan 2017 09:54:59 +0000 (09:54 +0000)]
Remove allowWindowOpenWithoutUserGesture setting
https://bugs.webkit.org/show_bug.cgi?id=167301

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-23
Reviewed by Darin Adler.

Source/WebCore:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::allowPopUp):
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Use the equivalent existing setting.

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

3 years agoDatabase file not removed for origins after deleting all databases
carlosgc@webkit.org [Mon, 23 Jan 2017 07:28:48 +0000 (07:28 +0000)]
Database file not removed for origins after deleting all databases
https://bugs.webkit.org/show_bug.cgi?id=167281

Reviewed by Darin Adler.

When DatabaseTracker::deleteDatabasesModifiedSince() is called with a min time, all databases for every origin
are deleted. For each origin if all databases are removed DatabaseTracker::deleteOrigin() is called to remove
also the origin database file. However, DatabaseTracker::deleteOrigin() returns early if the origin doesn't have
databases and in this particular case it never has databases, because we have just removed them.

This will be covered by GTK+ unit tests.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteDatabasesModifiedSince): Instead of removing the databases while iterating
them, add the ones to be removed to a vector. If after the iteration all databases should be removed call
DatabaseTracker::deleteOrigin() to ensure both the databases and the database file are removed for the origin,
otherwhise call DatabaseTracker::deleteDatabase() for every database to delete.

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

3 years ago[GTK] Update Safari version in user agent
mcatanzaro@igalia.com [Mon, 23 Jan 2017 07:25:41 +0000 (07:25 +0000)]
[GTK] Update Safari version in user agent
https://bugs.webkit.org/show_bug.cgi?id=167290

Reviewed by Carlos Garcia Campos.

Update Safari version from 10 to 11.

* platform/gtk/UserAgentGtk.cpp:
(WebCore::buildUserAgentString):

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

3 years agoRemove PassRefPtr from "page" directory of WebCore, also deploy references
darin@apple.com [Mon, 23 Jan 2017 06:24:18 +0000 (06:24 +0000)]
Remove PassRefPtr from "page" directory of WebCore, also deploy references
https://bugs.webkit.org/show_bug.cgi?id=167224

Reviewed by Chris Dumez.

Source/WebCore:

* Modules/fetch/DOMWindowFetch.cpp:
(WebCore::DOMWindowFetch::fetch): Use DOMWindow::document instead of
scriptExecutionContext.

* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::databaseExceededQuota): Pass a reference.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
Pass a reference.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot): Pass a reference.

* dom/Document.cpp:
(WebCore::Document::childrenChanged): Pass a reference. Also made the
didReceiveDocType code unconditional instead of iOS-only.
(WebCore::Document::platformSuspendOrStopActiveDOMObjects): Ditto.
(WebCore::Document::updateViewportArguments): Ditto.
(WebCore::Document::setFocusedElement): Ditto.
(WebCore::Document::createDOMWindow): Ditto.
(WebCore::Document::takeDOMWindowFrom): Ditto.
(WebCore::Document::requestFullScreenForElement): Ditto.
(WebCore::Document::webkitExitFullscreen): Ditto.
* dom/Element.cpp:
(WebCore::Element::focus): Ditto.
(WebCore::Element::blur): Ditto.
(WebCore::Element::dispatchFocusEvent): Ditto.
(WebCore::Element::dispatchBlurEvent): Ditto.
* dom/Node.cpp:
(WebCore::Node::defaultEventHandler): Ditto.
* editing/EditorCommand.cpp:
(WebCore::executePrint): Ditto.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedElementIfNeeded): Ditto.
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore): Ditto.
(WebCore::CachedFrame::CachedFrame): Ditto.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::handleDOMActivateEvent): Ditto.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isKeyboardFocusable): Ditto.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isKeyboardFocusable): Pass a reference,
and also rewrote to use && for clarity.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen): Pass a reference.
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler): Ditto.
(WebCore::SpinButtonElement::releaseCapture): Ditto.
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::defaultEventHandler): Ditto.
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::showContextMenu): Ditto.
(WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent): Ditto.

* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::createPopupMenu): Updated to take reference.
(WebCore::EmptyChromeClient::createSearchPopupMenu): Ditto.
(WebCore::EmptyChromeClient::createColorChooser): Ditto.
* loader/EmptyClients.h: Ditto.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm): Pass a reference.
(WebCore::FrameLoader::commitProvisionalLoad): Ditto.
(WebCore::FrameLoader::closeAndRemoveChild): Take a reference.
(WebCore::FrameLoader::detachFromParent): Pass a reference.
(WebCore::FrameLoader::dispatchBeforeUnloadEvent): Ditto.
(WebCore::createWindow): Ditto.
* loader/FrameLoader.h: Updated for the above.

* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNewWindowPolicy): Pass a reference.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota): Ditto.

* loader/appcache/ApplicationCacheGroup.h: Return a reference from origin.

* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::calculateQuotaForOrigin): Take a reference.
(WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache):
Ditto.
(WebCore::ApplicationCacheStorage::store): Pass a reference.
(WebCore::ApplicationCacheStorage::checkOriginQuota): Updated since origin
now returns areference.
* loader/appcache/ApplicationCacheStorage.h: Updated for the above.

* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData): Pass a reference.
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::isKeyboardFocusable): Ditto.

* page/Chrome.cpp:
(WebCore::Chrome::Chrome): Moved initialization of data members to the
class definition.
(WebCore::Chrome::contentsSizeChanged): Take a reference.
(WebCore::Chrome::createWindow): Ditto.
(WebCore::Chrome::runBeforeUnloadConfirmPanel): Ditto.
(WebCore::Chrome::runJavaScriptAlert): Ditto.
(WebCore::Chrome::runJavaScriptConfirm): Ditto.
(WebCore::Chrome::runJavaScriptPrompt): Ditto.
(WebCore::Chrome::setStatusbarText): Ditto.
(WebCore::Chrome::print): Ditto.
(WebCore::Chrome::createColorChooser): Ditto.
(WebCore::Chrome::createPopupMenu): Ditto.
(WebCore::Chrome::createSearchPopupMenu): Ditto.
(WebCore::Chrome::didReceiveDocType): Ditto. Also made unconditional, but
empty for non-iOS platforms.
(WebCore::Chrome::registerPopupOpeningObserver): Take a reference.
(WebCore::Chrome::unregisterPopupOpeningObserver): Ditto.
* page/Chrome.h: Updated for the above.

* page/ChromeClient.h: Take references. Also updated some arguments from
Node to Element.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::handleContextMenuEvent): Take a reference.
(WebCore::ContextMenuController::showContextMenu): Ditto.
(WebCore::ContextMenuController::maybeCreateContextMenu): Ditto. Also use
make_unique instead of unique_ptr plus new.
(WebCore::openNewWindow): Ditto.
(WebCore::insertUnicodeCharacter): Ditto.
(WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
(WebCore::ContextMenuController::showContextMenuAt): Ditto.
(WebCore::ContextMenuController::showImageControlsMenu): Ditto.
* page/ContextMenuController.h: Updated for the above.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::fired): Pass a reference.

* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::PostMessageTimer): Take Ref&& instead of
PassRefPtr.
(WebCore::DOMWindow::adjustWindowRect): Use a reference.
(WebCore::DOMWindow::allowPopUp): Ditto. Also rewrite to use || instead
of successive if statements.
(WebCore::DOMWindow::canShowModalDialog): Ditto.
(WebCore::DOMWindow::DOMWindow): Ditto.
(WebCore::DOMWindow::didSecureTransitionTo): Ditto.
(WebCore::DOMWindow::registerProperty): Ditto.
(WebCore::DOMWindow::unregisterProperty): Ditto.
(WebCore::DOMWindow::postMessageTimerFired): Merge with the function
immediately followed, called only from here.
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck): Deleted.
(WebCore::DOMWindow::print): Pass a reference.
(WebCore::DOMWindow::alert): Ditto.
(WebCore::DOMWindow::confirm): Ditto.
(WebCore::DOMWindow::prompt): Ditto.
(WebCore::DOMWindow::setStatus): Ditto.
(WebCore::DOMWindow::setDefaultStatus): Ditto.
(WebCore::DOMWindow::moveBy): Ditto.
(WebCore::DOMWindow::moveTo): Ditto.
(WebCore::DOMWindow::resizeBy): Ditto.
(WebCore::DOMWindow::resizeTo): Ditto.
(WebCore::DOMWindow::clearTimeout): Ditto.
(WebCore::DOMWindow::incrementScrollEventListenersCount): Ditto.
(WebCore::DOMWindow::decrementScrollEventListenersCount): Ditto.
(WebCore::DOMWindow::showModalDialog): Ditto.
* page/DOMWindow.h: Updated for the above. ALso made functions private
and final.

* page/DOMWindowProperty.cpp:
(WebCore::DOMWindowProperty::DOMWindowProperty): Pass a reference.
(WebCore::DOMWindowProperty::~DOMWindowProperty): Ditto.
(WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame): Ditto.
(WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame): Ditto.

* page/DebugPageOverlays.cpp:
(WebCore::RegionOverlay::create): Return RefPtr instead of PassRefPtr.
(WebCore::RegionOverlay::~RegionOverlay): Pass a reference.
(WebCore::DebugPageOverlays::showRegionOverlay): Ditto.
(WebCore::DebugPageOverlays::hideRegionOverlay): Ditto.

* page/DragController.cpp:
(WebCore::DragController::dragExited): Pass a reference.
(WebCore::DragController::performDragOperation): Ditto.
(WebCore::DragController::concludeEditDrag): Ditto.
(WebCore::DragController::tryDHTMLDrag): Ditto.

* page/EventHandler.cpp: Replaced OptionalCursor with std::optional<Cursor>.
(WebCore::EventHandler::updateCursor): Refactor into two functions so we
can share more code with selectCursor.
(WebCore::EventHandler::selectCursor): Updated to use std::optional.
(WebCore::EventHandler::handleMouseMoveEvent): Use the new updateCursor.
(WebCore::EventHandler::startPanScrolling): Use a reference.
(WebCore::EventHandler::updateDragAndDrop): Ditto.
(WebCore::EventHandler::cancelDragAndDrop): Ditto.
(WebCore::EventHandler::performDragAndDrop): Ditto.
(WebCore::EventHandler::setCapturingMouseEventsElement): Take a raw pointer
instead of a PassRefPtr.
(WebCore::EventHandler::dispatchMouseEvent): Use a reference.
(WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
(WebCore::EventHandler::isKeyboardOptionTab): Ditto.
(WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult): Ditto.
(WebCore::EventHandler::tabsToLinks): Ditto.
* page/EventHandler.h: Updated for the above.

* page/FocusController.cpp:
(WebCore::FocusController::setFocusedFrame): Take pointer instead
of PassRefPtr.
(WebCore::FocusController::setFocusedElement): Take reference instead of
PassRefPtr.
* page/FocusController.h: Updated for the above changes.

* page/FrameTree.cpp:
(WebCore::FrameTree::transferChild): Deleted. Unused function.
(WebCore::FrameTree::appendChild): Merged with the following function
since it's now only used here. Take reference instead of PassRefPtr.
(WebCore::FrameTree::actuallyAppendChild): Deleted.
(WebCore::FrameTree::removeChild): Take reference instead of pointer.
Use move instead of trickier swap.
* page/FrameTree.h: Updated for the above.

* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize): Use a reference.
* page/MainFrame.cpp:
(WebCore::MainFrame::dropChildren): Ditto.
* page/Page.cpp:
(WebCore::Page::scrollingCoordinator): Ditto.
* page/PageOverlay.cpp:
(WebCore::PageOverlay::fadeAnimationTimerFired): Ditto.

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::installPageOverlay): Take reference
instead of PassRefPtr.
(WebCore::PageOverlayController::uninstallPageOverlay): Take reference
intead of pointer.
* page/PageOverlayController.h: Updated for the above.

* page/PageSerializer.cpp:
(WebCore::PageSerializer::PageSerializer): Moved most initialization to the
class definition.
(WebCore::PageSerializer::serialize): Use reference.
(WebCore::PageSerializer::serializeFrame): Use initializer list instead of
constructor for resource.
(WebCore::PageSerializer::serializeCSSStyleSheet): Ditto.
(WebCore::PageSerializer::addImageToResources): Ditto.
* page/PageSerializer.h: Removed constructors from PageSerializer::Resource
struct since structures don't really need them. Updated for the above.
Changed SerializerMarkupAccumulator into a nested class.

* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::startTimeCompareLessThan): Use const RefPtr&
instead of PassRefPtr to compare RefPtr in place.

* page/PerformanceUserTiming.cpp:
(WebCore::insertPerformanceEntry): Take Ref&& instead of PassRefPtr.

* page/ResourceUsageOverlay.cpp:
(WebCore::ResourceUsageOverlay::~ResourceUsageOverlay): Use refrence.
(WebCore::ResourceUsageOverlay::initialize): Ditto.

* page/animation/AnimationBase.h: Removed unneeded include.

* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::clear): Use reference.
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Ditto.
(WebCore::AnimationControllerPrivate::addEventToDispatch): Use the
append function instead of a hand-written alternative.
(WebCore::AnimationControllerPrivate::addElementChangeToDispatch):
Take a reference rather than a Ref&& since no caller is passing ownership.
* page/animation/AnimationControllerPrivate.h: Updated for the above.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Return RefPtr instead of PassRefPtr.
(WebCore::blendFilter): Ditto.
(WebCore::crossfadeBlend): Ditto.

* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions): Updated to use
animationForProperty, which returns a raw pointer.
(WebCore::CompositeAnimation::animationForProperty): Renamed from
getAnimationForProperty and changed to return raw pointer instead
of PassRefPtr.
* page/animation/CompositeAnimation.h: Updated for the above.

* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::onAnimationEnd): Use animationForProperty.
(WebCore::ImplicitAnimation::sendTransitionEvent): Pass reference.
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::sendAnimationEvent): Ditto.

* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::tabsToAllFormControls): Take reference.
(WebCore::EventHandler::createDraggingDataTransfer): Return Ref.
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::tabsToAllFormControls): Ditto.
(WebCore::EventHandler::createDraggingDataTransfer): Ditto.
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::tabsToAllFormControls): Ditto.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingDataTransfer): Ditto.
(WebCore::EventHandler::tabsToAllFormControls): Ditto.
(WebCore::EventHandler::platformPrepareForWheelEvents): Ditto.

* page/mac/ServicesOverlayController.h: Take Ref&& for ranges instead
of PassRefPtr. Use references.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::createForSelection): Ditto.
(WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber): Ditto.
(WebCore::ServicesOverlayController::Highlight::Highlight): Ditto.
(WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded): Ditto.
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights): Ditto.
(WebCore::ServicesOverlayController::buildSelectionHighlight): Ditto.
(WebCore::ServicesOverlayController::highlightsAreEquivalent): Ditto.
(WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight): Ditto.
(WebCore::ServicesOverlayController::handleClick): Ditto.

* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
Take a reference instead of PassRefPtr.
(WebCore::TextIndicatorWindow::setTextIndicator): Updated for the above.

* page/scrolling/AsyncScrollingCoordinator.h: Use Ref&& and RefPtr intead
of PsasRefPtr.

* page/scrolling/ScrollLatchingState.cpp:
(WebCore::ScrollLatchingState::ScrollLatchingState): Initialize data members
in class definition.
(WebCore::ScrollLatchingState::setWheelEventElement): Use raw pointer instead
of PassRefPtr.
(WebCore::ScrollLatchingState::setPreviousWheelScrolledElement): Use raw
pointer instead of RefPtr&&.
(WebCore::ScrollLatchingState::setScrollableContainer): Use raw pointer instead
of PassRefPtr.
* page/scrolling/ScrollLatchingState.h: Updated for the above.

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::cloneAndReset): Use Ref instead of PassRefPtr.
(WebCore::ScrollingStateNode::appendChild): Use Ref&& instead of PassRefPtr.
* page/scrolling/ScrollingStateNode.h: Updated for the above.

* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode): Use Ref instead of PassRefPtr.
(WebCore::ScrollingStateTree::attachNode): Updated for the abve.
(WebCore::ScrollingStateTree::commit): Ditto.
* page/scrolling/ScrollingStateTree.h: Ditto.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode): Use reference.
* page/scrolling/ScrollingTree.h: Return Ref instead of PassRefPtr.

* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::appendChild): Take Ref&& instead of PassRefPtr.
(WebCore::ScrollingTreeNode::removeChild): Take reference instead of pointer.
* page/scrolling/ScrollingTreeNode.h: Updated for the above.

* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::ThreadedScrollingTree): Take reference
instead of pointer.
* page/scrolling/ThreadedScrollingTree.h: Updated for the above.

* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS): Pass reference.

* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::create): Take a reference.
(WebCore::ScrollingTreeIOS::ScrollingTreeIOS): Ditto.
(WebCore::ScrollingTreeIOS::createScrollingTreeNode): Return Ref instead of
PassRefPtr.
* page/scrolling/ios/ScrollingTreeIOS.h: Updated for the above.

* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac): Use reference.

* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::create): Take a reference.
(ScrollingTreeMac::ScrollingTreeMac): Ditto.
(ScrollingTreeMac::createScrollingTreeNode): Return a Ref instead of a
PassRefPtr.
* page/scrolling/mac/ScrollingTreeMac.h: Updated for the above.

* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::tabsToAllFormControls): Take reference.
(WebCore::EventHandler::createDraggingDataTransfer): Return Ref.

* platform/Cursor.h: Rearranged the header a bit. Got rid of the explicit
copy constructor, assignment operator, and destructor. Using the ones
that the compiler automatically generates will work for all platforms and
we then also get move constructor and move assignment operator.

* platform/efl/CursorEfl.cpp:
(WebCore::Cursor::Cursor): Deleted.
(WebCore::Cursor::~Cursor): Deleted.
(WebCore::Cursor::operator=): Deleted.
* platform/gtk/CursorGtk.cpp:
(WebCore::Cursor::Cursor): Deleted.
(WebCore::Cursor::operator=): Deleted.
(WebCore::Cursor::~Cursor): Deleted.
* platform/mac/CursorMac.mm:
(WebCore::Cursor::Cursor): Deleted.
(WebCore::Cursor::operator=): Deleted.
(WebCore::Cursor::~Cursor): Deleted.
* platform/win/CursorWin.cpp:
(WebCore::SharedCursor::SharedCursor): Moved this here from the header
since it is only used within this file.
(WebCore::SharedCursor::create): Ditto.
(WebCore::Cursor::Cursor): Deleted.
(WebCore::Cursor::operator=): Deleted.
(WebCore::Cursor::~Cursor): Deleted.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
Pass reference.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking): Get to FrameView
through the render tree itself, rather than through the frame.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForHeader): Use reference.
(WebCore::RenderLayerCompositor::updateLayerForFooter): Ditto.
(WebCore::RenderLayerCompositor::attachRootLayer): Ditto.
(WebCore::RenderLayerCompositor::detachRootLayer): Ditto.
* rendering/RenderMenuList.cpp:
(RenderMenuList::showPopup): Ditto.
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::addSearchResult): Ditto.
(WebCore::RenderSearchField::showPopup): Ditto.
(WebCore::RenderSearchField::valueChanged): Ditto.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isKeyboardFocusable): Ditto.
* testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::installOverlay): Ditto.
(WebCore::MockPageOverlayClient::uninstallAllOverlays): Ditto.

Source/WebKit/ios:

* WebCoreSupport/WebChromeClientIOS.h: Update for changes to ChromeClient.
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::runJavaScriptAlert): Ditto.
(WebChromeClientIOS::runJavaScriptConfirm): Ditto.
(WebChromeClientIOS::runJavaScriptPrompt): Ditto.
(WebChromeClientIOS::setNeedsScrollNotifications): Ditto.
(WebChromeClientIOS::observedContentChange): Ditto.
(WebChromeClientIOS::clearContentChangeObservers): Ditto.
(WebChromeClientIOS::notifyRevealedSelectionByScrollingFrame): Ditto.
(WebChromeClientIOS::elementDidFocus): Ditto.
(WebChromeClientIOS::elementDidBlur): Ditto.
(WebChromeClientIOS::createPopupMenu): Ditto.
(WebChromeClientIOS::createSearchPopupMenu): Ditto.
(WebChromeClientIOS::attachRootGraphicsLayer): Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebApplicationCacheQuotaManager.mm:
(-[WebApplicationCacheQuotaManager quota]): Pass reference.

* WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedElementChanged): Ditto.
(WebChromeClient::createWindow): Ditto.
(WebChromeClient::runBeforeUnloadConfirmPanel): Ditto.
(WebChromeClient::runJavaScriptAlert): Ditto.
(WebChromeClient::runJavaScriptConfirm): Ditto.
(WebChromeClient::runJavaScriptPrompt): Ditto.
(WebChromeClient::contentsSizeChanged): Ditto.
(WebChromeClient::unavailablePluginButtonClicked): Ditto.
(WebChromeClient::print): Ditto.
(WebChromeClient::exceededDatabaseQuota): Ditto.
(WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.
(WebChromeClient::createColorChooser): Ditto.
(WebChromeClient::elementDidFocus): Ditto.
(WebChromeClient::elementDidBlur): Ditto.
(WebChromeClient::createPopupMenu): Ditto.
(WebChromeClient::createSearchPopupMenu): Ditto.
(WebChromeClient::attachRootGraphicsLayer): Ditto.
(WebChromeClient::attachViewOverlayGraphicsLayer): Ditto.
(WebChromeClient::supportsFullScreenForElement): Ditto.
(WebChromeClient::enterFullScreenForElement): Ditto.
(WebChromeClient::exitFullScreenForElement): Ditto.

* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
Updated for change to the appendChild function.

Source/WebKit/win:

* Plugins/PluginView.cpp:
(WebCore::PluginView::status): Pass reference.
(WebCore::PluginView::focusPluginElement): Ditto.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::createWindow): Updated for change to ChromeClient.
(WebChromeClient::runBeforeUnloadConfirmPanel): Ditto.
(WebChromeClient::runJavaScriptAlert): Ditto.
(WebChromeClient::runJavaScriptConfirm): Ditto.
(WebChromeClient::runJavaScriptPrompt): Ditto.
(WebChromeClient::contentsSizeChanged): Ditto.
(WebChromeClient::unavailablePluginButtonClicked): Ditto.
(WebChromeClient::print): Ditto.
(WebChromeClient::exceededDatabaseQuota): Ditto.
(WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.
(WebChromeClient::attachRootGraphicsLayer): Ditto.
(WebChromeClient::attachViewOverlayGraphicsLayer): Ditto.
(WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
(WebChromeClient::createPopupMenu): Ditto.
(WebChromeClient::createSearchPopupMenu): Ditto.
(WebChromeClient::supportsFullScreenForElement): Ditto.
(WebChromeClient::enterFullScreenForElement): Ditto.
(WebChromeClient::exitFullScreenForElement): Ditto.
(WebChromeClient::shouldUseTiledBackingForFrameView): Ditto.
* WebCoreSupport/WebChromeClient.h: Ditto.

Source/WebKit2:

* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode): Return a Ref
instead of PassRefPtr.
* UIProcess/Scrolling/RemoteScrollingTree.h: Updated for the above.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInstallPageOverlay): Pass a reference.
(WKBundlePageUninstallPageOverlay): Ditto.
(WKBundlePageInstallPageOverlayWithAnimation): Ditto.
(WKBundlePageUninstallPageOverlayWithAnimation): Ditto.
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::jsPDFDocPrint): Ditto.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::focusPluginElement): Ditto.
(WebKit::PluginView::setStatusbarText): Ditto.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::elementDidFocus): Updated for changes to ChromeClient.
(WebKit::WebChromeClient::elementDidBlur): Ditto.
(WebKit::WebChromeClient::makeFirstResponder): Ditto.
(WebKit::WebChromeClient::createWindow): Ditto.
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): Ditto.
(WebKit::WebChromeClient::runJavaScriptAlert): Ditto.
(WebKit::WebChromeClient::runJavaScriptConfirm): Ditto.
(WebKit::WebChromeClient::runJavaScriptPrompt): Ditto.
(WebKit::WebChromeClient::contentsSizeChanged): Ditto.
(WebKit::WebChromeClient::unavailablePluginButtonClicked): Ditto.
(WebKit::WebChromeClient::print): Ditto.
(WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.
(WebKit::WebChromeClient::createColorChooser): Ditto.
(WebKit::WebChromeClient::createPopupMenu): Ditto.
(WebKit::WebChromeClient::createSearchPopupMenu): Ditto.
(WebKit::WebChromeClient::attachRootGraphicsLayer): Ditto.
(WebKit::WebChromeClient::attachViewOverlayGraphicsLayer): Ditto.
(WebKit::WebChromeClient::createScrollingCoordinator): Ditto.
(WebKit::WebChromeClient::supportsFullScreenForElement): Ditto.
(WebKit::WebChromeClient::enterFullScreenForElement): Ditto.
(WebKit::WebChromeClient::exitFullScreenForElement): Ditto.
(WebKit::WebChromeClient::didAddHeaderLayer): Ditto.
(WebKit::WebChromeClient::didAddFooterLayer): Ditto.
(WebKit::WebChromeClient::shouldUseTiledBackingForFrameView): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::elementDidRefocus): Ditto.
(WebKit::WebChromeClient::didReceiveMobileDocType): Ditto.
(WebKit::WebChromeClient::observedContentChange): Ditto.
(WebKit::WebChromeClient::clearContentChangeObservers): Ditto.
(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame): Ditto.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage): Pass reference.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::~WebInspectorClient): Ditto.
(WebKit::WebInspectorClient::hideHighlight): Ditto.
(WebKit::WebInspectorClient::showPaintRect): Ditto.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll): Ditto.
(WebKit::FindController::hideFindUI): Ditto.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createWithCoreMainFrame): Return Ref instead of
PassRefPtr.
(WebKit::WebFrame::createSubframe): Ditto.
(WebKit::WebFrame::create): Ditto.
* WebProcess/WebPage/WebFrame.h: Updated for the above.

* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openInNewTab): Pass reference.

* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator): Use reference.
(WebKit::FindController::hideFindIndicator): Ditto.

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

3 years agoRebaseline WebKit1 results after r211006.
joepeck@webkit.org [Mon, 23 Jan 2017 06:21:07 +0000 (06:21 +0000)]
Rebaseline WebKit1 results after r211006.

Unreviewed test gardening.

* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:

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

3 years ago[Cocoa] Unify FontPlatformData's hashing and equality operators
mmaxfield@apple.com [Mon, 23 Jan 2017 03:52:39 +0000 (03:52 +0000)]
[Cocoa] Unify FontPlatformData's hashing and equality operators
https://bugs.webkit.org/show_bug.cgi?id=167061

Reviewed by Darin Adler.

On iOS, we were using CFEqual() and CFHash(), while on macOS
we were using pointer hashing and pointer equality. Instead,
we should be consistent about these operators.

Right now, FontPlatformData holds two internal CTFontRefs, and
switching to these higher-level CFEqual() and CFHash()
functions is required for eliminating one of these two
internal font objects.

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hash): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::platformIsEqual):
(WebCore::cascadeToLastResortAttributesDictionary):
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::hash):
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::hash):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::hash):
* platform/graphics/win/FontPlatformDataDirect2D.cpp:
(WebCore::FontPlatformData::hash):

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

3 years ago[WebGL] Do not allow GPU muxing on some old Mac hardware
dino@apple.com [Sun, 22 Jan 2017 18:51:09 +0000 (18:51 +0000)]
[WebGL] Do not allow GPU muxing on some old Mac hardware
https://bugs.webkit.org/show_bug.cgi?id=167259
<rdar://problem/30060378>

Reviewed by Simon Fraser and Darin Adler.

Some old Macbook Pro models should never use the
integrated GPU for WebGL, because they are unstable
when swapping between that and the discrete GPU.

Unfortunately this hardware configuration isn't in our
testing infrastructure, so it was confirmed manually.
Meanwhile, our existing tests make sure this patch
doesn't break anything elsewhere.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::attachToAppleGraphicsControl): Helper function
to get a mach port that talks to Apple's Graphics Control
system.
(WebCore::hasMuxCapability): Decides whether a system
can do live GPU switching, based on whether or not it
has a muxable GPU, and if that GPU is not the old hardware
we know is problematic.
(WebCore::hasMuxableGPU): Helper to return the static hasMuxCapability value.
(WebCore::setPixelFormat): Only request the integrated card when the
GPU is muxable.

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

3 years agoIntroducing the Platform Abstraction Layer (PAL)
mmaxfield@apple.com [Sun, 22 Jan 2017 17:24:51 +0000 (17:24 +0000)]
Introducing the Platform Abstraction Layer (PAL)
https://bugs.webkit.org/show_bug.cgi?id=143358

Reviewed by Alex Christensen.

.:

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/WebKitFS.cmake:

Source/WebCore:

In order to enforce layering and promote testability, WebCore/platform files
should be compiled in their own project. This new project can enforce layering
and can be tested with unit tests in addition to layout tests.

The name of this new project is the Platform Abstraction Layer, or "PAL."
This comprises of a new directory in WebCore which will be the destination
for files migrated from WebCore/platform. This new folder, and its associated
project, will maintain layering invariants. These invariants are enforced at
build-time by setting the #include path for PAL to not include the rest of
WebCore (which is the same layering enforcement mechanism for WTF). Files will
be migrated into this new target/directory piece-by-piece, and the migration
of a file will be performed as soon as it can be migrated without violating
layering.

Within WebCore, files should include PAL files using the convention
#include <pal/foo.h>. Symbols within PAL are placed within a new top-level
namespace, "PAL," and therefore when used should be referred to as PAL::Foo.

The first set of files to move into the new platform is the crypto/ subdirectory
because it is both simple but also includes platform-dependent files.

No new tests because there is no behavior change.

* CMakeLists.txt:
* Configurations/WebCore.xcconfig: Add PAL to the include path
* PAL/Configurations/Base.xcconfig: Added.
* PAL/Configurations/DebugRelease.xcconfig: Added.
* PAL/Configurations/PAL.xcconfig: Added. Sets up some PAL-specific
variables.
* PAL/Configurations/FeatureDefines.xcconfig: Added.
* PAL/Configurations/Version.xcconfig: Added.
* PAL/PAL.xcodeproj/project.pbxproj: Added. New project file.
* PAL/config.h: Added. Simplified from WebCore/config.h.
* PAL/pal/CMakeLists.txt: Added.
* PAL/pal/PlatformEfl.cmake: Added.
* PAL/pal/PlatformGTK.cmake: Added.
* PAL/pal/PlatformMac.cmake: Added.
* PAL/pal/PlatformWin.cmake: Added.
* PAL/pal/crypto/CryptoDigest.h: Renamed from Source/WebCore/platform/crypto/CryptoDigest.h.
* PAL/pal/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp: Renamed from Source/WebCore/platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp.
* PAL/pal/crypto/gcrypt/CryptoDigestGCrypt.cpp: Renamed from Source/WebCore/platform/crypto/gcrypt/CryptoDigestGCrypt.cpp.
* PAL/pal/crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/platform/crypto/gnutls/CryptoDigestGnuTLS.cpp.
* PAL/pal/crypto/win/CryptoDigestWin.cpp: Renamed from Source/WebCore/platform/crypto/win/CryptoDigestWin.cpp.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj: Create a project link so WebCore
knows that it needs to build PAL as a dependency.
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest): Update #include and namespace.
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest): Ditto.
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::cryptoDigestAlgorithm): Ditto.
(WebCore::signRSASSA_PKCS1_v1_5): Ditto.
(WebCore::verifyRSASSA_PKCS1_v1_5): Ditto.
* inspector/InspectorDOMAgent.cpp:
(WebCore::computeContentSecurityPolicySHA256Hash): Ditto.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::toCryptoDigestAlgorithm): Ditto.
(WebCore::ContentSecurityPolicy::findHashOfContentInPolicies): Ditto.
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::HostTLSCertificateSet::computeCertificateHash): Ditto.

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

3 years ago[GStreamer] Clear out m_appsinkCaps in AppendPipeline::appsinkCapsChanged() before...
zandobersek@gmail.com [Sun, 22 Jan 2017 08:29:30 +0000 (08:29 +0000)]
[GStreamer] Clear out m_appsinkCaps in AppendPipeline::appsinkCapsChanged() before using outPtr()
https://bugs.webkit.org/show_bug.cgi?id=167165

Reviewed by Carlos Garcia Campos.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsinkCapsChanged): Replace the gst_caps_replace() call
with a simple comparison and, in case the current appsink caps differ from the caps
on the sink's pad, move the reference to the latter into the m_appsinkCaps member
variable. This removes the use of GRefPtr<>::outPtr() which asserted in debug
configurations in the case of m_appsinkCaps not being null.

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

3 years agoREGRESSION (r210959): LayoutTest fast/mediastream/MediaStream-video-element-video...
commit-queue@webkit.org [Sun, 22 Jan 2017 06:44:49 +0000 (06:44 +0000)]
REGRESSION (r210959): LayoutTest fast/mediastream/MediaStream-video-element-video-tracks-disabled.html is failing
https://bugs.webkit.org/show_bug.cgi?id=167260

Unreviewed test gardening.

Since this test checks against a black frame as its expected output, we need to use the legacy
media controls so that there is no start button.

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

* fast/mediastream/MediaStream-video-element-video-tracks-disabled.html:
* platform/mac-wk2/TestExpectations:

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

3 years agoJavaScript for-of does not work on a lot of collection types (e.g. HTMLCollection)
cdumez@apple.com [Sun, 22 Jan 2017 05:48:28 +0000 (05:48 +0000)]
JavaScript for-of does not work on a lot of collection types (e.g. HTMLCollection)
https://bugs.webkit.org/show_bug.cgi?id=167091

Reviewed by Darin Adler.

Source/JavaScriptCore:

Update Array methods to throw a TypeError when (this === null || this === undefined)
instead of when (this == null). This is because (this == null) returns true for types
that masquerades as undefined (such as document.all) and this prevented use of the
Array API on such types. The specification only stays to use ToObject(), which throws
when the input is undefined or null.

The corresponding specification is at:
- https://www.ecma-international.org/ecma-262/7.0/index.html#sec-array.prototype.values
- https://www.ecma-international.org/ecma-262/7.0/index.html#sec-toobject

* builtins/ArrayPrototype.js:
(values):
(keys):
(entries):
(reduce):
(reduceRight):
(every):
(forEach):
(filter):
(map):
(some):
(fill):
(find):
(findIndex):
(includes):
(sort):
(concatSlowPath):
(copyWithin):

Source/WebCore:

As per the Web IDL specification [1], https://heycam.github.io/webidl/#es-iterator
an interface should get an iterator if it has:
- an indexed property getter and an integer-typed attribute named "length".

We now comply with this part of the Web IDL specification. This adds an iterator
to the following interfaces:
- AudioTrackList, ClientRectList, CSSRuleList, CSSStyleDeclaration, CSSValueList,
  MimeTypeArray, WebKitNamedFlowCollection, Plugin, PluginArray, DOMStringList,
  FileList, HTMLAllCollection, HTMLCollection, HTMLFormElement, HTMLOptionsCollection,
  HTMLSelectElement, MediaList, NamedNodeMap, SourceBufferList, StyleSheetList,
  TextTrackCueList, TextTrackList, TouchList, VideoTrackList, VTTRegionList.

As a result, it is now possible to use `for ... of` for those types.

Tests: fast/dom/FileList-iterator.html
       fast/dom/collection-iterators.html
       fast/dom/document-all-undefined.html
       fast/events/touch/ios/touchlist-iterator.html

* bindings/scripts/CodeGeneratorJS.pm:
(GetAttributeWithName):
(InterfaceNeedsIterator):
(GenerateImplementation):
(addIterableProperties):

LayoutTests:

* fast/dom/FileList-iterator-expected.txt: Added.
* fast/dom/FileList-iterator.html: Added.
* fast/dom/collection-iterators-expected.txt: Added.
* fast/dom/collection-iterators.html: Added.
* fast/events/touch/ios/touchlist-iterator-expected.txt: Added.
* fast/events/touch/ios/touchlist-iterator.html: Added.
Add layout test coverage for all types that gained an iterator.

* fast/dom/document-all-undefined-expected.txt: Added.
* fast/dom/document-all-undefined.html: Added.
Add layout test to cover the fact that HTMLAllCollection masquerades as
undefined, as per:
- https://html.spec.whatwg.org/multipage/obsolete.html#dom-document-all

* inspector/model/remote-object-get-properties-expected.txt:
Rebaseline now that there is an extra Symbol.iterator property.

* platform/wk2/TestExpectations:
Skip that requires beginDragWithFiles() as this is unimplemented in
WebKitTestRunner.

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

3 years agoinnerText should replace existing text node
cdumez@apple.com [Sun, 22 Jan 2017 05:19:17 +0000 (05:19 +0000)]
innerText should replace existing text node
https://bugs.webkit.org/show_bug.cgi?id=167116

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline existing test now that one more check is passing.

* web-platform-tests/innerText/setter-expected.txt:

Source/WebCore:

Update setInnerText() to use ContainerNode::replaceAllChildren()
instead of replaceChildrenWithText(). replaceAllChildren() is
implemented as per specification:
- https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute
- https://dom.spec.whatwg.org/#concept-node-replace-all

As a result, we now correctly remove existing children before
inserting the new one.

No new tests, updated existing one.

* editing/markup.cpp:
(WebCore::replaceChildrenWithText): Deleted.
* editing/markup.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerText):

LayoutTests:

* accessibility/mac/aria-liveregions-changedtext.html:
The text is using innerText and changed behavior now that we stopped
reusing the existing Text child. Code in RenderObject::willBeDestroyed()
is supposed to call AXObjectCache::childrenChanged(parent()) to fire
the AXLiveRegionChanged notification. However, it did not because the
parent renderer did not have an associated AccessibilityObject.

* fast/dom/HTMLElement/set-inner-outer-optimization.html:
Update existing test which expected the non spec-compliant Text child
optimization.

* fast/repaint/vertical-text-repaint-expected.txt:
* fast/repaint/vertical-text-repaint.html:
Update / rebaseline test. We now repaint each 80x80 rectangle instead of
only repainting the text rects because we remove the Text node then add
a new one instead of only updating the existing Text node's test. The
output looks exactly the same otherwise.

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

3 years agoAccessibilityRenderObject::textChanged() bypasses AXLiveRegionChanged notification...
cdumez@apple.com [Sun, 22 Jan 2017 02:29:15 +0000 (02:29 +0000)]
AccessibilityRenderObject::textChanged() bypasses AXLiveRegionChanged notification coalescing
https://bugs.webkit.org/show_bug.cgi?id=167286
<rdar://problem/30133211>

Reviewed by Ryosuke Niwa.

Source/WebCore:

AccessibilityRenderObject::textChanged() bypasses AXLiveRegionChanged notification
coalescing. This patch fixes the issue.

No new tests, updated existing test.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textChanged):

LayoutTests:

Update test to use a longer timer delay. When using this longer delay, we were getting 4
AXLiveRegionChanged notifications instead of the expected 2 because
AccessibilityRenderObject::textChanged() was bypassing AXLiveRegionChanged notification
coalescing.

* accessibility/mac/aria-multiple-liveregions-notification-expected.txt:
* accessibility/mac/aria-multiple-liveregions-notification.html:

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

3 years agoRemove -[WebFrame sendOrientationChangeEvent:] which is unused
simon.fraser@apple.com [Sun, 22 Jan 2017 02:16:33 +0000 (02:16 +0000)]
Remove -[WebFrame sendOrientationChangeEvent:] which is unused
https://bugs.webkit.org/show_bug.cgi?id=167276

Reviewed by Alex Christensen.

It was usurped by -deviceOrientationChanged in 2014.

* WebView/WebFrame.mm:
(-[WebFrame sendOrientationChangeEvent:]): Deleted.
* WebView/WebFramePrivate.h:

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

3 years agoRemove -[WebView _contentsSizeRespectingOverflow] which is no longer needed
simon.fraser@apple.com [Sun, 22 Jan 2017 01:52:24 +0000 (01:52 +0000)]
Remove -[WebView _contentsSizeRespectingOverflow] which is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=167271

Reviewed by Alex Christensen.

-_contentsSizeRespectingOverflow was added to try to make viewport sizing on iOS respect
overflow:hidden on the body (webkit.org/b/146924) but that was reverted (webkit.org/b/152803),

* WebView/WebView.mm:
(-[WebView _contentsSizeRespectingOverflow]): Deleted.
* WebView/WebViewPrivate.h:

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

3 years agoRemove the unused -[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnc...
simon.fraser@apple.com [Sun, 22 Jan 2017 01:52:04 +0000 (01:52 +0000)]
Remove the unused -[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]
https://bugs.webkit.org/show_bug.cgi?id=167273

Reviewed by Alex Christensen.

This function was added for an experiment, but is no longer used, so remove it.

* WebCoreSupport/WebFixedPositionContent.h:
* WebCoreSupport/WebFixedPositionContent.mm:
(anchorEdgeFlagsForAnchorEdge): Deleted.
(-[WebFixedPositionContent minimumOffsetFromFixedPositionLayersToAnchorEdge:ofRect:inLayer:]): Deleted.

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

3 years ago[JSC] export JSC::importModule API for WebCore dynamic import
utatane.tea@gmail.com [Sat, 21 Jan 2017 22:22:54 +0000 (22:22 +0000)]
[JSC] export JSC::importModule API for WebCore dynamic import
https://bugs.webkit.org/show_bug.cgi?id=167099

Reviewed by Darin Adler.

We newly expose JSC::importModule API. This can be used later
from WebCore to implement WebCore side dynamic import.
And JSC shell also uses this API.

And this patch also cleans up module loader a bit:
Dropping requestInstantiateAll.

* builtins/BuiltinNames.h:
* builtins/ModuleLoaderPrototype.js:
(requestLink):
(requestImportModule):
(requestInstantiateAll): Deleted.
(importModule): Deleted.
* jsc.cpp:
(GlobalObject::moduleLoaderImportModule):
* runtime/Completion.cpp:
(JSC::importModule):
* runtime/Completion.h:
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::requestImportModule):
* runtime/JSModuleLoader.h:
* runtime/ModuleLoaderPrototype.cpp:

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

3 years agodynamic import is ambiguous with import declaration at module code
utatane.tea@gmail.com [Sat, 21 Jan 2017 22:10:54 +0000 (22:10 +0000)]
dynamic import is ambiguous with import declaration at module code
https://bugs.webkit.org/show_bug.cgi?id=167098

Reviewed by Darin Adler.

JSTests:

* modules/import-call.js: Added.
(from.string_appeared_here.import.string_appeared_here.then):
* modules/import-call/main.js: Added.
* stress/import-syntax.js:
(async):

Source/JavaScriptCore:

This patch fixes two syntax issues related to dynamic import.

1. Fix member expression parsing with dynamic import results

We should not return import expression immediately after parsing
it in parseMemberExpression. This prohibits us to parse the following
code,

    import("...").then(function () {
    });

2. dynamic import with import declaration under the module context

Before this patch, we always attempt to parse IMPORT as import declaration
under the module context. It means that import call in the top level
expression statement fails to be parsed since the parser attempts to parse
it as import declaration.

    import("...")  // module top level statement.

In this patch, we check the condition `[lookahead != (]` before starting
parsing import declaration. This allows us to put import call in the module
top level statement.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseModuleSourceElements):
(JSC::Parser<LexerType>::parseMemberExpression):

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

3 years agoREGRESSION (r210959): LayoutTest inspector/css/pseudo-element-matches.html timing out
commit-queue@webkit.org [Sat, 21 Jan 2017 20:46:29 +0000 (20:46 +0000)]
REGRESSION (r210959): LayoutTest inspector/css/pseudo-element-matches.html timing out
https://bugs.webkit.org/show_bug.cgi?id=167246

Unreviewed test gardening.

This test expects elements with legacy media controls pseudo classes so we turn off
modern media controls for it and stop expecting a timeout.

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

* inspector/css/pseudo-element-matches.html:
* platform/mac/TestExpectations:

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

3 years agoUnreviewed. Bring back gtk-doc error messages after r209981.
carlosgc@webkit.org [Sat, 21 Jan 2017 10:21:33 +0000 (10:21 +0000)]
Unreviewed. Bring back gtk-doc error messages after r209981.

Since r209981, if gtk-doc shows warnings the build fails but those warnings are not printed to stdout so it's
impossible to know what's wrong.

* gtk/gtkdoc.py:
(GTKDoc._run_command): Make print_output True by default again and use debug instead of info to log "Running" messages.

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

3 years agoUnreviewed, rolling out r211012.
carlosgc@webkit.org [Sat, 21 Jan 2017 09:22:39 +0000 (09:22 +0000)]
Unreviewed, rolling out r211012.

It caused a lot of crashes in the network process

Reverted changeset:

"[SOUP] Custom protocols don't work in private browsing mode"
https://bugs.webkit.org/show_bug.cgi?id=167236
http://trac.webkit.org/changeset/211012

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

3 years agoRemove never changing IndexedDB RuntimeEnabledFeature
commit-queue@webkit.org [Sat, 21 Jan 2017 07:52:20 +0000 (07:52 +0000)]
Remove never changing IndexedDB RuntimeEnabledFeature
https://bugs.webkit.org/show_bug.cgi?id=167278

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-20
Reviewed by Darin Adler.

Source/WebCore:

This RuntimeEnabledFeature flag is always true and there are
no existing ways to change it. So lets just remove it.

* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBOpenDBRequest.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIndexedDBEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::indexedDBEnabled): Deleted.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

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

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

3 years ago[SOUP] Custom protocols don't work in private browsing mode
carlosgc@webkit.org [Sat, 21 Jan 2017 07:40:19 +0000 (07:40 +0000)]
[SOUP] Custom protocols don't work in private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=167236

Reviewed by Sergio Villar Senin.

Source/WebCore:

Add static method to set the global custom protocols request type and setup method to add the feature to the session.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):
(WebCore::SoupNetworkSession::setCustomProtocolRequestType):
(WebCore::SoupNetworkSession::setupCustomProtocols):
* platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

We only register them in the default session.

* NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::registerProtocolClass): Set the WEBKIT_TYPE_SOUP_REQUEST_GENERIC as type for
custom protocols, and setup custom protocols in all existing sessions.
(WebKit::CustomProtocolManager::registerScheme): Use g_type_class_peek instead of g_type_class_ref since we know
the class was already created in registerProtocolClass().

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

3 years agoUnreviewed, rebaseline html/dom/interfaces.html.
cdumez@apple.com [Sat, 21 Jan 2017 06:36:25 +0000 (06:36 +0000)]
Unreviewed, rebaseline html/dom/interfaces.html.

* web-platform-tests/html/dom/interfaces-expected.txt:

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

3 years agoWeb Inspector: Search Tab should display search results immediately when closing...
commit-queue@webkit.org [Sat, 21 Jan 2017 04:51:39 +0000 (04:51 +0000)]
Web Inspector: Search Tab should display search results immediately when closing and reopening Inspector
https://bugs.webkit.org/show_bug.cgi?id=167073

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

* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.focusSearchField):
Add parameter that will trigger a search with the current input value when true.

* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView):
(WebInspector.SearchTabContentView.prototype.focusSearchField):
(WebInspector.SearchTabContentView.prototype.initialLayout):

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

3 years ago[WebRTC] Update build system to make G711 optional in libwebrtc
commit-queue@webkit.org [Sat, 21 Jan 2017 02:36:03 +0000 (02:36 +0000)]
[WebRTC] Update build system to make G711 optional in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167256

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

Source/ThirdParty/libwebrtc:

* CMakeLists.txt: Updating to add compilation of generic pcm encoder functions.

Tools:

* Scripts/webkitpy/libwebrtc/generate_cmake.py:
(CMakeGenerator.remove_webrtc_g711): Adding a missing file to the build system as this file includes generic pcm encoder functions.

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

3 years agoRecord whether a media element was prevented from playing without user interaction
commit-queue@webkit.org [Sat, 21 Jan 2017 02:31:33 +0000 (02:31 +0000)]
Record whether a media element was prevented from playing without user interaction
https://bugs.webkit.org/show_bug.cgi?id=167214

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-20
Reviewed by Eric Carlson.

This state will be used to notify clients when a user explicitly starts playback
of a media element that was prevented from autoplaying.

Tests will be added after a WebKit callback API is added.

* WebCore.xcodeproj/project.pbxproj:
* dom/SuccessOr.h: Added.
(WebCore::SuccessOr::SuccessOr):
(WebCore::SuccessOr::operator bool):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::playInternal):
* html/HTMLMediaElement.h:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted):
* html/MediaElementSession.h:

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

3 years agoRequire a button press on a gamepad for them to be exposed to the DOM.
beidson@apple.com [Sat, 21 Jan 2017 02:24:17 +0000 (02:24 +0000)]
Require a button press on a gamepad for them to be exposed to the DOM.
<rdar://problem/28620919> and https://bugs.webkit.org/show_bug.cgi?id=167272

Reviewed by Alex Christensen.

Source/WebCore:

Test: gamepad/gamepad-visibility-1.html

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::platformGamepadInputActivity):
* Modules/gamepad/GamepadManager.h:

* platform/gamepad/GamepadProvider.cpp:
(WebCore::GamepadProvider::dispatchPlatformGamepadInputActivity):
* platform/gamepad/GamepadProvider.h:
(WebCore::GamepadProvider::~GamepadProvider): Deleted.
(WebCore::GamepadProvider::isMockGamepadProvider): Deleted.

* platform/gamepad/GamepadProviderClient.h:

* platform/gamepad/cocoa/GameControllerGamepad.h:
* platform/gamepad/cocoa/GameControllerGamepad.mm:
(WebCore::GameControllerGamepad::setupAsExtendedGamepad):
(WebCore::GameControllerGamepad::setupAsGamepad):

* platform/gamepad/cocoa/GameControllerGamepadProvider.h:
* platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
(WebCore::GameControllerGamepadProvider::gamepadHadInput):
(WebCore::GameControllerGamepadProvider::inputNotificationTimerFired):

* platform/gamepad/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::valueChanged):
* platform/gamepad/mac/HIDGamepad.h:

* platform/gamepad/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::valuesChanged):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
* platform/gamepad/mac/HIDGamepadProvider.h:

* testing/MockGamepadProvider.cpp:
(WebCore::MockGamepadProvider::setMockGamepadButtonValue):
(WebCore::MockGamepadProvider::gamepadInputActivity):
* testing/MockGamepadProvider.h:

Source/WebKit2:

* UIProcess/Gamepad/UIGamepadProvider.cpp:
(WebKit::UIGamepadProvider::gamepadSyncTimerFired):
(WebKit::UIGamepadProvider::platformGamepadInputActivity):
* UIProcess/Gamepad/UIGamepadProvider.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::gamepadActivity):
* UIProcess/WebPageProxy.h:

* WebProcess/Gamepad/WebGamepadProvider.cpp:
(WebKit::WebGamepadProvider::gamepadActivity):
* WebProcess/Gamepad/WebGamepadProvider.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::gamepadActivity):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

LayoutTests:

* gamepad/gamepad-visibility-1-expected.txt: Added.
* gamepad/gamepad-visibility-1.html: Added.

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

3 years agoCleanup RuntimeEnabledFeatures
joepeck@webkit.org [Sat, 21 Jan 2017 02:23:47 +0000 (02:23 +0000)]
Cleanup RuntimeEnabledFeatures
https://bugs.webkit.org/show_bug.cgi?id=167228

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/resource-timing/resource_cached-expected.txt:
* web-platform-tests/resource-timing/resource_connection_reuse-expected.txt:
* web-platform-tests/resource-timing/resource_dynamic_insertion-expected.txt:
The previous internals API didn't appear to be working. Making it work
improved these results.

Source/WebCore:

RuntimeEnabledFeatures::reset() is bad for tests. It was getting called
after the TestRunners had set up all the Settings and RuntimeEnabledFeatures
they expected, so it was clearing the "consistent state" set by TestRunners.

Cleanup within RuntimeEnabledFeatures:

  - Initialize all members.
  - Remove unused features.
  - Remove reset() no longer used.
  - Document features that do not change (potentially removable).
  - Document features that are not used but have APIs (use or remove later).
  - Drop webkit prefix for these internal only apis.
  - Move things around a bit to make it more readable.
  - Enable the Fetch API by default (WebKit levels all were enabling it).

Cleanup within Internals:

  - Move all RuntimeEnabledFeature toggling to InternalSettings
  - Save and restore these RuntimeEnabledFeatures in InternalSettings

* Modules/mediastream/MediaStreamEvent.idl:
* Modules/mediastream/NavigatorMediaDevices.idl:
* Modules/mediastream/NavigatorUserMedia.idl:
* Modules/mediastream/RTCDTMFToneChangeEvent.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/RTCRtpTransceiver.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCTrackEvent.idl:
Canonical usage is to start with a capital letter.

* dom/EventNames.in:
No port has API/SPI to disable this feature at runtime and the default is
to have the feature enabled, so this is no different from the runtime flag.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
These features were always enabled and not toggleable. So drop the runtime
feature check.

* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Deleted.
Nobody calls this method. Drop it.

* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::reset):
(WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled): Deleted.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLinkPreloadEnabled):
(WebCore::RuntimeEnabledFeatures::linkPreloadEnabled):
(WebCore::RuntimeEnabledFeatures::setResourceTimingEnabled):
(WebCore::RuntimeEnabledFeatures::resourceTimingEnabled):
(WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::setInputEventsEnabled):
(WebCore::RuntimeEnabledFeatures::inputEventsEnabled):
(WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled):
(WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled):
(WebCore::RuntimeEnabledFeatures::setCustomElementsEnabled):
(WebCore::RuntimeEnabledFeatures::customElementsEnabled):
(WebCore::RuntimeEnabledFeatures::setModernMediaControlsEnabled):
(WebCore::RuntimeEnabledFeatures::modernMediaControlsEnabled):
(WebCore::RuntimeEnabledFeatures::setIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::localStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::sessionStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::applicationCacheEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::touchEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setTouchEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceMotionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled): Deleted.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
(WebCore::InternalSettings::setResourceTimingEnabled):
(WebCore::InternalSettings::setLinkPreloadEnabled):
(WebCore::InternalSettings::setCSSGridLayoutEnabled):
(WebCore::InternalSettings::setWebGL2Enabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::setLinkPreloadSupport): Deleted.
(WebCore::Internals::setCSSGridLayoutEnabled): Deleted.
(WebCore::Internals::webGL2Enabled): Deleted.
(WebCore::Internals::setWebGL2Enabled): Deleted.
(WebCore::Internals::setResourceTimingSupport): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
Move toggling of RuntimeEnabledFeatures to InternalSettings and
properly remember to save and restore them in Internals.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

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

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
(setWebPreferencesForTestOptions):
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
More closely match WebKitTestRunner initialization of preferences
for experimental features.

LayoutTests:

Update tests that toggle runtime enabled features to use
consistently named internals.settings.setFooEnabled setters.

* css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html:
* fast/canvas/webgl/bufferData-offset-length.html:
* fast/canvas/webgl/copyBufferSubData.html:
* fast/canvas/webgl/getBufferSubData-webgl1.html:
* fast/canvas/webgl/webgl2-buffer-targets.html:
* fast/canvas/webgl/webgl2-buffers.html:
* fast/canvas/webgl/webgl2-context-creation.html:
* fast/canvas/webgl/webgl2-runtime-flag.html:
* fast/canvas/webgl/webgl2-texStorage.html:
* fast/canvas/webgl/webgl2-texture-upload-enums.html:
* fast/css-grid-layout/grid-disable.html:
* fast/css/ensure-flexbox-compatibility-with-initial-values.html:
* fast/dom/Window/window-properties-performance-resource-timing.html:
* http/tests/fetch/redirectmode-and-preload.html:
* http/tests/misc/resource-timing-resolution.html:
* 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/delaying_onload_link_preload_after_discovery.html:
* http/tests/preload/delaying_onload_link_preload_after_discovery_image.html:
* http/tests/preload/download_resources.html:
* http/tests/preload/download_resources_from_header_iframe.html:
* http/tests/preload/download_resources_from_invalid_headers.html:
* http/tests/preload/dynamic_adding_preload.html:
* http/tests/preload/dynamic_remove_preload_href.html:
* http/tests/preload/not_delaying_window_onload_before_discovery.html:
* http/tests/preload/onerror_event.html:
* http/tests/preload/onload_event.html:
* http/tests/preload/resources/download_resources_from_header.php:
* http/tests/preload/resources/invalid_resources_from_header.php:
* http/tests/preload/single_download_preload_runner.html:
* http/tests/security/cached-cross-origin-preloading-css-stylesheet.html:
* resources/testharnessreport.js:

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

3 years ago[WebRTC] Update libwertc AudioRtpSender::SetAudioSend
commit-queue@webkit.org [Sat, 21 Jan 2017 01:21:11 +0000 (01:21 +0000)]
[WebRTC] Update libwertc AudioRtpSender::SetAudioSend
https://bugs.webkit.org/show_bug.cgi?id=167243

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

Introducing  WEBRTC_WEBKIT_BUILD macro to match existing WEBRTC_CHROMIUM_BUILD.
WEBRTC_WEBKIT_BUILD is defined by current WebKit libwebrtc build system.

* Source/webrtc/api/rtpsender.cc:

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

3 years agoREGRESSION (r210941): LayoutTest scrollingcoordinator/ios/sync-layer-positions-after...
megan_gardner@apple.com [Sat, 21 Jan 2017 01:05:45 +0000 (01:05 +0000)]
REGRESSION (r210941): LayoutTest scrollingcoordinator/ios/sync-layer-positions-after-scroll.html failing
https://bugs.webkit.org/show_bug.cgi?id=167262

Updating Tests to comply with change in bug 167171.
Change is correct, but causes the results for this test to be different.

Unreviewed test gardening.

* scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt:

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

3 years agoAdd debugging code to compare URLParser with URL::parse
achristensen@apple.com [Sat, 21 Jan 2017 00:44:48 +0000 (00:44 +0000)]
Add debugging code to compare URLParser with URL::parse
https://bugs.webkit.org/show_bug.cgi?id=167267

Reviewed by Brady Eidson.

* platform/URLParser.cpp:
(WebCore::URLParser::URLParser):
(WebCore::URLParser::parse):

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

3 years agoMarking media/modern-media-controls/media-controller/media-controller-auto-hide-mouse...
ryanhaddad@apple.com [Sat, 21 Jan 2017 00:35:51 +0000 (00:35 +0000)]
Marking media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167266

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMarking inspector/network/client-blocked-load.html as a flaky timeout.
ryanhaddad@apple.com [Sat, 21 Jan 2017 00:28:14 +0000 (00:28 +0000)]
Marking inspector/network/client-blocked-load.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=167265

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoUnreviewed, rolling out r210778.
ryanhaddad@apple.com [Sat, 21 Jan 2017 00:21:29 +0000 (00:21 +0000)]
Unreviewed, rolling out r210778.

This change caused multiple LayoutTests to crash.

Reverted changeset:

"[Cocoa] Unify FontPlatformData's hashing and equality
operators"
https://bugs.webkit.org/show_bug.cgi?id=167061
http://trac.webkit.org/changeset/210778

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

3 years agoMarking media/modern-media-controls/pip-support/pip-support-enabled.html as crashing...
ryanhaddad@apple.com [Sat, 21 Jan 2017 00:08:03 +0000 (00:08 +0000)]
Marking media/modern-media-controls/pip-support/pip-support-enabled.html as crashing on macOS WK1.
https://bugs.webkit.org/show_bug.cgi?id=164336

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoMore media test gardening.
ryanhaddad@apple.com [Sat, 21 Jan 2017 00:00:37 +0000 (00:00 +0000)]
More media test gardening.

Unreviewed test gardening.

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

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

3 years agoBuild Fix for Windows DumpRenderTree after r210976
achristensen@apple.com [Fri, 20 Jan 2017 23:33:23 +0000 (23:33 +0000)]
Build Fix for Windows DumpRenderTree after r210976
https://bugs.webkit.org/show_bug.cgi?id=167115

Source/WebKit/win:

* WebPreferences.h:
Remove extra space.
* IWebPreferencesPrivate.idl:
Add new interface functions.
* WebView.cpp:
We use new functions that are only in IWebPreferencesPrivate4,
so instantiate that COM object instead of version 3.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):

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

3 years agoRemove outdated ENABLE(CSP_NEXT) build flag
commit-queue@webkit.org [Fri, 20 Jan 2017 23:23:56 +0000 (23:23 +0000)]
Remove outdated ENABLE(CSP_NEXT) build flag
https://bugs.webkit.org/show_bug.cgi?id=167252

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-20
Reviewed by Brent Fulgham.

.:

* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* dom/Document.idl:
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::reset):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled): Deleted.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Deleted.
* page/csp/ContentSecurityPolicy.h:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

* fast/dom/event-handler-attributes.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics.html:

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

3 years agoBuild Fix for Windows DumpRenderTree after r210976
joepeck@webkit.org [Fri, 20 Jan 2017 22:54:49 +0000 (22:54 +0000)]
Build Fix for Windows DumpRenderTree after r210976

Source/WebKit/win:

* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setWebAnimationsEnabled):
(WebPreferences::webAnimationsEnabled):
* WebPreferences.h:
* WebView.cpp:
Add toggle APIs for WebAnimations.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):

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

3 years agoCleaning up TestExpectations for inspector/css/pseudo-element-matches.html.
ryanhaddad@apple.com [Fri, 20 Jan 2017 22:53:19 +0000 (22:53 +0000)]
Cleaning up TestExpectations for inspector/css/pseudo-element-matches.html.

Unreviewed test gardening.

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

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

3 years agoMarking media/modern-media-controls/audio/audio-controls-metrics.html as failing...
ryanhaddad@apple.com [Fri, 20 Jan 2017 22:48:31 +0000 (22:48 +0000)]
Marking media/modern-media-controls/audio/audio-controls-metrics.html as failing on iOS.
https://bugs.webkit.org/show_bug.cgi?id=167258

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoBuild fix after r210783. Didn't mean to require custom elements API.
rniwa@webkit.org [Fri, 20 Jan 2017 22:40:01 +0000 (22:40 +0000)]
Build fix after r210783. Didn't mean to require custom elements API.

* public/v3/main.js:
(main):

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

3 years ago[WebRTC] libwebrtc headers are incompatible with WebKit compilation flags
commit-queue@webkit.org [Fri, 20 Jan 2017 22:30:24 +0000 (22:30 +0000)]
[WebRTC] libwebrtc headers are incompatible with WebKit compilation flags
https://bugs.webkit.org/show_bug.cgi?id=167242

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

WebKit is enforcing -Wunused-parameter and -Wunused-variable which conflict with some included libwertc headers.
Removed unused parameter names for inlined functions.

* Source/webrtc/api/jsep.h:
(webrtc::SessionDescriptionInterface::RemoveCandidates):
* Source/webrtc/api/mediastreaminterface.h:
(webrtc::AudioSourceInterface::SetVolume):
(webrtc::AudioSourceInterface::RegisterAudioObserver):
(webrtc::AudioSourceInterface::UnregisterAudioObserver):
(webrtc::AudioSourceInterface::AddSink):
(webrtc::AudioSourceInterface::RemoveSink):
(webrtc::AudioTrackInterface::GetSignalLevel):
* Source/webrtc/api/peerconnectionfactory.h:
* Source/webrtc/api/peerconnectioninterface.h:
(webrtc::MetricsObserverInterface::IncrementEnumCounter):
(webrtc::PeerConnectionInterface::AddTrack):
(webrtc::PeerConnectionInterface::RemoveTrack):
(webrtc::PeerConnectionInterface::CreateSender):
(webrtc::PeerConnectionInterface::GetStats):
(webrtc::PeerConnectionInterface::CreateOffer):
(webrtc::PeerConnectionInterface::CreateAnswer):
(webrtc::PeerConnectionInterface::UpdateIce):
(webrtc::PeerConnectionInterface::SetConfiguration):
(webrtc::PeerConnectionInterface::RemoveIceCandidates):
(webrtc::PeerConnectionInterface::StartRtcEventLog):
(webrtc::PeerConnectionObserver::OnAddStream):
(webrtc::PeerConnectionObserver::OnRemoveStream):
(webrtc::PeerConnectionObserver::OnDataChannel):
(webrtc::PeerConnectionObserver::OnIceCandidatesRemoved):
(webrtc::PeerConnectionObserver::OnIceConnectionReceivingChange):
* Source/webrtc/api/rtpsender.cc:
* Source/webrtc/base/messagehandler.h:
(rtc::FunctorMessageHandler::OnMessage):
* Source/webrtc/base/sanitizer.h:
(rtc_AsanPoison):
(rtc_AsanUnpoison):
(rtc_MsanMarkUninitialized):
(rtc_MsanCheckInitialized):
* Source/webrtc/base/stream.h:
(rtc::StreamInterface::ConsumeReadData):
(rtc::StreamInterface::ConsumeWriteBuffer):
* Source/webrtc/media/base/mediachannel.h:
(cricket::DataMediaChannel::GetStats):
(cricket::DataMediaChannel::OnNetworkRouteChanged):
* Source/webrtc/media/engine/webrtcvideodecoderfactory.h:
(cricket::WebRtcVideoDecoderFactory::CreateVideoDecoderWithParams):
* Source/webrtc/media/engine/webrtcvideoencoderfactory.h:
(cricket::WebRtcVideoEncoderFactory::VideoCodec::VideoCodec):
(cricket::WebRtcVideoEncoderFactory::EncoderTypeHasInternalSource):
* Source/webrtc/media/engine/webrtcvideoengine2.cc:
* Source/webrtc/modules/include/module.h:
(webrtc::Module::ProcessThreadAttached):
* Source/webrtc/modules/video_coding/codecs/vp9/vp9_noop.cc:
* Source/webrtc/p2p/base/port.h:
(cricket::Port::HandleIncomingPacket):
(cricket::Port::HandleConnectionDestroyed):
(cricket::Connection::set_receiving_timeout):
* Source/webrtc/p2p/base/stun.h:
(cricket::StunAttribute::SetOwner):
* Source/webrtc/p2p/base/stunrequest.h:
(cricket::StunRequest::Prepare):
(cricket::StunRequest::OnResponse):
(cricket::StunRequest::OnErrorResponse):
* Source/webrtc/p2p/base/transport.h:
(cricket::Transport::SetLocalCertificate):
(cricket::Transport::GetLocalCertificate):
(cricket::Transport::GetSslRole):
(cricket::Transport::SetSslMaxProtocolVersion):
* Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc:
* Source/webrtc/typedefs.h:

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

3 years agoMarking media/modern-media-controls/media-controller/media-controller-auto-hide-mouse...
ryanhaddad@apple.com [Fri, 20 Jan 2017 22:19:40 +0000 (22:19 +0000)]
Marking media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167254

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoSimple line layout: Add support for non-breaking space character.
zalan@apple.com [Fri, 20 Jan 2017 22:12:02 +0000 (22:12 +0000)]
Simple line layout: Add support for non-breaking space character.
https://bugs.webkit.org/show_bug.cgi?id=167250
<rdar://problem/30119638>

Reviewed by Antti Koivisto.
Source/WebCore:

Do not bail out on noBreakSpace character.
The line breaking logic already takes noBreakSpace characters into account.
(except the peculiar "-webkit-nbsp-mode: space" mode)

Covered by existing test cases.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::printReason):

LayoutTests:

These are output progressions (they do not reflect changes in functionality).

* fast/block/float/br-with-clear-2-expected.txt:
* platform/mac/css1/text_properties/text_transform-expected.txt:
* platform/mac/tables/mozilla/bugs/bug4427-expected.txt:

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

3 years agoMarking macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-conta...
ryanhaddad@apple.com [Fri, 20 Jan 2017 22:07:28 +0000 (22:07 +0000)]
Marking macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=167253

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoMarking inspector/css/pseudo-element-matches.html as a timeout on macOS.
ryanhaddad@apple.com [Fri, 20 Jan 2017 22:07:26 +0000 (22:07 +0000)]
Marking inspector/css/pseudo-element-matches.html as a timeout on macOS.
https://bugs.webkit.org/show_bug.cgi?id=167246

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMake sync-commits.py robust against missing Subversion authors and missing parent...
rniwa@webkit.org [Fri, 20 Jan 2017 22:04:23 +0000 (22:04 +0000)]
Make sync-commits.py robust against missing Subversion authors and missing parent Git commits
https://bugs.webkit.org/show_bug.cgi?id=167231

Reviewed by Antti Koivisto.

Fixed a bug that a subversion commit that's missing author name (anonymous commit) results in an out of bound
exception, and a bug that syncing a git repository starts failing once there was a merge commit which pulled
in a commit data earlier than that of the last reported commit.

For the latter fix, added --max-ancestor-fetch-count to specify the number of maximum commits to look back.

* tools/sync-commits.py:
(main): Added --max-ancestor-fetch-count.
(Repository.fetch_commits_and_submit): If submit_commits fails with FailedToFindParentCommit, fetch the parent
commit's information until we've resolved them all.
(Repository.fetch_next_commit): Renamed from fetch_commit.
(SVNRepository.fetch_next_commit): Renamed from fetch_commit. Don't try to get the author name if it's missing
due to an anonymous commit. It's important to never include the "author" field in the JSON submitted to
a dashboard since it rejects when "author" field is not an array (e.g. null).
(GitRepository.fetch_next_commit): Renamed from fetch_commit.
(GitRepository.fetch_commit): Added. Fetches the commit information for a given git hash. Used to retrieve
missing parent commits.
(GitRepository._revision_from_tokens): Extracted from fetch_commit.

* tools/util.py:
(submit_commits): Optionally takes status_to_accept to avoid throwing in the case of FailedToFindParentCommit
and returns the response JSON.

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

3 years agoREGRESSION(r198234): /api/commits/%revision% always fails
rniwa@webkit.org [Fri, 20 Jan 2017 22:02:09 +0000 (22:02 +0000)]
REGRESSION(r198234): /api/commits/%revision% always fails
https://bugs.webkit.org/show_bug.cgi?id=167235

Reviewed by Antti Koivisto.

The bug was caused by a typo in CommitLogFetcher::fetch_revision, which was calling commit_for_revision on
$this->db instead of $this. This had been monkey-patched in the internal dashboard so it was working there.

Also fixed a bug that /latest wasn't doing what it claimed to do, and a bug that /oldest /latest,
and /last-reported would return a commit with all values set to null instead of an empty list.

Finally, added server API tests for /api/commits.

* public/api/commits.php:
(main): Add a comment for APIs that only exist for v2 UI.

* public/include/commit-log-fetcher.php:
(CommitLogFetcher::fetch_latest): Fixed the bug that this function was returning the oldest commit, not the
the latest commit as desired.
(CommitLogFetcher::fetch_revision): Fixed the bug that this function would always encounter an exception
because commit_for_revision is defined on $this, not $this->db.
(CommitLogFetcher::format_single_commit): Return an empty list instead of an array with a single commit with
all values set to null.

* server-tests/api-commits.js: Added. Added tests for the JSON API at /api/commits.
(.assertCommitIsSameAsOneSubmitted): Added. A helper function to compare a commit returned by /api/commits
to one sent to /api/report-commits.

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

3 years agoFix Mac CMake build.
achristensen@apple.com [Fri, 20 Jan 2017 21:50:26 +0000 (21:50 +0000)]
Fix Mac CMake build.

* CMakeLists.txt:
* PlatformMac.cmake:

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

3 years agoMarking media/modern-media-controls/placard-support/placard-support-airplay.html...
ryanhaddad@apple.com [Fri, 20 Jan 2017 21:35:09 +0000 (21:35 +0000)]
Marking media/modern-media-controls/placard-support/placard-support-airplay.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=164298

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMarking media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside...
ryanhaddad@apple.com [Fri, 20 Jan 2017 21:35:07 +0000 (21:35 +0000)]
Marking media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=165290

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years ago[WebRTC] Update libwertc AudioRtpSender::SetAudioSend
commit-queue@webkit.org [Fri, 20 Jan 2017 21:25:08 +0000 (21:25 +0000)]
[WebRTC] Update libwertc AudioRtpSender::SetAudioSend
https://bugs.webkit.org/show_bug.cgi?id=167243

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

Introducing  WEBRTC_WEBKIT_BUILD macro to match existing WEBRTC_CHROMIUM_BUILD.
WEBRTC_WEBKIT_BUILD is defined by current WebKit libwebrtc build system.

* Source/webrtc/api/rtpsender.cc:

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

3 years agoWeb Animations should be off by default and enabled as an experimental feature
commit-queue@webkit.org [Fri, 20 Jan 2017 21:04:24 +0000 (21:04 +0000)]
Web Animations should be off by default and enabled as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=167115
<rdar://problem/30048963>

Patch by Antoine Quint <graouts@apple.com> on 2017-01-20
Reviewed by Joseph Pecoraro.

Source/WebCore:

Conditionalize the existing parts of the Web Animations API so that they may be
toggled at runtime.

* animation/Animatable.idl:
* animation/AnimationEffect.idl:
* animation/AnimationTimeline.idl:
* animation/DocumentAnimation.idl:
* animation/DocumentTimeline.idl:
* animation/KeyframeEffect.idl:
* animation/WebAnimation.idl:
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::reset):
* page/RuntimeEnabledFeatures.h:

Source/WebKit2:

Promote, or relegate depending on how you see things, the Web Animations preference
to an experimental feature.

* Shared/WebPreferencesDefinitions.h:

Tools:

Turn Web Animations on in DRT.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):

Websites/webkit.org:

Add a test for Web Animations feature detection.

* experimental-features.html:

LayoutTests:

No need for an explicit preference anymore.

* webanimations/script-tests/Document.js:

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

3 years agoSkipping pointer-lock tests on macOS WK2.
ryanhaddad@apple.com [Fri, 20 Jan 2017 20:44:47 +0000 (20:44 +0000)]
Skipping pointer-lock tests on macOS WK2.
https://bugs.webkit.org/show_bug.cgi?id=167246

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years ago[WebRTC] libwebrtc H.264 codec is using VTB only for IOS
commit-queue@webkit.org [Fri, 20 Jan 2017 19:41:55 +0000 (19:41 +0000)]
[WebRTC] libwebrtc H.264 codec is using VTB only for IOS
https://bugs.webkit.org/show_bug.cgi?id=167245

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

* Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc: Removing WEBRTC_IOS flag.

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

3 years ago[WebRTC] Add libwebrtc build infrastructure
commit-queue@webkit.org [Fri, 20 Jan 2017 18:43:44 +0000 (18:43 +0000)]
[WebRTC] Add libwebrtc build infrastructure
https://bugs.webkit.org/show_bug.cgi?id=167207

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

.:

* WebKit.xcworkspace/contents.xcworkspacedata:

Source/ThirdParty:

Checking-in files used for building libwebrtc.
The principle is the following:
- Select a revision of libwebrtc
- Ask libwebrtc build system to generate the project.json (something like gn gen --ide json ...)
- Copy project.json here and the libwebrtc selected revision in a libwebrtc/libwebrtc folder.
- Call Tools/Scripts/generate-libwebrtc-cmake which will update CMakeLists.txt
- Build libwebrtc with CMake

* libwebrtc/CMakeLists.txt: Added (Generated by Tools/Scripts/generate-libwebrtc-cmake using project.json as input).
* libwebrtc/Makefile: Added.
* libwebrtc/WebKit/project.json: Added (Generated by libwebrtc build system).
* libwebrtc/WebKit/rtc_sdk_framework_objc_info_plist.plist: Added.
* libwebrtc/libwebrtc.xcodeproj/project.pbxproj: Added.

Tools:

Adding a script doing the libwebrtc project json to CMake file conversion.

* Scripts/generate-libwebrtc-cmake: Added.
* Scripts/webkitpy/libwebrtc/__init__.py: Added.
* Scripts/webkitpy/libwebrtc/generate_cmake.py: Added.

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

3 years agoUnreviewed, unskip innerText/ folder in ImportExpectations
cdumez@apple.com [Fri, 20 Jan 2017 18:21:35 +0000 (18:21 +0000)]
Unreviewed, unskip innerText/ folder in ImportExpectations

This is needed so that the tests in this folder gets re-sync'ed
from upstream next time.

* resources/ImportExpectations:

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

3 years agoWe should flash a safepoint before each DFG/FTL phase
sbarati@apple.com [Fri, 20 Jan 2017 18:10:55 +0000 (18:10 +0000)]
We should flash a safepoint before each DFG/FTL phase
https://bugs.webkit.org/show_bug.cgi?id=167234

Reviewed by Filip Pizlo.

The recent GC changes caused us to regress Kraken because of a
longstanding issue that happened to be hit with higher frequency because
of a change in timing between when a particular GC was happening and
when a particular FTL compilation was happening. The regression is caused
by the GC was waiting for a large function to make it through the DFG portion
of an FTL compilation. This was taking 20ms-30ms and started happened during a
particular test with much higher frequency.

This means that anytime the GC waits for this compilation, the test ran at least
~20ms slower because the GC waits for the compiler threads the mutator is stopped.

It's good that we have such an easily reproducible case of this performance
issue because it will effect many real JS programs, especially ones with
large functions that get hot.

The most straight forward solution to fix this is to flash a safepoint before
each phase, allowing the GC to suspend the compiler if needed. In my testing,
this progresses Kraken in the browser, and doesn't regress anything else. This
solution also makes the most sense. I did some analysis on the compilation time
of this function that took ~20-30ms to pass through the DFG phases, and
the phase times were mostly evenly distributed. Some took longer than others,
but no phase was longer than 3ms. Most were in the 0.25ms to 1.5ms range.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGSafepoint.cpp:
(JSC::DFG::Safepoint::begin):
* runtime/Options.h:

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

3 years agoMini Browser: Show tooltip for Experimental Features
commit-queue@webkit.org [Fri, 20 Jan 2017 17:59:22 +0000 (17:59 +0000)]
Mini Browser: Show tooltip for Experimental Features
https://bugs.webkit.org/show_bug.cgi?id=167225

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-20
Reviewed by Alex Christensen.

* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
Include the full details string as a tooltip.

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

3 years ago[Win] Test output results should not be written twice.
pvollan@apple.com [Fri, 20 Jan 2017 17:50:22 +0000 (17:50 +0000)]
[Win] Test output results should not be written twice.
https://bugs.webkit.org/show_bug.cgi?id=167197

Reviewed by Brent Fulgham.

Prevent test output from being written twice by returning early from
the dump() function, if it already has been called.
This patch also adds a missing newline to a test output line.

* DumpRenderTree/win/DumpRenderTree.cpp:
(dump):

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

3 years ago[Modern Media Controls] Turn modern media controls on by default
graouts@webkit.org [Fri, 20 Jan 2017 12:17:50 +0000 (12:17 +0000)]
[Modern Media Controls] Turn modern media controls on by default
https://bugs.webkit.org/show_bug.cgi?id=165668

Reviewed by Dean Jackson.

Source/WebCore:

Tests: media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html
       media/modern-media-controls/pip-support/ipad/pip-support-enabled.html
       media/modern-media-controls/pip-support/ipad/pip-support-tap.html
       media/modern-media-controls/placard-support/ipad/placard-support-pip.html
       media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html

Fix an error which may be triggered prior to Sierra where we would assume the presentation
mode API was avaiable when it might not be, which caused a few tests to fail.

We also ensure that we always inject the UA styles for legacy media controls as otherwise
toggling from modern media controls to legacy media controls would not inject those styles.
To facilitate this we add a dedicated method for modern media controls styles in RenderTheme
that is only used in the case of modern media controls when the shadow root asks for the styles
to inject in the shadow root.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::shadowRootCSSText):
* Modules/modern-media-controls/media/pip-support.js:
(PiPSupport.prototype.syncControl):
(PiPSupport):
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::modernMediaControlsStyleSheet):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet):
(WebCore::RenderThemeIOS::modernMediaControlsStyleSheet):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::modernMediaControlsStyleSheet):

Source/WebKit/mac:

Enabled modern media controls by default in WK1.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

Use DEFAULT_EXPERIMENTAL_FEATURES_ENABLED as the default value for modern media controls, which is true.

* Shared/WebPreferencesDefinitions.h:

Tools:

Enabled modern media controls by default in test runners.

* DumpRenderTree/TestOptions.h:
* WebKitTestRunner/TestOptions.h:

LayoutTests:

Turn modern media controls off for a majority of pre-existing tests that made assumptions on the implementation
of media controls.

For tests designed for modern media controls, we don't need to opt out since modern media controls are now on
by default, and we turn them back on since they were skipped. But we make these tests more resilient by:

    1. adding iPad-specific tests
    2. adding platform-agnostic ways to press an element, using either eventSender or uiController
    3. checking that elements that are sized asynchronously are indeed sized before making assumptions to that effect
    4. ensuring that we don't have additional scheduler.frameDidFire callbacks after we no longer need them

* TestExpectations:
* accessibility/mac/video-tag-hit-test.html:
* accessibility/mac/video-volume-slider-accessibility.html:
* accessibility/media-element.html:
* accessibility/media-emits-object-replacement.html:
* compositing/video/poster-expected.html:
* compositing/video/poster.html:
* fast/hidpi/video-controls-in-hidpi.html:
* fast/layers/video-layer.html:
* fullscreen/video-controls-drag.html:
* fullscreen/video-controls-override.html:
* fullscreen/video-controls-rtl.html:
* fullscreen/video-controls-timeline.html:
* http/tests/media/hls/video-controls-live-stream.html:
* http/tests/media/hls/video-duration-accessibility.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html:
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html:
* media/accessibility-closed-captions-has-aria-owns.html:
* media/adopt-node-crash.html:
* media/airplay-autoplay.html:
* media/audio-as-video-fullscreen.html:
* media/audio-controls-do-not-fade-out.html:
* media/audio-controls-rendering.html:
* media/audio-controls-timeline-in-media-document.html:
* media/audio-delete-while-slider-thumb-clicked.html:
* media/audio-repaint.html:
* media/click-placeholder-not-pausing.html:
* media/click-volume-bar-not-pausing.html:
* media/controls-after-reload.html:
* media/controls-drag-timebar.html:
* media/controls-right-click-on-timebar.html:
* media/controls-strict.html:
* media/controls-styling.html:
* media/controls-without-preload.html:
* media/controls/airplay-controls.html:
* media/controls/airplay-picker.html:
* media/controls/basic.html:
* media/controls/elementOrder.html:
* media/controls/forced-tracks-only.html:
* media/controls/fullscreen-button-inline-layout.html:
* media/controls/inline-elements-dropoff-order.html:
* media/controls/picture-in-picture.html:
* media/controls/pip-placeholder-without-video-controls.html:
* media/controls/showControlsButton.html:
* media/controls/statusDisplay.html:
* media/controls/statusDisplayBad.html:
* media/controls/track-menu.html:
* media/mac/controls-panel-not-clipped-out-expected.html:
* media/mac/controls-panel-not-clipped-out.html:
* media/media-captions-no-controls.html:
* media/media-controller-drag-crash.html:
* media/media-controls-accessibility.html:
* media/media-controls-cancel-events.html:
* media/media-controls-clone.html:
* media/media-controls-drag-timeline-set-controls-property.html:
* media/media-controls-timeline-updates-after-playing.html:
* media/media-controls-timeline-updates-when-hovered.html:
* media/media-controls-timeline-updates.html:
* media/media-document-audio-controls-visible.html:
* media/media-document-audio-repaint.html:
* media/media-fullscreen-return-to-inline.html:
* media/modern-media-controls/airplay-button/airplay-button-on.html:
* media/modern-media-controls/airplay-button/airplay-button.html:
* media/modern-media-controls/airplay-placard/airplay-placard-text-section.html:
* media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
* media/modern-media-controls/audio/audio-controls-buttons.html:
* media/modern-media-controls/audio/audio-controls-metrics.html:
* media/modern-media-controls/button/button.html:
* media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
* media/modern-media-controls/forward-button/forward-button.html:
* media/modern-media-controls/fullscreen-button/fullscreen-button.html:
* media/modern-media-controls/fullscreen-support/fullscreen-support-click.html:
* media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt: Added.
* media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html: Added.
* media/modern-media-controls/icon-button/icon-button-active-state.html:
* media/modern-media-controls/icon-button/icon-button-on.html:
* media/modern-media-controls/icon-button/icon-button.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-controls-bar-styles.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-time-control-styles.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:
* media/modern-media-controls/layout-node/addChild.html:
* media/modern-media-controls/layout-node/children.html:
* media/modern-media-controls/layout-node/height.html:
* media/modern-media-controls/layout-node/insertAfter.html:
* media/modern-media-controls/layout-node/insertBefore.html:
* media/modern-media-controls/layout-node/node-made-dirty-during-layout.html:
* media/modern-media-controls/layout-node/remove.html:
* media/modern-media-controls/layout-node/removeChild.html:
* media/modern-media-controls/layout-node/subclassing.html:
* media/modern-media-controls/layout-node/visible.html:
* media/modern-media-controls/layout-node/width.html:
* media/modern-media-controls/layout-node/x.html:
* media/modern-media-controls/layout-node/y.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide.html:
* media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html:
* media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html:
* media/modern-media-controls/media-controller/media-controller-resize.html:
* media/modern-media-controls/media-controller/media-controller-scale-factor.html:
* media/modern-media-controls/media-controller/media-controller-single-container.html:
* media/modern-media-controls/mute-button/mute-button.html:
* media/modern-media-controls/pip-button/pip-button.html:
* media/modern-media-controls/pip-placard/pip-placard-text-section.html:
* media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt: Added.
* media/modern-media-controls/pip-support/ipad/pip-support-enabled.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled.html.
* media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt: Added.
* media/modern-media-controls/pip-support/ipad/pip-support-tap.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html.
* media/modern-media-controls/pip-support/pip-support-click.html:
* media/modern-media-controls/pip-support/pip-support-enabled.html:
* media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt: Copied from LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt.
* media/modern-media-controls/placard-support/ipad/placard-support-pip.html: Added.
* media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
* media/modern-media-controls/play-pause-button/play-pause-button.html:
* media/modern-media-controls/playback-support/playback-support-button-click-expected.txt:
* media/modern-media-controls/playback-support/playback-support-button-click.html:
* media/modern-media-controls/resources/media-controls-utils.js:
(pressOnElement):
(finishMediaControlsTest):
* media/modern-media-controls/rewind-button/rewind-button.html:
* media/modern-media-controls/scheduler/not-reentrant.html:
* media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html:
* media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt: Copied from LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt.
* media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html: Added.
* media/modern-media-controls/scrubber-support/scrubber-support-click.html:
* media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt:
* media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
* media/modern-media-controls/seek-backward-support/seek-backward-support.html:
* media/modern-media-controls/seek-forward-support/seek-forward-support.html:
* media/modern-media-controls/skip-back-button/skip-back-button.html:
* media/modern-media-controls/slider/slider-fill.html:
* media/modern-media-controls/slider/slider-styles.html:
* media/modern-media-controls/start-support/start-support-click-to-start-expected.txt:
* media/modern-media-controls/start-support/start-support-click-to-start.html:
* media/modern-media-controls/status-label/status-label-font.html:
* media/modern-media-controls/status-label/status-label-text-selection.html:
* media/modern-media-controls/status-label/status-label.html:
* media/modern-media-controls/time-label/time-label.html:
* media/modern-media-controls/tracks-button/tracks-button.html:
* media/modern-media-controls/tracks-panel/tracks-panel-right-x.html:
* media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html:
* media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:
* media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html:
* media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt:
* media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html:
* media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html:
* media/modern-media-controls/volume-slider/volume-slider-value.html:
* media/modern-media-controls/volume-support/volume-support-click.html:
* media/modern-media-controls/volume-support/volume-support-drag.html:
* media/nodesFromRect-shadowContent.html:
* media/progress-events-generated-correctly.html:
* media/require-user-gesture-to-load-video.html:
* media/tab-focus-inside-media-elements.html:
* media/track/track-cue-rendering-horizontal.html:
* media/track/track-cue-rendering-vertical.html:
* media/track/track-cues-cuechange.html:
* media/track/track-cues-enter-exit.html:
* media/track/track-in-band-duplicate-tracks-when-source-changes.html:
* media/track/track-manual-mode.html:
* media/video-controls-audiotracks-trackmenu.html:
* media/video-controls-captions-trackmenu-localized.html:
* media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html:
* media/video-controls-captions-trackmenu-sorted.html:
* media/video-controls-captions-trackmenu.html:
* media/video-controls-drop-and-restore-timeline.html:
* media/video-controls-in-media-document.html:
* media/video-controls-no-display-with-text-track.html:
* media/video-controls-rendering.html:
* media/video-controls-show-on-kb-or-ax-event.html:
* media/video-controls-toggling.html:
* media/video-controls-transformed.html:
* media/video-controls-visible-audio-only.html:
* media/video-controls-visible-exiting-fullscreen.html:
* media/video-controls-zoomed.html:
* media/video-display-toggle.html:
* media/video-empty-source.html:
* media/video-fullscreeen-only-controls.html:
* media/video-fullscreeen-only-playback.html:
* media/video-initially-hidden-volume-slider-up.html:
* media/video-no-audio.html:
* media/video-play-audio-require-user-gesture.html:
* media/video-play-require-user-gesture.html:
* media/video-trackmenu-selection.html:
* media/video-volume-slider-drag.html:
* media/video-volume-slider.html:
* media/video-zoom-controls.html:
* media/volume-bar-empty-when-muted.html:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html:
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

3 years agoSuper property access in base class constructor doesn't work
gskachkov@gmail.com [Fri, 20 Jan 2017 11:43:24 +0000 (11:43 +0000)]
Super property access in base class constructor doesn't work
https://bugs.webkit.org/show_bug.cgi?id=166665

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

Allow to use super inside of the constructor for classes
without parent class.
Parser checks if super used within the constructor and
add this information to function metedata, and later it is used
during byte code generation.

* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/Parser.h:
(JSC::Scope::usesEval):
(JSC::Scope::fillParametersForSourceProviderCache):
(JSC::Scope::restoreFromSourceProviderCache):
(JSC::Parser::adjustSuperBindingForBaseConstructor):
* parser/SourceProviderCacheItem.h:
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):

LayoutTests:

* js/class-syntax-super-expected.txt:
* js/script-tests/class-syntax-super.js:

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

3 years agoRe-sync innerText web-platform-tests from upstream
cdumez@apple.com [Fri, 20 Jan 2017 09:28:09 +0000 (09:28 +0000)]
Re-sync innerText web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=167229

Reviewed by Alex Christensen.

Re-sync innerText web-platform-tests from upstream 1a36aa52.

* web-platform-tests/innerText/setter-expected.txt:
* web-platform-tests/innerText/setter-tests.js:
* web-platform-tests/innerText/setter.html:

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

3 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.15.3 release.
carlosgc@webkit.org [Fri, 20 Jan 2017 08:09:17 +0000 (08:09 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.3 release.

.:

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

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.15.3.

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

3 years ago[Threaded Compositor] Initialize the threaded compositor with the current size
carlosgc@webkit.org [Fri, 20 Jan 2017 06:55:46 +0000 (06:55 +0000)]
[Threaded Compositor] Initialize the threaded compositor with the current size
https://bugs.webkit.org/show_bug.cgi?id=167196

Reviewed by Žan Doberšek.

We are always creating the threaded compositor with an empty size and then a sizeDidChange always happen when
the backing store state changes. This is always happening because the threaded compositor is created before the
first backing store state, but if we wanted to create it later, for example to enter/leave AC mode on demand,
the threaded compositor will not have the viewport size unless the window is resized, or sizeDidChange is called
manually when entering AC mode. Creating the threaded compositor is sync and changing the size too, so it's
better to do both things at the same time using the same sync operation.

* Shared/CoordinatedGraphics/SimpleViewportController.cpp:
(WebKit::SimpleViewportController::SimpleViewportController): Pass an initial size to the constructor.
* Shared/CoordinatedGraphics/SimpleViewportController.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::create): Add viewportSize and scaleFactor construction parameters,
(WebKit::ThreadedCompositor::ThreadedCompositor): Ditto. Also mark as needs resize if the given size is not empty.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): Initialize the threaded compositor
with an initial viewport size and scale factor.

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

3 years agomeasurement-sets API can incorrectly order points with OS version without commit...
rniwa@webkit.org [Fri, 20 Jan 2017 06:42:43 +0000 (06:42 +0000)]
measurement-sets API can incorrectly order points with OS version without commit time
https://bugs.webkit.org/show_bug.cgi?id=167227

Reviewed by Chris Dumez.

Ignore revision_order for the purpose of ordering data points in /api/measurement-sets.

These orderings are used in some UI (e.g A/B testing) to order OS build numbers which do not have a timestamp
associated with each "revision".

The baseline measurements made in our internal dashboard were using these ordering numbers before ordering
results with build time. Because those data points don't have an associated Webkit revisions, all data points
were ordered first by macOS's revision_order, then build time. Because v3 UI completely ignores revision_order
for the purpose of plotting data points, this resulted in some data points being plotted in a wrong order
with some lines going backwards in time.

This patch addresses this discrepancy by stop ordering data points with revision_order in the JSON API.

* public/api/measurement-set.php:
(MeasurementSetFetcher::execute_query): Fixed the bug.
* server-tests/api-measurement-set-tests.js: Added a test.

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

3 years agoBuild fix after r210626. We need to clear Triggerable's static map in each iteration.
rniwa@webkit.org [Fri, 20 Jan 2017 05:11:01 +0000 (05:11 +0000)]
Build fix after r210626. We need to clear Triggerable's static map in each iteration.

* tools/sync-buildbot.js:
(syncLoop):

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

3 years agoREGRESSION(r206156): Animated images are repeated one extra iteration than the value...
commit-queue@webkit.org [Fri, 20 Jan 2017 03:56:20 +0000 (03:56 +0000)]
REGRESSION(r206156): Animated images are repeated one extra iteration than the value which is saved in the image file
https://bugs.webkit.org/show_bug.cgi?id=167174

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

Source/WebCore:

Before r206156, BitmapImage::repetitionCount() used to return zero for
the case loopCount = 1, -1 for loopCount = Infinity and loopCount for
all other cases. Having repetitionCount() return zero for loopCount = 1
makes the condition if (++m_repetitionsComplete > repetitionCount())
break the animation loop after one iteration. But it was wrong for all
loopCount > 1. It was causing an extra iteration to be played for the
animated image. After r206156, BitmapImage::repetitionCount() returns
loopCount for all cases loopCount != Infinity. Keeping the same condition
causes the extra iteration to be played even for loopCount = 1.

Test: fast/images/animated-image-loop-count.html

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::internalStartAnimation):

LayoutTests:

* fast/images/animated-image-loop-count-expected.html: Added.
* fast/images/animated-image-loop-count.html: Added.
* fast/images/resources/animated-red-green-blue-repeat-1.gif: Added.
* fast/images/resources/animated-red-green-blue-repeat-2.gif: Added.
Ensure the animated image stops animating after loopCount iterations.

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

3 years agoInclude SubtleCrypto test on experimental-features test page
commit-queue@webkit.org [Fri, 20 Jan 2017 03:49:37 +0000 (03:49 +0000)]
Include SubtleCrypto test on experimental-features test page
https://bugs.webkit.org/show_bug.cgi?id=167226

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

* experimental-features.html:
Add a test for SubtleCrypto and make the test resilient against exceptions.

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