WebKit-https.git
4 years agoAdd support for selective handling of VM traps.
mark.lam@apple.com [Thu, 2 Mar 2017 20:35:37 +0000 (20:35 +0000)]
Add support for selective handling of VM traps.
https://bugs.webkit.org/show_bug.cgi?id=169087

Reviewed by Keith Miller.

This is needed because there are some places in the VM where it's appropriate to
handle some types of VM traps but not others.

We implement this selection by using a VMTraps::Mask that allows the user to
specify which traps should be serviced.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::execute):
* runtime/VM.cpp:
(JSC::VM::handleTraps):
* runtime/VM.h:
* runtime/VMTraps.cpp:
(JSC::VMTraps::takeTrap): Deleted.
* runtime/VMTraps.h:
(JSC::VMTraps::Mask::Mask):
(JSC::VMTraps::Mask::allEventTypes):
(JSC::VMTraps::Mask::bits):
(JSC::VMTraps::Mask::init):
(JSC::VMTraps::needTrapHandling):
(JSC::VMTraps::hasTrapForEvent):

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

4 years agoContinue enabling WebRTC
achristensen@apple.com [Thu, 2 Mar 2017 20:19:35 +0000 (20:19 +0000)]
Continue enabling WebRTC
https://bugs.webkit.org/show_bug.cgi?id=169056

Reviewed by Jon Lee.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

4 years agoMark inspector/debugger/breakpoint-action-eval.html as flaky.
ryanhaddad@apple.com [Thu, 2 Mar 2017 19:30:05 +0000 (19:30 +0000)]
Mark inspector/debugger/breakpoint-action-eval.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=163604

Unreviewed test gardening.

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

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

4 years agoData interaction support for WK1
megan_gardner@apple.com [Thu, 2 Mar 2017 19:16:44 +0000 (19:16 +0000)]
Data interaction support for WK1
https://bugs.webkit.org/show_bug.cgi?id=169062

Reviewed by Wenson Hsieh.

Source/WebKit/mac:

Support for data interaction in WebKit1

* WebCoreSupport/WebDragClient.mm:
* WebView/WebView.mm:
(-[WebUITextIndicatorData initWithImage:TextIndicatorData:scale:]):
(-[WebUITextIndicatorData initWithImage:scale:]):
(-[WebUITextIndicatorData dealloc]):
(-[WebView _requestStartDataInteraction:globalPosition:]):
(-[WebView _setDataInteractionData:textIndicator:atClientPosition:anchorPoint:action:]):
(-[WebView _getDataInteractionData]):
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate dealloc]):
* WebView/WebViewInternal.h:
* WebView/WebViewPrivate.h:

Source/WebKit2:

Allow for separate additions files in WK1 and WK2

* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

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

4 years agoLayoutTest media/modern-media-controls/pip-support/pip-support-click.html is a flaky...
commit-queue@webkit.org [Thu, 2 Mar 2017 18:42:16 +0000 (18:42 +0000)]
LayoutTest media/modern-media-controls/pip-support/pip-support-click.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168658
<rdar://problem/30799251>

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

Use an asynchronous assertion to determine when the PiP button has been sized and can thus be clicked.

* media/modern-media-controls/pip-support/pip-support-click-expected.txt:
* media/modern-media-controls/pip-support/pip-support-click.html:

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

4 years agoLand TestExpectations for rdar://problem/30735372.
ryanhaddad@apple.com [Thu, 2 Mar 2017 18:38:29 +0000 (18:38 +0000)]
Land TestExpectations for rdar://problem/30735372.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years ago[mac-wk1] LayoutTest media/modern-media-controls/mute-button/mute-button.html is...
commit-queue@webkit.org [Thu, 2 Mar 2017 18:28:28 +0000 (18:28 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/mute-button/mute-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165320
<rdar://problem/30809600>

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

Use asynchronous assertions to improve robustness.

* media/modern-media-controls/mute-button/mute-button-expected.txt:
* media/modern-media-controls/mute-button/mute-button.html:

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

4 years agoUnreviewed, restore inadvertently-removed non-breaking spaces in Polish translation
mcatanzaro@igalia.com [Thu, 2 Mar 2017 18:28:06 +0000 (18:28 +0000)]
Unreviewed, restore inadvertently-removed non-breaking spaces in Polish translation

* pl.po:

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

4 years agoUnreviewed, rolling out r213281.
ryanhaddad@apple.com [Thu, 2 Mar 2017 18:19:41 +0000 (18:19 +0000)]
Unreviewed, rolling out r213281.

This change caused API test WebKit2.UserMediaBasic to time
out.

Reverted changeset:

"[MediaStream] UIClient may not be notified of capture state
change when leaving a page"
https://bugs.webkit.org/show_bug.cgi?id=169014
http://trac.webkit.org/changeset/213281

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

4 years agoActivate some new webrtc tests
commit-queue@webkit.org [Thu, 2 Mar 2017 18:14:55 +0000 (18:14 +0000)]
Activate some new webrtc tests
https://bugs.webkit.org/show_bug.cgi?id=168850

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-02

* platform/ios-simulator-wk2/TestExpectations: Disabling webrtc tests for ios wk2 debug.

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

4 years agoImprove consistency of captions rendering on Mac
jonlee@apple.com [Thu, 2 Mar 2017 18:08:41 +0000 (18:08 +0000)]
Improve consistency of captions rendering on Mac
https://bugs.webkit.org/show_bug.cgi?id=169071

Reviewed by Eric Carlson.

* page/CaptionUserPreferencesMediaAF.h:
(WebCore::CaptionUserPreferencesMediaAF::captionsEdgeColorForTextColor): Deleted.
(WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor): Deleted.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::appendCSS): Helper function to add a CSS rule with a provided StringBuilder.
(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS): Refactor to use
appendCSS.
(WebCore::CaptionUserPreferencesMediaAF::colorPropertyCSS): Ditto.
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): Update text edge styles.
- Add a blur to the shadow
- Drop shadow style includes 1px text border
- Always use black for the text edge color
Also convert the stroke rules to using the CSS property and values instead of straight strings.
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride): Fly-by fix of a typo.

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

4 years agoDownload attribute set to "*\" save file with name "example.com"
cdumez@apple.com [Thu, 2 Mar 2017 17:55:13 +0000 (17:55 +0000)]
Download attribute set to "*\" save file with name "example.com"
https://bugs.webkit.org/show_bug.cgi?id=169066
<rdar://problem/30740875>

Reviewed by Alex Christensen.

Source/WebCore:

The issue is that a backslash in recognized as an escaping character in
a quoted string as per RFC2616:
"
The backslash character ("\") MAY be used as a single-character
quoting mechanism only within quoted-string and comment constructs.
"

We therefore need to escape the backslashes in the filename before
using it in the Content-Disposition header, inside the quoted string.

Test: fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html

* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::sanitizeSuggestedFilename):

LayoutTests:

Add layout test coverage.

* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html: Added.

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

4 years ago[WebRTC] Activate ICE candidate privacy policy
commit-queue@webkit.org [Thu, 2 Mar 2017 16:24:30 +0000 (16:24 +0000)]
[WebRTC] Activate ICE candidate privacy policy
https://bugs.webkit.org/show_bug.cgi?id=168975

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

Source/WebCore:

Test: webrtc/datachannel/filter-ice-candidate.html

* testing/Internals.cpp:
(WebCore::Internals::Internals): Disabling ICE candidate filtering by default for rwt.
(WebCore::Internals::setICECandidateFiltering):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences enumeratingAllNetworkInterfacesEnabled]):
(-[WebPreferences setEnumeratingAllNetworkInterfacesEnabled:]):
(-[WebPreferences iceCandidateFilteringEnabled]):
(-[WebPreferences setIceCandidateFilteringEnabled:]):
* WebView/WebPreferencesPrivate.h:

Source/WebKit2:

Disabling network enumeration by default.
Enabling ICE candidate filtering by default.
Chaning ICE candidate filtering according userMediaAccess policy:
- If access is denied, filtering is on.
- If access is granted, filtering is off.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetICECandidateFilteringEnabled):
(WKPreferencesGetICECandidateFilteringEnabled):
(WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled):
(WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::toWebCore):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::endedCaptureSession):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:

LayoutTests:

* webrtc/datachannel/filter-ice-candidate-expected.txt: Added.
* webrtc/datachannel/filter-ice-candidate.html: Added.

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

4 years agoActivate some new webrtc tests
commit-queue@webkit.org [Thu, 2 Mar 2017 16:05:53 +0000 (16:05 +0000)]
Activate some new webrtc tests
https://bugs.webkit.org/show_bug.cgi?id=168850

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

* TestExpectations: Activating tests in debug builds.
* webrtc/datachannel/basic-expected.txt: Added.
* webrtc/datachannel/basic.html: Activating real webrtc backend.
* webrtc/libwebrtc/release-while-creating-offer-expected.txt: Added.
* webrtc/libwebrtc/release-while-getting-stats-expected.txt: Added.
* webrtc/libwebrtc/release-while-setting-local-description-expected.txt: Added.
* webrtc/video-disabled-black-expected.txt:
* webrtc/video-disabled-black.html: Setting expected alpha channel to zero for black frames.
* webrtc/video-expected.txt:

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

4 years ago[MediaStream] UIClient may not be notified of capture state change when leaving a...
eric.carlson@apple.com [Thu, 2 Mar 2017 15:50:09 +0000 (15:50 +0000)]
[MediaStream] UIClient may not be notified of capture state change when leaving a page
https://bugs.webkit.org/show_bug.cgi?id=169014
<rdar://problem/30632267>

Reviewed by Youenn Fablet.

Enable and update the WebKit API test WebKit2.UserMedia.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Always call page.updateIsPlayingMedia() if there
is active media in the document because it won't be possible when the state changes later
because the frame will have been cleared.

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

4 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Thu, 2 Mar 2017 15:45:58 +0000 (15:45 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=169081

Unreviewed GTK+ gardening. Moved some failures to the GTK TestExpectations

* TestExpectations:
* platform/gtk/TestExpectations:

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

4 years ago[l10n] Updated Polish translation of WebKitGTK+ for 2.16
mcatanzaro@igalia.com [Thu, 2 Mar 2017 15:07:40 +0000 (15:07 +0000)]
[l10n] Updated Polish translation of WebKitGTK+ for 2.16
https://bugs.webkit.org/show_bug.cgi?id=169072

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-03-02
Rubber-stamped by Michael Catanzaro.

* pl.po:

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

4 years ago[WK2] Keyboard menu key should show context menu
tpopela@redhat.com [Thu, 2 Mar 2017 14:20:47 +0000 (14:20 +0000)]
[WK2] Keyboard menu key should show context menu
https://bugs.webkit.org/show_bug.cgi?id=72099

Source/WebCore:

Reviewed by Carlos Garcia Campos.

Show the context menu when the GtkWidget::popup-menu signal is
emitted. This signal is triggered by pressing a key (usually
the Menu key or the Shift + F10 shortcut) or it could be emitted on
WebKitWebView.

Test: fast/events/context-activated-by-key-event.html

Also could be tested by:

ManualTests/keyboard-menukey-event.html
ManualTests/win/contextmenu-key.html
ManualTests/win/contextmenu-key2.html

* page/EventHandler.cpp:
(WebCore::EventHandler::sendContextMenuEventForKey):
Correctly send the mouse event that used for showing the context menu.
Previously the event was immediately dispatched as it is, but this was
only the right way if some element was focused on the page. If there
was no focused element or non-empty text range then the event lacked
the right node, where it was supposed to be shown. The correct node
is determined and added to the event in the sendContextMenuEvent() so
we have to use this function to send the event.

Also use absoluteBoundingBoxRect() instead of
pixelSnappedAbsoluteClippedOverflowRect() when determining
a coordinate where to show the context menu for the currently focus
element. The latter is not returning a right box (it is bigger) which
could lead to the situation that no menu will be displayed at all,
because the HitTest won't contain the right element as the
determined coordinates could be outside of the element.
* page/EventHandler.h:

Source/WebKit2:

Reviewed by Carlos Garcia Campos.

Show the context menu when the GtkWidget::popup-menu signal is
emitted. This signal is triggered by pressing a key (usually
the Menu key or the Shift + F10 shortcut) or it could be emitted on
WebKitWebView.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkit_web_view_class_init): Update the documentation for the
context-menu signal
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBasePopupMenu): Connect to the popup-menu signal and
save the event that was used to trigger the signal. If there is no
such event create a new GdkEvent with GDK_NOTHING type.
(webkitWebViewBasePopupMenu):
(webkit_web_view_base_class_init):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleContextMenuKeyEvent):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::contextMenuForKeyEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

Show the context menu when the GtkWidget::popup-menu signal is
emitted. This signal is triggered by pressing a key (usually
the Menu key or the Shift + F10 shortcut) or it could be emitted on
WebKitWebView.

Reviewed by Carlos Garcia Campos.

* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuDefaultMenu):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(WebViewTest::emitPopupMenuSignal):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:

LayoutTests:

Reviewed by Carlos Garcia Campos.

Skip the fast/events/context-activated-by-key-event.html on Mac as it
does not have a key to activate the context menu and on iOS as well.

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

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

4 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Thu, 2 Mar 2017 13:15:42 +0000 (13:15 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=169076

Unreviewed GTK+ gardening. Some tests fail after r213020:
  - editing/deleting/skip-virama-001.html [ Failure ]
  - editing/selection/extend-by-character-007.html [ Failure ]
  - editing/selection/regional-indicators.html [ Failure ]

* TestExpectations:

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

4 years ago[GTK] Crash in WebCore::CoordinatedGraphicsLayer::notifyFlushRequired
carlosgc@webkit.org [Thu, 2 Mar 2017 11:44:41 +0000 (11:44 +0000)]
[GTK] Crash in WebCore::CoordinatedGraphicsLayer::notifyFlushRequired
https://bugs.webkit.org/show_bug.cgi?id=166420

Reviewed by Žan Doberšek.

This is happening when closing a page that is being inspected. When CoordinatedGraphicsLayer::removeFromParent()
is called, the coordinator has already been invalidated, so all its layers were set a nullptr coordinator. I
think it's safe to simply handle m_coordinator being nullptr in notifyFlushRequired().

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Return early if the coordinator is nullptr.

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

4 years agoIncorrect RELEASE_ASSERT in JSGlobalObject::addStaticGlobals()
tpopela@redhat.com [Thu, 2 Mar 2017 09:43:18 +0000 (09:43 +0000)]
Incorrect RELEASE_ASSERT in JSGlobalObject::addStaticGlobals()
https://bugs.webkit.org/show_bug.cgi?id=169034

Reviewed by Mark Lam.

It should not assign to offset, but compare to offset.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::addStaticGlobals):

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

4 years agoDon't keep dead resources in MemoryCache while under memory pressure.
akling@apple.com [Thu, 2 Mar 2017 09:03:41 +0000 (09:03 +0000)]
Don't keep dead resources in MemoryCache while under memory pressure.
<https://webkit.org/b/169070>

Reviewed by Antti Koivisto.

Have CachedResource::deleteIfPossible() remove the resource from the MemoryCache
if we're under memory pressure and that was the only thing keeping it alive.

This is consistent with the policy where dead resources are evicted from the cache
as we come under pressure.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::deleteIfPossible):

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

4 years agoREGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly...
carlosgc@webkit.org [Thu, 2 Mar 2017 08:59:12 +0000 (08:59 +0000)]
REGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly handled since r213062
https://bugs.webkit.org/show_bug.cgi?id=169024

Reviewed by Youenn Fablet.

This made test http/tests/download/literal-utf-8.html to start failing. The problem is that I removed the
conversion made by String::fromUTF8WithLatin1Fallback that was added in r176930. I removed it because that made
fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html to timeout. This patch brings back
the String::fromUTF8WithLatin1Fallback call but only when the header string is 8 bit one.

Fixes: http/tests/download/literal-utf-8.html
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename):

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

4 years agoReplace -[WKWebView adjustedDataInteractionItemProviders:] with a UI delegate method
wenson_hsieh@apple.com [Thu, 2 Mar 2017 07:43:41 +0000 (07:43 +0000)]
Replace -[WKWebView adjustedDataInteractionItemProviders:] with a UI delegate method
https://bugs.webkit.org/show_bug.cgi?id=169013

Reviewed by Dan Bernstein.

Source/WebKit2:

Rather than introduce new SPI on WKWebView directly, we should follow convention and add the hook to the private
version of the UI delegate.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _adjustedDataInteractionItemProviders:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Adjusts TestWebKitAPI for changes in WebKit2. See Source/WebKit2/ChangeLog for more details.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
(-[CustomItemProviderWebView _adjustedDataInteractionItemProviders:]): Deleted.
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator initWithWebView:]):
(-[DataInteractionSimulator dealloc]):
(-[DataInteractionSimulator _webView:adjustedDataInteractionItemProviders:]):

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

4 years agoActually fix Windows build.
achristensen@apple.com [Thu, 2 Mar 2017 07:32:40 +0000 (07:32 +0000)]
Actually fix Windows build.

Source/WebCore:

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
Win32Handle is now in WTF namespace.

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::invalidate):
r213266 changed Style::Force to ResolveStyleType::Rebuild, so I did so here.

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

4 years ago[Win] DRT should not dispatch messages after test is done.
pvollan@apple.com [Thu, 2 Mar 2017 07:20:12 +0000 (07:20 +0000)]
[Win] DRT should not dispatch messages after test is done.
https://bugs.webkit.org/show_bug.cgi?id=169026

Reviewed by Brent Fulgham.

Exiting the message loop with PostQuitMessage will leave room for
a few messages to be dispatched after the test is done.

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

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

4 years agoFix WinCairo build after r213214
achristensen@apple.com [Thu, 2 Mar 2017 07:07:44 +0000 (07:07 +0000)]
Fix WinCairo build after r213214
https://bugs.webkit.org/show_bug.cgi?id=168908

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

4 years agoFix Windows build after r213266
achristensen@apple.com [Thu, 2 Mar 2017 07:02:54 +0000 (07:02 +0000)]
Fix Windows build after r213266
https://bugs.webkit.org/show_bug.cgi?id=169049

* WebFrame.cpp:
(WebFrame::invalidate):

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

4 years agoImplement font-stretch for installed fonts
mmaxfield@apple.com [Thu, 2 Mar 2017 06:45:29 +0000 (06:45 +0000)]
Implement font-stretch for installed fonts
https://bugs.webkit.org/show_bug.cgi?id=168888

Reviewed by Darin Adler and Dave Hyatt.

Source/WebCore:

This patch implements the font-stretch property. Both parsing and the implementation is
implemented. Contrary to the name, this property doesn't actually stretch fonts; instead,
it provides one more input to the font selection routine.

The mapping from Core Text's [-1, 1] width values to font-stretch's percentage-based
values is not perfect. For now, I've implemented a piecewise linear curve mapping the
two. However, I expect to be able to improve this transfer function soon.

This patch does not implement the font-stretch descriptor in @font-face, and therefore
does not work with web fonts. I will add this support in
https://bugs.webkit.org/show_bug.cgi?id=168892. The reason it isn't done in this patch is
it requires some architectural changes to our CSSFontFace classes which are large enough
they should be separated into their own patch.

This patch lays the groundwork for implementing the 'wdth' variation axis. It does this
by adding a floating-point value to RenderStyle instead of just an enum. The font-stretch
keywords get converted to these floating-point numbers in accordance with the Fonts spec.
This patch doesn't actually implement the variations piece of font-stretch, because that
piece also requires some architectural changes. This patch just implements the installed
font selection piece.

This patch also fixes the regression introduced in r213163 with Helvetica Neue. Now that
our font selection algorithm has a concept of font stretch, weights 800 and 900 of
Helvetica Neue are rendered as expected. (And this patch updates the tests to make sure.)

Tests: fast/text/font-stretch-parse.html
       fast/text/font-stretch-shorthand.html
       FontCacheTest.FontLookupFromFamilyName

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontStretchFromStyle): Map style values to CSS keywords.
(WebCore::ComputedStyleExtractor::propertyValue): Call the above function.
* css/CSSFontValue.cpp:
(WebCore::CSSFontValue::customCSSText): Used in getComputedStyle() for the "font"
shorthand.
(WebCore::CSSFontValue::equals):
* css/CSSFontValue.h:
* css/CSSProperties.json:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontStretch): Map CSS keywords to style values.
* css/StyleProperties.cpp:
(WebCore::StyleProperties::appendFontLonghandValueIfExplicit): Used for
Element.style.font.
(WebCore::StyleProperties::fontValue):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isKeywordPropertyID): Now that variation fonts are being
implemented, font-stretch is no longer a keyword property. Instead, it can also take a
number or percentage.
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontStretch): Parse the value.
(WebCore::CSSPropertyParser::parseSingleValue): Call the above function.
(WebCore::CSSPropertyParser::consumeFont): Ditto.
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey): Caches should be sensitive to this
new value.
(WebCore::FontDescriptionKey::operator==):
(WebCore::FontDescriptionKey::computeHash):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::stretch): The parsed style value.
(WebCore::FontDescription::setStretch):
(WebCore::FontDescription::operator==):
(WebCore::FontCascadeDescription::initialStretch):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::InstalledFont::InstalledFont): Update the installed font selection
algorithm to understand font-stretch.
(WebCore::findClosestStretch):
(WebCore::filterStretch):
(WebCore::findClosestFont):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):
(WebCore::FontCache::createFontPlatformData):

Tools:

Update TestWebKitAPI tests to test font-stretch too.

* TestWebKitAPI/Tests/WebCore/FontCache.cpp:
(TestWebKitAPI::createPlatformFont):
(TestWebKitAPI::compareFonts):
(TestWebKitAPI::TEST_F):

LayoutTests:

Updating tests for the "font" shorthand to include the font-stretch keywords.

* fast/css/font-calculated-value-expected.txt:
* fast/css/font-calculated-value.html:
* fast/css/font-shorthand-expected.txt:
* fast/css/font-shorthand-from-longhands-expected.txt:
* fast/css/font-shorthand-from-longhands.html:
* fast/css/getComputedStyle/computed-style-font-expected.txt:
* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* fast/css/getComputedStyle/script-tests/computed-style-font.js:
* fast/inspector-support/style-expected.txt:
* fast/text/font-stretch-parse-expected.txt: Added.
* fast/text/font-stretch-parse.html: Added.
* fast/text/font-stretch-shorthand-expected.html: Added.
* fast/text/font-stretch-shorthand.html: Added.
* platform/mac/fast/css/css2-system-fonts-expected.txt:
* platform/mac/fast/text/font-weights-expected.png:
* platform/mac/fast/text/font-weights-expected.txt:

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

4 years agoRename recalcStyle to resolveStyle and clean up the signature
antti@apple.com [Thu, 2 Mar 2017 06:19:04 +0000 (06:19 +0000)]
Rename recalcStyle to resolveStyle and clean up the signature
https://bugs.webkit.org/show_bug.cgi?id=169049

Reviewed by Sam Weinig.

Move to modern naming.

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

    Only two of the possible values are used so pass in a two-value enum.

(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::createRenderTree):
(WebCore::Document::finishedParsing):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::recalcStyle): Deleted.
* dom/Document.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::reportDataReceived):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::Parent::Parent):
(WebCore::Style::TreeResolver::resolve):

    Remove the argument, Document invalidates the document element if everything needs to be re-resolved.

* style/StyleTreeResolver.h:

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

4 years agoLayoutTest media/modern-media-controls/media-controller/media-controller-resize.html...
graouts@webkit.org [Thu, 2 Mar 2017 05:31:57 +0000 (05:31 +0000)]
LayoutTest media/modern-media-controls/media-controller/media-controller-resize.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168378
<rdar://problem/30799326>

Reviewed by Simon Fraser.

Use asynchronous assertions to improve robustness. Since this test should no longer be flaky, remove it
from the list of flaky tests.

* media/modern-media-controls/media-controller/media-controller-resize-expected.txt:
* media/modern-media-controls/media-controller/media-controller-resize.html:
* platform/mac-wk1/TestExpectations:

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

4 years ago[mac-wk1] LayoutTest media/modern-media-controls/tracks-button/tracks-button.html...
commit-queue@webkit.org [Thu, 2 Mar 2017 05:26:21 +0000 (05:26 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/tracks-button/tracks-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168476
<rdar://problem/30799198>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

Write all tests as asynchronous assertions to improve robustness. Since this test should no longer be flaky,
mark it as Pass on platforms where it was marked as flaky.

* media/modern-media-controls/tracks-button/tracks-button-expected.txt:
* media/modern-media-controls/tracks-button/tracks-button.html:
* platform/mac-wk1/TestExpectations:

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

4 years ago[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html...
commit-queue@webkit.org [Thu, 2 Mar 2017 05:24:12 +0000 (05:24 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168409
<rdar://problem/30799198>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

Write all tests as asynchronous assertions to improve robustness. Since this test should no longer be flaky,
mark it as Pass on platforms where it was marked as flaky.

* media/modern-media-controls/airplay-button/airplay-button-expected.txt:
* media/modern-media-controls/airplay-button/airplay-button.html:
* platform/mac-wk1/TestExpectations:

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

4 years agoLayoutTest media/modern-media-controls/pip-button/pip-button.html is a flaky timeout
commit-queue@webkit.org [Thu, 2 Mar 2017 05:10:56 +0000 (05:10 +0000)]
LayoutTest media/modern-media-controls/pip-button/pip-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167350
<rdar://problem/30799132>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

Write both tests as asynchronous assertions to improve robustness.

* media/modern-media-controls/pip-button/pip-button-expected.txt:
* media/modern-media-controls/pip-button/pip-button.html:

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

4 years ago[mac-wk1] LayoutTest media/modern-media-controls/macos-inline-media-controls/macos...
commit-queue@webkit.org [Thu, 2 Mar 2017 04:37:55 +0000 (04:37 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168934
<rdar://problem/30798593>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

Use asynchronous assertions to determine when it's safe to test button styles. We do this across a family of tests
that are all essentially doing the same thing for various media controls configurations. Only one was reported as
flaky, but others would show up on the flakiness dashboard.

* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles-expected.txt:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt:
* 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-compact-buttons-styles-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html:

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

4 years agoUnreviewed, rolling out r213259.
achristensen@apple.com [Thu, 2 Mar 2017 04:34:33 +0000 (04:34 +0000)]
Unreviewed, rolling out r213259.

Broke an internal build

Reverted changeset:

"Continue enabling WebRTC"
https://bugs.webkit.org/show_bug.cgi?id=169056
http://trac.webkit.org/changeset/213259

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

4 years agoContinue enabling WebRTC
achristensen@apple.com [Thu, 2 Mar 2017 03:48:41 +0000 (03:48 +0000)]
Continue enabling WebRTC
https://bugs.webkit.org/show_bug.cgi?id=169056

Reviewed by Jon Lee.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

4 years agoLayoutTest media/modern-media-controls/volume-down-support/volume-down-support.html...
commit-queue@webkit.org [Thu, 2 Mar 2017 03:46:01 +0000 (03:46 +0000)]
LayoutTest media/modern-media-controls/volume-down-support/volume-down-support.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=168935
<rdar://problem/30796699>

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

Use asynchronous assertions to guarantee we've entered fullscreen and the volume down button
is present and leave a little room for error when checking the volume since we would sometime
see a value of 0.009 rather than 0.

* media/modern-media-controls/volume-down-support/volume-down-support-expected.txt:
* media/modern-media-controls/volume-down-support/volume-down-support.html:

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

4 years ago[mac-wk1] LayoutTest media/modern-media-controls/seek-backward-support/seek-backward...
commit-queue@webkit.org [Thu, 2 Mar 2017 02:44:58 +0000 (02:44 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/seek-backward-support/seek-backward-support.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165386
<rdar://problem/30793480>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

We rewrite the test to use asynchronous assertions and key off the various steps needed to enter fullscreen
and start pressing the skip back button. We also no longer expect a specific currentTime to be reached but
only check that pressing the skip back button eventually gets us far enough in the past.

* media/modern-media-controls/seek-backward-support/seek-backward-support-expected.txt:
* media/modern-media-controls/seek-backward-support/seek-backward-support.html:

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

4 years agoLayoutTest media/modern-media-controls/seek-forward-support/seek-forward-support...
commit-queue@webkit.org [Thu, 2 Mar 2017 02:43:28 +0000 (02:43 +0000)]
LayoutTest media/modern-media-controls/seek-forward-support/seek-forward-support.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168943
<rdar://problem/30796542>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

We rewrite the test to use asynchronous assertions and key off the various steps needed to enter fullscreen
and start pressing the skip forward button. We also no longer expect a specific currentTime to be reached but
only check that pressing the skip forward button eventually gets us far enough in the future.

* media/modern-media-controls/seek-forward-support/seek-forward-support-expected.txt:
* media/modern-media-controls/seek-forward-support/seek-forward-support.html:

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

4 years agoBuild fix after r212853. Make creating an analysis task work again.
rniwa@webkit.org [Thu, 2 Mar 2017 02:40:59 +0000 (02:40 +0000)]
Build fix after r212853. Make creating an analysis task work again.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.render):

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

4 years agoUnskip media/modern-media-controls/audio/audio-controls-buttons.html
commit-queue@webkit.org [Thu, 2 Mar 2017 02:07:41 +0000 (02:07 +0000)]
Unskip media/modern-media-controls/audio/audio-controls-buttons.html
https://bugs.webkit.org/show_bug.cgi?id=165234
<rdar://problem/30282714>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

Update this test to follow the same pattern used in media/modern-media-controls/airplay-support/airplay-support.html
which has proven to be robust.

* media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
* media/modern-media-controls/audio/audio-controls-buttons.html:
* platform/mac/TestExpectations:

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

4 years ago[WK2][!NETWORK_SESSION] Failure to download when using a download attribute with...
cdumez@apple.com [Thu, 2 Mar 2017 00:28:27 +0000 (00:28 +0000)]
[WK2][!NETWORK_SESSION] Failure to download when using a download attribute with no value on an anchor
https://bugs.webkit.org/show_bug.cgi?id=169060
<rdar://problem/30773140>

Reviewed by Darin Adler.

Source/WebCore:

Make sure we never set the suggested filename to the empty string when
the download attribute is present but has no value.

Test: http/tests/download/anchor-download-no-value.html

* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):

Source/WebKit2:

In the !NETWORK_SESSION code path, we were failing to use the suggested filename coming from the
network layer in the case where the download attribute is present but has no value. We were ending
up passing an empty string as suggested filename to Safari which is not handled properly.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):

LayoutTests:

Add layout test coverage.

* http/tests/download/anchor-download-no-value-expected.txt: Added.
* http/tests/download/anchor-download-no-value.html: Added.

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

4 years agoBuild libwebrtc as part of the All Source scheme in WebKit.xcworkspace.
aestes@apple.com [Thu, 2 Mar 2017 00:14:37 +0000 (00:14 +0000)]
Build libwebrtc as part of the All Source scheme in WebKit.xcworkspace.

Rubber-stamped by Tim Horton.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

4 years agoWeb Inspector: Annotators should not be enabled if the TextEditor is not visible
commit-queue@webkit.org [Wed, 1 Mar 2017 23:59:55 +0000 (23:59 +0000)]
Web Inspector: Annotators should not be enabled if the TextEditor is not visible
https://bugs.webkit.org/show_bug.cgi?id=169059

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

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addResource):
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Only call `showDefaultContentViewForTreeElement` if the panel has been added to a sidebar.

It is not valid to simply check whether the panel is visible, as the sidebar can be collapsed.
In that case, we still want to display the content view, so we instead check that the panel
has been added to a sidebar, meaning that it is ready to be displayed in the current tab.

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

4 years ago[ios-simulator] Unskip media/modern-media-controls/audio/audio-controls-metrics.html
commit-queue@webkit.org [Wed, 1 Mar 2017 23:10:38 +0000 (23:10 +0000)]
[ios-simulator] Unskip media/modern-media-controls/audio/audio-controls-metrics.html
https://bugs.webkit.org/show_bug.cgi?id=167258
Source/WebCore:

<rdar://problem/30282740>

We weren't enforcing the min-width to be 200px as well as the default width, and the
UA stylesheet would override it. Setting a default min-width that trumps the UA
stylesheet makes the test work correctly on iOS and we can safely unskip this test.

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

* Modules/modern-media-controls/controls/media-controls.css:
(:host(audio)):

LayoutTests:

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

Unskip test now that we can pass it reliably.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoRemoved unused WTF_COMPILER_SUPPORTS_CXX_USER_LITERALS macro
annulen@yandex.ru [Wed, 1 Mar 2017 23:04:38 +0000 (23:04 +0000)]
Removed unused WTF_COMPILER_SUPPORTS_CXX_USER_LITERALS macro
https://bugs.webkit.org/show_bug.cgi?id=168969

Reviewed by Darin Adler.

* wtf/Compiler.h:

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

4 years agoMissing 'specification' section in the place-content shorthand
jfernandez@igalia.com [Wed, 1 Mar 2017 22:45:45 +0000 (22:45 +0000)]
Missing 'specification' section in the place-content shorthand
https://bugs.webkit.org/show_bug.cgi?id=169052

Reviewed by Darin Adler.

Added 'specification' section in the place-content shorthand.

No new tests, no new functionality.

* css/CSSProperties.json:

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

4 years agoMedia: notify clients when autoplayed media is muted
mrajca@apple.com [Wed, 1 Mar 2017 22:43:04 +0000 (22:43 +0000)]
Media: notify clients when autoplayed media is muted
https://bugs.webkit.org/show_bug.cgi?id=168987

Reviewed by Alex Christensen.

Source/WebCore:

Added API tests.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::pageMutedStateDidChange):
* page/AutoplayEvent.h:

Source/WebKit2:

* UIProcess/API/C/WKPageUIClient.h:

Tools:

* TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html:
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(TEST): Added.

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

4 years agoLayoutTest media/modern-media-controls/play-pause-button/play-pause-button.html is...
commit-queue@webkit.org [Wed, 1 Mar 2017 22:39:31 +0000 (22:39 +0000)]
LayoutTest media/modern-media-controls/play-pause-button/play-pause-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167447
<rdar://problem/30790539>

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

Use a chain of asynchronous assertions to make the test more robust.

* media/modern-media-controls/play-pause-button/play-pause-button-expected.txt:
* media/modern-media-controls/play-pause-button/play-pause-button.html:

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

4 years agoSource/JavaScriptCore/ChangeLog
msaboff@apple.com [Wed, 1 Mar 2017 22:28:23 +0000 (22:28 +0000)]
Source/JavaScriptCore/ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=169055

Reviewed by Mark Lam.

Made local copies of options strings for OptionRange and string typed options.

* runtime/Options.cpp:
(JSC::parse):
(JSC::OptionRange::init):

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

4 years agoAdd SPI to create WebsiteDataStore objects pointing to custom paths.
beidson@apple.com [Wed, 1 Mar 2017 22:01:13 +0000 (22:01 +0000)]
Add SPI to create WebsiteDataStore objects pointing to custom paths.
https://bugs.webkit.org/show_bug.cgi?id=169044

Reviewed by Tim Horton.

Source/WebKit2:

* UIProcess/API/APIWebsiteDataStore.h:

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):

* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.

* UIProcess/WebsiteData/WebsiteDataStore.h:

* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

* TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm: Added.
(-[WebsiteDataStoreCustomPathsMessageHandler userContentController:didReceiveScriptMessage:]):
(getNextMessage):
(TEST):

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

4 years ago[mac-wk1 debug] LayoutTest media/modern-media-controls/tracks-panel/tracks-panel...
commit-queue@webkit.org [Wed, 1 Mar 2017 21:55:51 +0000 (21:55 +0000)]
[mac-wk1 debug] LayoutTest media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=165290
<rdar://problem/30787749>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-01
Reviewed by Jon Lee.

We now rely on actual DOM state to ensure that the tracks panel is shown and hidden. While
I couldn't reproduce the flakiness, this should be a more robust approach.

* media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt:
* media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html:

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

4 years agoUnreviewed, rolling out r213226.
commit-queue@webkit.org [Wed, 1 Mar 2017 21:10:45 +0000 (21:10 +0000)]
Unreviewed, rolling out r213226.
https://bugs.webkit.org/show_bug.cgi?id=169051

Speculative rollout, might be causing several failures and
crashes in WebKitGTK+ (Requested by lajava on #webkit).

Reverted changeset:

"REGRESSION(r213062): [SOUP] UTF-8 filename in Content-
Disposition header incorrectly handled since r213062"
https://bugs.webkit.org/show_bug.cgi?id=169024
http://trac.webkit.org/changeset/213226

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

4 years ago[Re-landing] Change JSLock to stash PlatformThread instead of std::thread::id.
mark.lam@apple.com [Wed, 1 Mar 2017 20:15:08 +0000 (20:15 +0000)]
[Re-landing] Change JSLock to stash PlatformThread instead of std::thread::id.
https://bugs.webkit.org/show_bug.cgi?id=168996

Reviewed by Filip Pizlo and Saam Barati.

PlatformThread is more useful because it allows us to:
1. find the MachineThreads::Thread which is associated with it.
2. suspend / resume threads.
3. send a signal to a thread.

We can't do those with std::thread::id.  We will need one or more of these
capabilities to implement non-polling VM traps later.

Update: Since we don't have a canonical "uninitialized" value for PlatformThread,
we now have a JSLock::m_hasOwnerThread flag that is set to true if and only the
m_ownerThread value is valid.  JSLock::currentThreadIsHoldingLock() now checks
JSLock::m_hasOwnerThread before doing the thread identity comparison.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::machineThreadForCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::getCurrentPlatformThread): Deleted.
* heap/MachineStackMarker.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::classInfo):
* runtime/JSLock.cpp:
(JSC::JSLock::JSLock):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock): Deleted.
* runtime/JSLock.h:
(JSC::JSLock::ownerThread):
(JSC::JSLock::currentThreadIsHoldingLock):
* runtime/PlatformThread.h: Added.
(JSC::currentPlatformThread):
* runtime/VM.cpp:
(JSC::VM::~VM):
* runtime/VM.h:
(JSC::VM::ownerThread):
* runtime/Watchdog.cpp:
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::shouldTerminate):
(JSC::Watchdog::startTimer):
(JSC::Watchdog::stopTimer):
* tools/JSDollarVMPrototype.cpp:
(JSC::JSDollarVMPrototype::currentThreadOwnsJSLock):
* tools/VMInspector.cpp:

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

4 years agoAdd a way to watch the CSSProperties.json file, and add me and Dan Bates to watch it.
simon.fraser@apple.com [Wed, 1 Mar 2017 20:03:18 +0000 (20:03 +0000)]
Add a way to watch the CSSProperties.json file, and add me and Dan Bates to watch it.

* Scripts/webkitpy/common/config/watchlist:

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

4 years agowebkitpy: Move some device management from iOSSimulatorPort to iOSPort class
jbedard@apple.com [Wed, 1 Mar 2017 19:47:21 +0000 (19:47 +0000)]
webkitpy: Move some device management from iOSSimulatorPort to iOSPort class
https://bugs.webkit.org/show_bug.cgi?id=168681

Reviewed by Daniel Bates.

This patch moves high-level device management into iOSPort and adds a new iOSDevicePort class
which inherits from iOSPort.  Additionally, this change renames device_id_for_worker_number to
device_for_worker_number and manages devices by object instead of by UDID.

* Scripts/webkitpy/port/factory.py:
(PortFactory): Correct import path for IOSSimulatorPort and IOSDevicePort.
* Scripts/webkitpy/port/ios.py:
(IOSPort.__init__): Define variables shared between iOS ports.
(IOSPort.driver_cmd_line_for_logging): From IOSSimulatorPort.
(IOSPort.driver_name): From IOSSimulatorPort.
(IOSPort.using_multiple_devices): Check if this port supports multiple devices.
(IOSPort._testing_device): Map worker number to device.
(IOSPort.device_for_worker_number): Return _testing_device() or _current_device based on using_multiple_devices.
(IOSSimulatorPort): Moved to ios_simulator.py
* Scripts/webkitpy/port/ios_device.py: Added.
(IOSDevicePort): Moved functionality from IOSPort.
(IOSDevicePort.determine_full_port_name): Moved from IOSPort.
(IOSDevicePort._build_driver_flags): Ditto.
(IOSDevicePort.operating_system): Ditto.
* Scripts/webkitpy/port/ios_simulator.py: Added.
(IOSSimulatorPort): Moved from ios.py.
(IOSSimulatorPort.__init__): Init parent class, setup device map.
(IOSSimulatorPort._create_simulators): Use object over unbound methods.
(IOSSimulatorPort.setup_test_run): Ditto.
(IOSSimulatorPort.using_multiple_devices): True if we are managing the simulators.
(IOSSimulatorPort._create_device): Use object over unbound methods.
(IOSSimulatorPort._remove_device): Ditto.
(IOSSimulatorPort.driver_name): Moved to parent class.
(IOSSimulatorPort.driver_cmd_line_for_logging): Ditto.
(IOSSimulatorPort.child_processes): Ditto.
(IOSSimulatorPort._testing_device): Ditto.
(IOSSimulatorPort.device_id_for_worker_number): Renamed as device_for_worker_number.
(SimulatorProcess.__init__): Call find_device_by_udid, device_id_for_worker_number has been removed.
* Scripts/webkitpy/xcode/simulator.py:
(Simulator): Make _managed_devices public.
(Simulator.create_device): Ditto.
(Simulator.remove_device): Ditto.
(Simulator.device_number): Ditto.

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

4 years agoAX: add role aliases for ARIA DPUB module
jcraig@apple.com [Wed, 1 Mar 2017 19:41:56 +0000 (19:41 +0000)]
AX: add role aliases for ARIA DPUB module
https://bugs.webkit.org/show_bug.cgi?id=168978
<rdar://problem/30762724>

Reviewed by Chris Fleizach.

Source/WebCore:

Added role aliases for ARIA DPUB module, and updated existing tests.

Test: accessibility/roles-exposed.html
Test: inspector/dom/getAccessibilityPropertiesForNode.html

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):

LayoutTests:

Added role aliases for ARIA DPUB module.

* accessibility/roles-exposed-expected.txt:
* accessibility/roles-exposed.html:
* inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector/dom/getAccessibilityPropertiesForNode.html:

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

4 years agoDon't call libwebrtc functions if libwebrtc.dylib doesn't exist while testing
achristensen@apple.com [Wed, 1 Mar 2017 19:30:29 +0000 (19:30 +0000)]
Don't call libwebrtc functions if libwebrtc.dylib doesn't exist while testing
https://bugs.webkit.org/show_bug.cgi?id=169045
<rdar://problem/30735413>

Reviewed by Youenn Fablet.

WebRTC tests fail instead of crashing now if libwebrtc.dylib is missing.
All other tests pass instead of crashing immediately when creating an Internals object.

* Modules/mediastream/RTCController.cpp:
(WebCore::RTCController::disableICECandidateFiltering):
(WebCore::RTCController::enableICECandidateFiltering):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::createLibWebRTCPeerConnectionBackend):
* testing/Internals.cpp:
(WebCore::Internals::enableMockMediaEndpoint):
(WebCore::Internals::emulateRTCPeerConnectionPlatformEvent):
(WebCore::Internals::useMockRTCPeerConnectionFactory):
* testing/Internals.h:

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

4 years agoImplement a mega-disassembler that'll be used in the FTL
sbarati@apple.com [Wed, 1 Mar 2017 19:13:37 +0000 (19:13 +0000)]
Implement a mega-disassembler that'll be used in the FTL
https://bugs.webkit.org/show_bug.cgi?id=168685

Reviewed by Mark Lam.

This patch extends the previous Air disassembler to print the
DFG and B3 nodes belonging to particular Air instructions.
The algorithm I'm using to do this is not perfect. For example,
it won't try to print the entire DFG/B3 graph. It'll just print
the related nodes for particular Air instructions. We can make the
algorithm more sophisticated as we get more experience looking at
these IR dumps and get a better feel for what we want out of them.

This is an example of the output:

...
...
200:<!0:->  InvalidationPoint(MustGen, W:SideState, Exits, bc#28, exit: bc#25 --> _getEntry#DlGw2r:<0x10276f980> bc#37)
   Void @54 = Patchpoint(@29:ColdAny, @29:ColdAny, @53:ColdAny, DFG:@200, generator = 0x1015d6c18, earlyClobbered = [], lateClobbered = [], usedRegisters = [%r0, %r19, %r20, %r21, %r22, %fp], resultConstraint = WarmAny, ExitsSideways|WritesPinned|ReadsPinned|Reads:Top)
       Patch &Patchpoint2, %r20, %r20, %r0, @54
 76:< 6:->  GetByOffset(KnownCell:@44, KnownCell:@44, JS|UseAsOther, Array, id3{_elementData}, 2, inferredType = Object, R:NamedProperties(3), Exits, bc#37)  predicting Array
   Int64 @57 = Load(@29, DFG:@76, offset = 32, ControlDependent|Reads:100...101)
       Move 32(%r20), %r5, @57
              0x389cc9ac0:    ldur   x5, [x20, #32]
115:<!0:->  CheckStructure(Cell:@76, MustGen, [0x1027eae20:[Array, {}, ArrayWithContiguous, Proto:0x1027e0140]], R:JSCell_structureID, Exits, bc#46)
   Int32 @58 = Load(@57, DFG:@115, ControlDependent|Reads:16...17)
       Move32 (%r5), %r1, @58
              0x389cc9ac4:    ldur   w1, [x5]
   Int32 @59 = Const32(DFG:@115, 92)
   Int32 @60 = NotEqual(@58, $92(@59), DFG:@115)
   Void @61 = Check(@60:WarmAny, @57:ColdAny, @29:ColdAny, @29:ColdAny, @53:ColdAny, @57:ColdAny, DFG:@115, generator = 0x1057991e0, earlyClobbered = [], lateClobbered = [], usedRegisters = [%r0, %r5, %r19, %r20, %r21, %r22, %fp], ExitsSideways|Reads:Top)
       Patch &Branch32(3,SameAsRep)1, NotEqual, %r1, $92, %r5, %r20, %r20, %r0, %r5, @61
              0x389cc9ac8:    cmp    w1, #92
              0x389cc9acc:    b.ne   0x389cc9dac
117:< 2:->  GetButterfly(Cell:@76, Storage|PureInt, R:JSObject_butterfly, Exits, bc#46)
   Int64 @64 = Load(@57, DFG:@117, offset = 8, ControlDependent|Reads:24...25)
       Move 8(%r5), %r4, @64
              0x389cc9ad0:    ldur   x4, [x5, #8]
 79:< 2:->  GetArrayLength(KnownCell:@76, Untyped:@117, JS|PureInt|UseAsInt, Nonboolint32, Contiguous+OriginalArray+InBounds+AsIs, R:Butterfly_publicLength, Exits, bc#46)
   Int32 @67 = Load(@64, DFG:@79, offset = -8, ControlDependent|Reads:3...4)
       Move32 -8(%r4), %r2, @67
              0x389cc9ad4:    ldur   w2, [x4, #-8]
      192:< 1:->  JSConstant(JS|PureInt, Nonboolint32, Int32: -1, bc#0)
   Int32 @68 = Const32(DFG:@192, -1)
       Move $0xffffffffffffffff, %r1, $-1(@68)
              0x389cc9ad8:    mov    x1, #-1
 83:<!2:->  ArithAdd(Int32:Kill:@79, Int32:Kill:@192, Number|MustGen|PureInt|UseAsInt, Int32, Unchecked, Exits, bc#55)
   Int32 @69 = Add(@67, $-1(@68), DFG:@83)
       Add32 %r2, %r1, %r1, @69
              0x389cc9adc:    add    w1, w2, w1
 86:< 3:->  BitAnd(Check:Int32:@71, Int32:Kill:@83, Int32|UseAsOther|UseAsInt|ReallyWantsInt, Int32, Exits, bc#60)
   Int32 @70 = Below(@53, $-281474976710656(@15), DFG:@86)
   Void @71 = Check(@70:WarmAny, @53:ColdAny, @29:ColdAny, @29:ColdAny, @53:ColdAny, @69:ColdAny, DFG:@86, generator = 0x105799370, earlyClobbered = [], lateClobbered = [], usedRegisters = [%r0, %r1, %r2, %r4, %r5, %r19, %r20, %r21, %r22, %fp], ExitsSideways|Reads:Top)
       Patch &Branch64(3,SameAsRep)0, Below, %r0, %r22, %r0, %r20, %r20, %r0, %r1, @71
              0x389cc9ae0:    cmp    x0, x22
              0x389cc9ae4:    b.lo   0x389cc9dc0
   Int32 @72 = Trunc(@53, DFG:@86)
   Int32 @73 = BitAnd(@69, @72, DFG:@86)
       And32 %r1, %r0, %r1, @73
              0x389cc9ae8:    and    w1, w1, w0
   16:<!0:->  PutStack(KnownInt32:@71, MustGen, loc27, machine:loc3, FlushedInt32, W:Stack(-28), bc#19)
   Int32 @72 = Trunc(@53, DFG:@86)
   Int64 @11 = SlotBase(stack0)
   Void @76 = Store(@72, @11, DFG:@16, offset = 32, ControlDependent|Writes:94...95)
       Move32 %r0, -64(%fp), @76
              0x389cc9aec:    stur   w0, [fp, #-64]
   12:<!0:->  PutStack(Untyped:@86, MustGen, loc28, machine:loc4, FlushedJSValue, W:Stack(-29), bc#19)
   Int64 @77 = ZExt32(@73, DFG:@12)
   Int64 @78 = Add(@77, $-281474976710656(@15), DFG:@12)
       Add64 %r1, %r22, %r3, @78
              0x389cc9af0:    add    x3, x1, x22
   Int64 @11 = SlotBase(stack0)
   Void @81 = Store(@78, @11, DFG:@12, offset = 24, ControlDependent|Writes:95...96)
       Move %r3, -72(%fp), @81
              0x389cc9af4:    stur   x3, [fp, #-72]
   10:<!0:->  PutStack(KnownInt32:@46, MustGen, loc29, machine:loc5, FlushedInt32, W:Stack(-30), bc#19)
   Int32 @82 = Trunc(@24, DFG:@10)
   Int64 @11 = SlotBase(stack0)
   Void @85 = Store(@82, @11, DFG:@10, offset = 16, ControlDependent|Writes:96...97)
       Move32 %r21, -80(%fp), @85
              0x389cc9af8:    stur   w21, [fp, #-80]
  129:<!10:->  GetByVal(KnownCell:Kill:@76, Int32:Kill:@86, Untyped:Kill:@117, JS|MustGen|UseAsOther, FinalOther, Contiguous+OriginalArray+OutOfBounds+AsIs, R:World, W:Heap, Exits, ClobbersExit, bc#19)  predicting FinalOther
   Int32 @89 = AboveEqual(@73, @67, DFG:@129)
   Void @90 = Branch(@89, DFG:@129, Terminal)
       Branch32 AboveOrEqual, %r1, %r2, @90
              0x389cc9afc:    cmp    w1, w2
              0x389cc9b00:    b.hs   0x389cc9bec
...
...

* b3/air/AirDisassembler.cpp:
(JSC::B3::Air::Disassembler::dump):
* b3/air/AirDisassembler.h:
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::lowInt32):
(JSC::FTL::DFG::LowerDFGToB3::lowCell):
(JSC::FTL::DFG::LowerDFGToB3::lowBoolean):
(JSC::FTL::DFG::LowerDFGToB3::lowJSValue):

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

4 years agoMark media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html...
ryanhaddad@apple.com [Wed, 1 Mar 2017 19:03:18 +0000 (19:03 +0000)]
Mark media/modern-media-controls/fullscreen-support/fullscreen-support-enabled.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=168668

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoREGRESSION (r213202?): Assertion failed: (!"initialized()"), function operator().
mark.lam@apple.com [Wed, 1 Mar 2017 18:51:02 +0000 (18:51 +0000)]
REGRESSION (r213202?): Assertion failed: (!"initialized()"), function operator().
https://bugs.webkit.org/show_bug.cgi?id=169042

Not reviewed.

Rolling out r213229 and r213202.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/MachineStackMarker.cpp:
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::machineThreadForCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
* heap/MachineStackMarker.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::classInfo):
* runtime/JSLock.cpp:
(JSC::JSLock::JSLock):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock):
* runtime/JSLock.h:
(JSC::JSLock::ownerThread):
(JSC::JSLock::currentThreadIsHoldingLock): Deleted.
* runtime/PlatformThread.h: Removed.
* runtime/VM.cpp:
(JSC::VM::~VM):
* runtime/VM.h:
(JSC::VM::ownerThread):
* runtime/Watchdog.cpp:
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::shouldTerminate):
(JSC::Watchdog::startTimer):
(JSC::Watchdog::stopTimer):
* tools/JSDollarVMPrototype.cpp:
(JSC::JSDollarVMPrototype::currentThreadOwnsJSLock):
* tools/VMInspector.cpp:

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

4 years ago[css-align] Implement the place-content shorthand
jfernandez@igalia.com [Wed, 1 Mar 2017 18:47:49 +0000 (18:47 +0000)]
[css-align] Implement the place-content shorthand
https://bugs.webkit.org/show_bug.cgi?id=168771

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

The CSS Box Alignment specification defines a new shorthand to set the
Content Alignment properties (align-content and justify-content) at the
same time.

This patch provides the implementation of the CSS parsing logic and the
required regression tests.

Test: css3/parse-place-content.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::CSSPropertyParser::parseShorthand):
* css/parser/CSSPropertyParser.h:

LayoutTests:

Regression tests for the new place-content alignment shorthand.
Added also a new parsing utility script which uses the testharness functions.

* css3/parse-place-content-expected.txt: Added.
* css3/parse-place-content.html: Added.
* css3/resources/alignment-parsing-utils-th.js: Added.
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):

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

4 years agoREGRESSION (r213202?): Assertion failed: (!"initialized()"), function operator()
mark.lam@apple.com [Wed, 1 Mar 2017 18:18:04 +0000 (18:18 +0000)]
REGRESSION (r213202?): Assertion failed: (!"initialized()"), function operator()
https://bugs.webkit.org/show_bug.cgi?id=169042

Reviewed by Filip Pizlo.

* runtime/JSLock.h:
(JSC::JSLock::currentThreadIsHoldingLock):

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

4 years agoREGRESSION(r211344): Remote Inspector: listingForAutomationTarget() is called off...
bburg@apple.com [Wed, 1 Mar 2017 18:03:53 +0000 (18:03 +0000)]
REGRESSION(r211344): Remote Inspector: listingForAutomationTarget() is called off-main-thread, causing assertions
https://bugs.webkit.org/show_bug.cgi?id=168695
<rdar://problem/30643899>

Reviewed by Joseph Pecoraro.

The aforementioned commit added some new calls to update target listings. This causes RemoteInspector
to update some listings underneath an incoming setup message on the XPC queue, which is not a safe place
to gather listing information for RemoteAutomationTargets.

Update the listing asynchronously since we don't need it immediately. Since this really only happens when
the connection to the target is set up and shut down, we can trigger listings to be refreshed from
the async block that's called on the target's queue inside RemoteConnectionToTarget::{setup,close}.

* inspector/remote/RemoteInspector.h:
Make updateListingForTarget(unsigned) usable from RemoteConnectionToTarget.

* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::close):
Grab the target identifier while the RemoteControllableTarget pointer is still valid,
and use it inside the block later after it may have been destructed already. If that happens,
then updateTargetListing will bail out because the targetIdentifier cannot be found in the mapping.

* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::updateTargetListing):
We need to make sure to request a listing push after the target is updated, so implicitly call
pushListingsSoon() from here. That method doesn't require any particular queue or holding a lock.

(Inspector::RemoteInspector::receivedSetupMessage):
(Inspector::RemoteInspector::receivedDidCloseMessage):
(Inspector::RemoteInspector::receivedConnectionDiedMessage):
Remove calls to updateTargetListing() and pushListingsSoon(), as these happen implicitly
and asynchronously on the target's queue when the connection to target is opened or closed.

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

4 years agoTry to fix Windows build after r213191.
simon.fraser@apple.com [Wed, 1 Mar 2017 17:49:59 +0000 (17:49 +0000)]
Try to fix Windows build after r213191.

* platform/spi/win/CoreTextSPIWin.h:

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

4 years agoREGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly...
carlosgc@webkit.org [Wed, 1 Mar 2017 17:36:17 +0000 (17:36 +0000)]
REGRESSION(r213062): [SOUP] UTF-8 filename in Content-Disposition header incorrectly handled since r213062
https://bugs.webkit.org/show_bug.cgi?id=169024

Reviewed by Youenn Fablet.

This made test http/tests/download/literal-utf-8.html to start failing. The problem is that I removed the
conversion made by String::fromUTF8WithLatin1Fallback that was added in r176930. I removed it because that made
fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html to timeout. This patch brings back
the String::fromUTF8WithLatin1Fallback call but only when the header string is 8 bit one.

Fixes: http/tests/download/literal-utf-8.html
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename):

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

4 years agoIndexedDB.IndexedDBMultiProcess is a flaky timeout
ap@apple.com [Wed, 1 Mar 2017 17:23:37 +0000 (17:23 +0000)]
IndexedDB.IndexedDBMultiProcess is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=160780

Reviewed by Brady Eidson.

* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm: Releasing the object
once doesn't necessarily deallocate the object, there can be other references.
We can use -[WKWebView _close] or -[WKWebView _killWebContentProcessAndResetState].
The latter seems more appropriate, because "kill" is what the comment says.

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

4 years ago[GTK] fast/canvas/canvas-createPattern-video-loading.html makes its subsequent test...
carlosgc@webkit.org [Wed, 1 Mar 2017 17:04:43 +0000 (17:04 +0000)]
[GTK] fast/canvas/canvas-createPattern-video-loading.html makes its subsequent test timeout
https://bugs.webkit.org/show_bug.cgi?id=169019

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The timeout happens normally when the media player is deleted and the pipeline state is set to NULL. The call to
gst_element_set_state() never returns because of different deadlocks with the video sink. Sometimes the deadlock
happens with the sample mutex used by VideoRenderRequestScheduler. VideoRenderRequestScheduler::requestRender()
calls webkitVideoSinkRepaintRequested() with the lock held, that ends up calling
MediaPlayerPrivateGStreamerBase::triggerRepaint(). When rendering can't be accelerated the draw timer is
scheduled and triggerRepaint blocks until the timer is fired. If the media player is destroyed before the timer
is fired, when setting the pipeline state to NULL, other VideoRenderRequestScheduler methods can be called, like
stop() that tries to get the sample mutex that is still held by requestRender(). So, first we need to make
sure that requestRender() releases the lock before calling webkitVideoSinkRepaintRequested(). But that's not
enough, we also need to ensure that the pipeline is set to NULL state after everyting has been properly
stopped. This is currently done in ~MediaPlayerPrivateGStreamer that happens before
~MediaPlayerPrivateGStreamerBase, so gst_element_set_state() is hanging before allowing the
MediaPlayerPrivateGStreamerBase to be cleaned up. We should move the call to the end of
~MediaPlayerPrivateGStreamerBase and ensure the draw timer and mutex are properly cleaned up before.

Fixes: fast/canvas/canvas-createPattern-video-loading.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Do not reset pipeline here.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Stop the draw mutex and notify the
lock to ensure we unblock. Do the pipeline reset at the end.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::requestRender): Release the mutex lock before calling webkitVideoSinkRepaintRequested().

LayoutTests:

Unskip tests previously skipped because of this timeout.

* platform/gtk/TestExpectations:

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

4 years ago[WTF] va_list is not ended in StringPrintStream
tpopela@redhat.com [Wed, 1 Mar 2017 15:43:54 +0000 (15:43 +0000)]
[WTF] va_list is not ended in StringPrintStream
https://bugs.webkit.org/show_bug.cgi?id=169035

Reviewed by Michael Saboff.

Also fix whitespace errors while touching this file.

* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::vprintf):
(WTF::StringPrintStream::increaseSize):

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

4 years agoLeak under Options::setOptions
tpopela@redhat.com [Wed, 1 Mar 2017 15:38:14 +0000 (15:38 +0000)]
Leak under Options::setOptions
https://bugs.webkit.org/show_bug.cgi?id=169029

Reviewed by Michael Saboff.

Don't leak the optionsStrCopy variable.

* runtime/Options.cpp:
(JSC::Options::setOptions):

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

4 years agoUpdate peer connection preference
jonlee@apple.com [Wed, 1 Mar 2017 15:12:17 +0000 (15:12 +0000)]
Update peer connection preference
https://bugs.webkit.org/show_bug.cgi?id=169016
rdar://problem/30773889

Reviewed by Eric Carlson.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setEnabledForFeature):
(WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): Deleted.
* UIProcess/WebPreferences.h:

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

4 years agoUnreviewed compiler warning fix after r213218
tpopela@redhat.com [Wed, 1 Mar 2017 14:38:22 +0000 (14:38 +0000)]
Unreviewed compiler warning fix after r213218

* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

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

4 years ago[Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
tpopela@redhat.com [Wed, 1 Mar 2017 14:18:02 +0000 (14:18 +0000)]
[Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
https://bugs.webkit.org/show_bug.cgi?id=169031

Reviewed by Carlos Garcia Campos.

We should compare if height is between -1 and 0 and not mixing height
and width together.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):

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

4 years ago[GTK] Fix problems found by Coverity scan in platform's keyboard and mouse events
tpopela@redhat.com [Wed, 1 Mar 2017 14:16:37 +0000 (14:16 +0000)]
[GTK] Fix problems found by Coverity scan in platform's keyboard and mouse events
https://bugs.webkit.org/show_bug.cgi?id=169028

Reviewed by Carlos Garcia Campos.

* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Initialize
the m_handledByInputMethod member.
* platform/gtk/PlatformMouseEventGtk.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent): Initialize the
m_modifierFlags member.

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

4 years ago[GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
tpopela@redhat.com [Wed, 1 Mar 2017 14:14:04 +0000 (14:14 +0000)]
[GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=169027

Reviewed by Carlos Garcia Campos.

Initialize the lastPagePosition variable and remove an unused one
- totalToPrint.

* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::PrintPagesData::PrintPagesData):

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

4 years ago[GTK] fast/canvas/canvas-createPattern-video-loading.html makes a following test...
commit-queue@webkit.org [Wed, 1 Mar 2017 09:57:07 +0000 (09:57 +0000)]
[GTK] fast/canvas/canvas-createPattern-video-loading.html makes a following test timeout
https://bugs.webkit.org/show_bug.cgi?id=169019

Unreviewed test gardening.

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-03-01

* platform/gtk/TestExpectations: Skip fast/canvas/canvas-createPattern-video-loading.html

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

4 years agoREGRESSION(r207666): [GTK] Layout test imported/w3c/web-platform-tests/html/semantics...
commit-queue@webkit.org [Wed, 1 Mar 2017 09:55:03 +0000 (09:55 +0000)]
REGRESSION(r207666): [GTK] Layout test imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-within-document.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=163850

Unreviewed test gardening.

Skip tests that make its following test timeout.

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-03-01

* platform/gtk/TestExpectations: Skip
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html
and
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-within-document.html.

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

4 years agoMove MemoryPressureHandler to WTF
akling@apple.com [Wed, 1 Mar 2017 09:38:44 +0000 (09:38 +0000)]
Move MemoryPressureHandler to WTF
<https://webkit.org/b/168908>

Reviewed by Sam Weinig.

Source/WebCore:

* CMakeLists.txt:
* PlatformMac.cmake:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.cpp:
* history/PageCache.cpp:
* html/HTMLMediaElement.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorMemoryAgent.h:
* page/FrameView.cpp:
* page/MemoryRelease.h:
* page/linux/ResourceUsageThreadLinux.cpp:
* platform/Linux.cmake:
* platform/graphics/FontCache.cpp:
* platform/graphics/WidthCache.h:
* platform/graphics/ca/TileController.cpp:
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
* platform/ios/LegacyTileCache.mm:
* platform/ios/LegacyTileGrid.mm:
* platform/ios/LegacyTileLayerPool.mm:
* platform/ios/TileControllerMemoryHandlerIOS.cpp:
* testing/Internals.cpp:

Source/WebKit2:

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/mac/NetworkProcessMac.mm:
* PluginProcess/PluginProcess.cpp:
* Shared/linux/WebMemorySamplerLinux.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
* WebProcess/WebPage/ios/WebPageIOS.mm:

Source/WTF:

Move MemoryPressureHandler down to WTF so it can be used from JavaScriptCore.

I had to do a blind rewrite of the Windows memory checking timer since it can
no longer use WebCore::Timer. I also moved the Win32Handle helper class to WTF.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MemoryPressureHandler.cpp: Renamed from Source/WebCore/platform/MemoryPressureHandler.cpp.
(WTF::MemoryPressureHandler::singleton):
(WTF::MemoryPressureHandler::MemoryPressureHandler):
(WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
(WTF::toString):
(WTF::thresholdForPolicy):
(WTF::policyForFootprint):
(WTF::MemoryPressureHandler::measurementTimerFired):
(WTF::MemoryPressureHandler::beginSimulatedMemoryPressure):
(WTF::MemoryPressureHandler::endSimulatedMemoryPressure):
(WTF::MemoryPressureHandler::releaseMemory):
(WTF::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
(WTF::MemoryPressureHandler::install):
(WTF::MemoryPressureHandler::uninstall):
(WTF::MemoryPressureHandler::holdOff):
(WTF::MemoryPressureHandler::respondToMemoryPressure):
(WTF::MemoryPressureHandler::platformReleaseMemory):
(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
(WTF::MemoryPressureHandler::platformInitialize):
* wtf/MemoryPressureHandler.h: Renamed from Source/WebCore/platform/MemoryPressureHandler.h.
(WTF::MemoryPressureHandler::setMemoryKillCallback):
(WTF::MemoryPressureHandler::setProcessIsEligibleForMemoryKillCallback):
(WTF::MemoryPressureHandler::setLowMemoryHandler):
(WTF::MemoryPressureHandler::isUnderMemoryPressure):
(WTF::MemoryPressureHandler::setUnderMemoryPressure):
(WTF::MemoryPressureHandler::ReliefLogger::ReliefLogger):
(WTF::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
(WTF::MemoryPressureHandler::ReliefLogger::logString):
(WTF::MemoryPressureHandler::ReliefLogger::setLoggingEnabled):
(WTF::MemoryPressureHandler::ReliefLogger::loggingEnabled):
(WTF::MemoryPressureHandler::ReliefLogger::MemoryUsage::MemoryUsage):
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformMac.cmake:
* wtf/PlatformWin.cmake:
* wtf/cocoa/MemoryPressureHandlerCocoa.mm: Renamed from Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm.
(WTF::MemoryPressureHandler::platformReleaseMemory):
(WTF::MemoryPressureHandler::install):
(WTF::MemoryPressureHandler::uninstall):
(WTF::MemoryPressureHandler::holdOff):
(WTF::MemoryPressureHandler::respondToMemoryPressure):
(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
* wtf/linux/CurrentProcessMemoryStatus.cpp: Renamed from Source/WebCore/platform/linux/CurrentProcessMemoryStatus.cpp.
(WTF::systemPageSize):
(WTF::currentProcessMemoryStatus):
* wtf/linux/CurrentProcessMemoryStatus.h: Renamed from Source/WebCore/platform/linux/CurrentProcessMemoryStatus.h.
* wtf/linux/MemoryPressureHandlerLinux.cpp: Renamed from Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp.
(WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):
* wtf/win/MemoryPressureHandlerWin.cpp: Renamed from Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp.
(WTF::MemoryPressureHandler::platformInitialize):
(WTF::MemoryPressureHandler::windowsMeasurementTimerFired):
(WTF::MemoryPressureHandler::platformReleaseMemory):
(WTF::MemoryPressureHandler::install):
(WTF::MemoryPressureHandler::uninstall):
(WTF::MemoryPressureHandler::holdOff):
(WTF::MemoryPressureHandler::respondToMemoryPressure):
(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
* wtf/win/Win32Handle.h: Renamed from Source/WebCore/platform/win/Win32Handle.h.
(WTF::Win32Handle::Win32Handle):
(WTF::Win32Handle::~Win32Handle):
(WTF::Win32Handle::clear):
(WTF::Win32Handle::isValid):
(WTF::Win32Handle::get):
(WTF::Win32Handle::release):
(WTF::Win32Handle::operator=):

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

4 years ago[Win] Popup menus are too small in HiDPI mode.
pvollan@apple.com [Wed, 1 Mar 2017 08:45:27 +0000 (08:45 +0000)]
[Win] Popup menus are too small in HiDPI mode.
https://bugs.webkit.org/show_bug.cgi?id=168965

Reviewed by Brent Fulgham.

Scale font with device scale factor.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show):
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* platform/win/PopupMenuWin.h:

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

4 years ago[WebRTC] Install libwebrtc.dylib inside of WebCore.framework
commit-queue@webkit.org [Wed, 1 Mar 2017 08:27:31 +0000 (08:27 +0000)]
[WebRTC] Install libwebrtc.dylib inside of WebCore.framework
https://bugs.webkit.org/show_bug.cgi?id=168859

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-01
Reviewed by Dan Bernstein.

Source/ThirdParty/libwebrtc:

* Configurations/Base.xcconfig:
Define some general configuration variables.

* Configurations/DebugRelease.xcconfig:
Define WK_RELOCATABLE_FRAMEWORKS for Debug/Release builds.

* Configurations/libwebrtc.xcconfig:
Set INSTALL_PATH to be inside WebCore.framework's sub-Frameworks directory
unless WK_USE_OVERRIDE_FRAMEWORKS_DIR. Set the install name of the dylib to
be relative to WebCore / WebKit when frameworks are relocatable, such as
WK_USE_OVERRIDE_FRAMEWORKS_DIR or WK_RELOCATABLE_FRAMEWORKS.

Source/WebCore:

* Configurations/WebCore.xcconfig:
Set library search path to find the libwebrtc.dylib inside of WebCore's Frameworks
or in the WK_OVERRIDE_FRAMEWORKS_DIR.

Source/WebKit2:

* Configurations/BaseTarget.xcconfig:
* Configurations/WebKit.xcconfig:
Set library search path to find the libwebrtc.dylib inside of WebCore's Frameworks
or in the WK_OVERRIDE_FRAMEWORKS_DIR.

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

4 years ago[JSC] Allow UnlinkedCodeBlock to dump its bytecode sequence
utatane.tea@gmail.com [Wed, 1 Mar 2017 08:15:45 +0000 (08:15 +0000)]
[JSC] Allow UnlinkedCodeBlock to dump its bytecode sequence
https://bugs.webkit.org/show_bug.cgi?id=168968

Reviewed by Saam Barati.

This patch decouples dumping bytecode sequence from CodeBlock.
This change allows UnlinkedCodeBlock to dump its bytecode sequence.
It is useful because we now have complex phase between UnlinkedCodeBlock and CodeBlock,
called Generatorification.

We introduce BytecodeDumper<Block>. Both CodeBlock and UnlinkedCodeBlock can use
this class to dump bytecode sequence.

And this patch also adds Option::dumpBytecodesBeforeGeneratorification,
which dumps unlinked bytecode sequence before generatorification if it is enabled.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeDumper.cpp: Added.
(JSC::getStructureID):
(JSC::getSpecialPointer):
(JSC::getPutByIdFlags):
(JSC::getToThisStatus):
(JSC::getPointer):
(JSC::getStructureChain):
(JSC::getStructure):
(JSC::getCallLinkInfo):
(JSC::getBasicBlockLocation):
(JSC::BytecodeDumper<Block>::actualPointerFor):
(JSC::BytecodeDumper<CodeBlock>::actualPointerFor):
(JSC::beginDumpProfiling):
(JSC::BytecodeDumper<Block>::dumpValueProfiling):
(JSC::BytecodeDumper<CodeBlock>::dumpValueProfiling):
(JSC::BytecodeDumper<Block>::dumpArrayProfiling):
(JSC::BytecodeDumper<CodeBlock>::dumpArrayProfiling):
(JSC::BytecodeDumper<Block>::dumpProfilesForBytecodeOffset):
(JSC::dumpRareCaseProfile):
(JSC::dumpArithProfile):
(JSC::BytecodeDumper<CodeBlock>::dumpProfilesForBytecodeOffset):
(JSC::BytecodeDumper<Block>::vm):
(JSC::BytecodeDumper<Block>::identifier):
(JSC::regexpToSourceString):
(JSC::regexpName):
(JSC::printLocationAndOp):
(JSC::isConstantRegisterIndex):
(JSC::debugHookName):
(JSC::BytecodeDumper<Block>::registerName):
(JSC::idName):
(JSC::BytecodeDumper<Block>::constantName):
(JSC::BytecodeDumper<Block>::printUnaryOp):
(JSC::BytecodeDumper<Block>::printBinaryOp):
(JSC::BytecodeDumper<Block>::printConditionalJump):
(JSC::BytecodeDumper<Block>::printGetByIdOp):
(JSC::dumpStructure):
(JSC::dumpChain):
(JSC::BytecodeDumper<Block>::printGetByIdCacheStatus):
(JSC::BytecodeDumper<Block>::printPutByIdCacheStatus):
(JSC::BytecodeDumper<Block>::dumpCallLinkStatus):
(JSC::BytecodeDumper<CodeBlock>::dumpCallLinkStatus):
(JSC::BytecodeDumper<Block>::printCallOp):
(JSC::BytecodeDumper<Block>::printPutByIdOp):
(JSC::BytecodeDumper<Block>::printLocationOpAndRegisterOperand):
(JSC::BytecodeDumper<Block>::dumpBytecode):
(JSC::BytecodeDumper<Block>::dumpIdentifiers):
(JSC::BytecodeDumper<Block>::dumpConstants):
(JSC::BytecodeDumper<Block>::dumpRegExps):
(JSC::BytecodeDumper<Block>::dumpExceptionHandlers):
(JSC::BytecodeDumper<Block>::dumpSwitchJumpTables):
(JSC::BytecodeDumper<Block>::dumpStringSwitchJumpTables):
(JSC::BytecodeDumper<Block>::dumpBlock):
* bytecode/BytecodeDumper.h: Added.
(JSC::BytecodeDumper::BytecodeDumper):
(JSC::BytecodeDumper::block):
(JSC::BytecodeDumper::instructionsBegin):
* bytecode/BytecodeGeneratorification.cpp:
(JSC::BytecodeGeneratorification::BytecodeGeneratorification):
(JSC::performGeneratorification):
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::dumpResults):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
(JSC::CodeBlock::usesOpcode):
(JSC::CodeBlock::valueProfileForBytecodeOffset):
(JSC::CodeBlock::arithProfileForPC):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):
(JSC::idName): Deleted.
(JSC::CodeBlock::registerName): Deleted.
(JSC::CodeBlock::constantName): Deleted.
(JSC::regexpToSourceString): Deleted.
(JSC::regexpName): Deleted.
(JSC::debugHookName): Deleted.
(JSC::CodeBlock::printUnaryOp): Deleted.
(JSC::CodeBlock::printBinaryOp): Deleted.
(JSC::CodeBlock::printConditionalJump): Deleted.
(JSC::CodeBlock::printGetByIdOp): Deleted.
(JSC::dumpStructure): Deleted.
(JSC::dumpChain): Deleted.
(JSC::CodeBlock::printGetByIdCacheStatus): Deleted.
(JSC::CodeBlock::printPutByIdCacheStatus): Deleted.
(JSC::CodeBlock::printCallOp): Deleted.
(JSC::CodeBlock::printPutByIdOp): Deleted.
(JSC::CodeBlock::dumpExceptionHandlers): Deleted.
(JSC::CodeBlock::beginDumpProfiling): Deleted.
(JSC::CodeBlock::dumpValueProfiling): Deleted.
(JSC::CodeBlock::dumpArrayProfiling): Deleted.
(JSC::CodeBlock::dumpRareCaseProfile): Deleted.
(JSC::CodeBlock::dumpArithProfile): Deleted.
(JSC::CodeBlock::printLocationAndOp): Deleted.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Deleted.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::constantRegisters):
(JSC::CodeBlock::numberOfRegExps):
(JSC::CodeBlock::bitVectors):
(JSC::CodeBlock::bitVector):
* bytecode/HandlerInfo.h:
(JSC::HandlerInfoBase::typeName):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::dump):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::getConstant):
* bytecode/UnlinkedInstructionStream.cpp:
(JSC::UnlinkedInstructionStream::UnlinkedInstructionStream):
* bytecode/UnlinkedInstructionStream.h:
(JSC::UnlinkedInstructionStream::Reader::next):
* runtime/Options.h:

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

4 years agoNetworkProcess aborts in WebKit::NetworkLoad::didCompleteWithError at Source/WebKit2...
carlosgc@webkit.org [Wed, 1 Mar 2017 07:34:15 +0000 (07:34 +0000)]
NetworkProcess aborts in WebKit::NetworkLoad::didCompleteWithError at Source/WebKit2/NetworkProcess/NetworkLoad.cpp:423
https://bugs.webkit.org/show_bug.cgi?id=168963

Reviewed by Antti Koivisto.

This is trying to call SpeculativeLoad::didFailLoading() after SpeculativeLoad has already been
completed. SpeculativeLoad::didComplete() call its completion handler that removes the load from
m_pendingPreloads. When the completion handler returns the SpeculativeLoad is deleted. So, we should always
ensure that SpeculativeLoad is not used after didComplete() call. In SpeculativeLoad::willSendRedirectedRequest(),
the call to NetworkLoad::continueWillSendRequest() causes SpeculativeLoad::didFailLoading() to be called. We
don't really need to call continueWillSendRequest() though, since the network load is going to be deleted anyway
by didComplete(), and the willSendRequest completion handler does nothing when the request is null.

* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

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

4 years agoWeb Inspector: RTL: expose the Layout Direction setting in Production builds, keep...
commit-queue@webkit.org [Wed, 1 Mar 2017 05:29:32 +0000 (05:29 +0000)]
Web Inspector: RTL: expose the Layout Direction setting in Production builds, keep using LTR by default
https://bugs.webkit.org/show_bug.cgi?id=168999

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

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.layout):
Remove the WebInspector.isDebugUIEnabled() check around the Layout Direction setting.

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

4 years agoAddressing post-review comments on r213163
mmaxfield@apple.com [Wed, 1 Mar 2017 03:55:41 +0000 (03:55 +0000)]
Addressing post-review comments on r213163
https://bugs.webkit.org/show_bug.cgi?id=168678

Unreviewed.

No new tests because there is no behavior change.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::platformFontLookupWithFamily):

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

4 years ago[mac-wk1] LayoutTest media/modern-media-controls/macos-fullscreen-media-controls...
commit-queue@webkit.org [Wed, 1 Mar 2017 03:04:24 +0000 (03:04 +0000)]
[mac-wk1] LayoutTest media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167589
<rdar://problem/30772101>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-28
Reviewed by Jon Lee.

Making this test more robust by making width assertions timer-based so that we lessen the assumptions
made about when the values ought to be reached.

* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
* platform/mac-wk1/TestExpectations:

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

4 years agoChange JSLock to stash PlatformThread instead of std::thread::id.
mark.lam@apple.com [Wed, 1 Mar 2017 02:54:18 +0000 (02:54 +0000)]
Change JSLock to stash PlatformThread instead of std::thread::id.
https://bugs.webkit.org/show_bug.cgi?id=168996

Reviewed by Filip Pizlo.

PlatformThread is more useful because it allows us to:
1. find the MachineThreads::Thread which is associated with it.
2. suspend / resume threads.
3. send a signal to a thread.

We can't do those with std::thread::id.  We will need one or more of these
capabilities to implement non-polling VM traps later.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::machineThreadForCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::getCurrentPlatformThread): Deleted.
* heap/MachineStackMarker.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::classInfo):
* runtime/JSLock.cpp:
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock): Deleted.
* runtime/JSLock.h:
(JSC::JSLock::ownerThread):
(JSC::JSLock::currentThreadIsHoldingLock):
* runtime/PlatformThread.h: Added.
(JSC::currentPlatformThread):
* runtime/VM.cpp:
(JSC::VM::~VM):
* runtime/VM.h:
(JSC::VM::ownerThread):
* runtime/Watchdog.cpp:
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::shouldTerminate):
(JSC::Watchdog::startTimer):
(JSC::Watchdog::stopTimer):
* tools/JSDollarVMPrototype.cpp:
(JSC::JSDollarVMPrototype::currentThreadOwnsJSLock):
* tools/VMInspector.cpp:

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

4 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Wed, 1 Mar 2017 02:19:43 +0000 (02:19 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=169012

Unreviewed GTK+ gardening. New test results after r213149
  - platform/gtk/fast/replaced/table-percent-height.html PASS
  - tables/mozilla/bugs/bug32205-5.html FAIL

* platform/gtk/TestExpectations:
* platform/gtk/fast/replaced/table-percent-height-expected.txt:

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

4 years ago[mac-wk1 Debug] LayoutTest media/modern-media-controls/rewind-button/rewind-button...
commit-queue@webkit.org [Wed, 1 Mar 2017 01:24:30 +0000 (01:24 +0000)]
[mac-wk1 Debug] LayoutTest media/modern-media-controls/rewind-button/rewind-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167352
<rdar://problem/30771343>

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

Use the asynchronous assertion methods for this test to be on the safe side, this should address flakiness.

* media/modern-media-controls/rewind-button/rewind-button-expected.txt:
* media/modern-media-controls/rewind-button/rewind-button.html:
* platform/mac-wk1/TestExpectations:

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

4 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Wed, 1 Mar 2017 01:18:18 +0000 (01:18 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=169005

Rebaseline platform/gtk/css3/flexbox/line-wrapping.html test.
The following tests fail, so updated TextExpectations accordingly:
  - css3/flexbox/flex-item-contains-strict.html
  - css3/flexbox/overflow-auto-resizes-correctly.html

* platform/gtk/css3/flexbox/line-wrapping-expected.txt:
* platform/gtk/TestExpectations:

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

4 years agohttps://bugs.webkit.org/show_bug.cgi?id=168899
ap@apple.com [Wed, 1 Mar 2017 01:17:18 +0000 (01:17 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=168899
Re-add deprecated functions to WKPageGroup.h

Reviewed by Tim Horton.

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPageGroupRemoveUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters): Deleted. Unlike the other three, this
function isn't used by any clients.
* UIProcess/API/C/WKPageGroup.h:

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

4 years ago[mac-wk1 debug] LayoutTest media/modern-media-controls/skip-back-button/skip-back...
commit-queue@webkit.org [Wed, 1 Mar 2017 01:10:40 +0000 (01:10 +0000)]
[mac-wk1 debug] LayoutTest media/modern-media-controls/skip-back-button/skip-back-button.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=164620
<rdar://problem/30771094>

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

Use the asynchronous assertion methods for this test to be on the safe side, this should address flakiness.

* media/modern-media-controls/skip-back-button/skip-back-button-expected.txt:
* media/modern-media-controls/skip-back-button/skip-back-button.html:

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

4 years agoLayoutTest media/modern-media-controls/airplay-support/airplay-support.html is a...
commit-queue@webkit.org [Wed, 1 Mar 2017 01:08:12 +0000 (01:08 +0000)]
LayoutTest media/modern-media-controls/airplay-support/airplay-support.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167442
<rdar://problem/30770374>

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

This test would sometime fail when calling media.webkitShowPlaybackTargetPicker() due to the requirement
that the media be playable for that call to succeed. So we add an event listener for the "canplay" event
before we proceed to ensure that this call will always succeed. The fact that the media is playing is
irrelevant so we remove the "autoplay" attribute.

* media/modern-media-controls/airplay-support/airplay-support.html:
* platform/mac/TestExpectations:

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

4 years agoExpose _WKVisitedLinkProvider in a header
ap@apple.com [Wed, 1 Mar 2017 01:04:01 +0000 (01:04 +0000)]
Expose _WKVisitedLinkProvider in a header
https://bugs.webkit.org/show_bug.cgi?id=168955

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
* UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
The class needs to be visible in a header, as it is exported SPI.

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

4 years agoLayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html...
commit-queue@webkit.org [Wed, 1 Mar 2017 01:01:49 +0000 (01:01 +0000)]
LayoutTest media/modern-media-controls/placard-support/placard-support-airplay.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=167441
<rdar://problem/30770034>

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

This test would sometime fail when calling media.webkitShowPlaybackTargetPicker() due to the requirement
that the media be playable for that call to succeed. So we add an event listener for the "canplay" event
before we proceed to ensure that this call will always succeed. The fact that the media is playing is
irrelevant so we remove the "autoplay" attribute.

* media/modern-media-controls/placard-support/placard-support-airplay.html:
* platform/mac/TestExpectations:

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

4 years agoMove resolving symlinks of some WebsiteDataStore paths from WebProcessPool to......
beidson@apple.com [Wed, 1 Mar 2017 00:53:52 +0000 (00:53 +0000)]
Move resolving symlinks of some WebsiteDataStore paths from WebProcessPool to... WebsiteDataStore!.
https://bugs.webkit.org/show_bug.cgi?id=168696.

Reviewed by Alex Christensen.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory):
(WebKit::WebsiteDataStore::resolvedMediaCacheDirectory):
(WebKit::WebsiteDataStore::resolvedMediaKeysDirectory):
(WebKit::WebsiteDataStore::resolvedDatabaseDirectory):

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

4 years agoDon't use the LinearGlyphMask format if accelerated drawing is disabled
simon.fraser@apple.com [Wed, 1 Mar 2017 00:20:28 +0000 (00:20 +0000)]
Don't use the LinearGlyphMask format if accelerated drawing is disabled
https://bugs.webkit.org/show_bug.cgi?id=168997

Reviewed by Tim Horton.

Non-accelerated drawing doesn't work into LinearGlyphMask-format backing store,
so don't use that backing store format when accelerated drawing is disabled.

* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::drawRepaintIndicator):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(layerContentsFormat):
(PlatformCALayerCocoa::updateContentsFormat):

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

4 years agoMake the repaint indicators show subpixel antialiased text indication a bit more...
simon.fraser@apple.com [Wed, 1 Mar 2017 00:20:24 +0000 (00:20 +0000)]
Make the repaint indicators show subpixel antialiased text indication a bit more clearly
https://bugs.webkit.org/show_bug.cgi?id=168988

Reviewed by Tim Horton.

Put a more obvious stroke around the repaint count when subpixel-antialiased layer text is enabled.

* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::drawRepaintIndicator):
(WebCore::PlatformCALayer::drawTextAtPoint):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::drawTextAtPoint):
* platform/graphics/ca/win/PlatformCALayerWin.h:

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

4 years agoLibWebRTCProvider should check existence of libwebrtc.dylib
achristensen@apple.com [Wed, 1 Mar 2017 00:07:23 +0000 (00:07 +0000)]
LibWebRTCProvider should check existence of libwebrtc.dylib
https://bugs.webkit.org/show_bug.cgi?id=168986
Source/WebCore:

<rdar://problem/30735413>

Reviewed by Youenn Fablet.

Some configurations of the webrtc tests overwrite the availability of WebRTC in order to test it
with MockLibWebRTCPeerConnection.  If the dylib can not be found, we can't use it, so we want to
fail these tests rather than crashing calling rtc::LogMessage::LogToDebug.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
(WebCore::LibWebRTCMediaEndpoint::doCreateAnswer):
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::factory):
(WebCore::LibWebRTCProvider::webRTCAvailable):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::useMockRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):

Source/WebKit2:

Reviewed by Youenn Fablet.

* Shared/WebPreferencesDefinitions.h:
* Shared/WebPreferencesStore.cpp:
* UIProcess/WebPreferences.cpp:
(WebKit::checkWebRTCAvailability): Deleted.

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

4 years agoUnreviewed, build fix after r213176.
wenson_hsieh@apple.com [Wed, 1 Mar 2017 00:01:57 +0000 (00:01 +0000)]
Unreviewed, build fix after r213176.

* Platform/spi/ios/UIKitSPI.h:

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