WebKit-https.git
2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 years agoWeb Inspector: It is possible to get the New Tab button in addition to the seven...
commit-queue@webkit.org [Tue, 28 Feb 2017 23:34:23 +0000 (23:34 +0000)]
Web Inspector: It is possible to get the New Tab button in addition to the seven expected tabs
https://bugs.webkit.org/show_bug.cgi?id=168976

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

* UserInterface/Views/TabBar.css:
(.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned):hover > .icon):
(.tab-bar.collapsed:not(.hide-titles) > .item:hover > .close):
(.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned, .default-tab):hover > .icon): Deleted.
(.tab-bar.collapsed:not(.hide-titles) > .item:not(.default-tab):hover > .close): Deleted.

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

2 years agoWeb Inspector: CSS variable uses that are unresolved should have an error or warning...
commit-queue@webkit.org [Tue, 28 Feb 2017 23:33:55 +0000 (23:33 +0000)]
Web Inspector: CSS variable uses that are unresolved should have an error or warning icon
https://bugs.webkit.org/show_bug.cgi?id=168352

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

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
Insert a warning icon if the variable is not found in the computed style.

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

2 years agoAdd ability for webkitpy to run bindings tests
commit-queue@webkit.org [Tue, 28 Feb 2017 23:24:42 +0000 (23:24 +0000)]
Add ability for webkitpy to run bindings tests
https://bugs.webkit.org/show_bug.cgi?id=168979

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-02-28
Reviewed by Alexey Proskuryakov.

This allows the below command to run bindings tests with json output, and is a required part
of adding an EWS for bindings tests. (Note: this won't build because --build is not passed).
webkit-patch build-and-test --no-clean --no-update  --test --non-interactive --group="bindings"

* Scripts/webkitpy/port/base.py:
(Port.bindings_results_directory): Return the directory to place JSON results for bindings tests.
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run): Checks if we should be running bindings tests.
(RunTests._run_bindings_tests): Generates the command for bindings tests, and executes it.
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(test_runtests_bindings): Unit test for the generated run-bindings-tests command.

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

2 years ago[WebRTC] CPU Overuse libwebrtc detector is decreasing the quality of the video
commit-queue@webkit.org [Tue, 28 Feb 2017 23:22:31 +0000 (23:22 +0000)]
[WebRTC] CPU Overuse libwebrtc detector is decreasing the quality of the video
https://bugs.webkit.org/show_bug.cgi?id=168990

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

* Source/webrtc/video/vie_encoder.cc: Disabling temporarily overuse detector.

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

2 years agoApply a review comment that was missing in r213182
timothy_horton@apple.com [Tue, 28 Feb 2017 23:21:01 +0000 (23:21 +0000)]
Apply a review comment that was missing in r213182

* loader/ios/QuickLook.mm:
(WebCore::isQuickLookPreviewURL):

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

2 years ago[iOS] Getting QLPreviewProtocol slows down first navigation in Web process
timothy_horton@apple.com [Tue, 28 Feb 2017 23:18:12 +0000 (23:18 +0000)]
[iOS] Getting QLPreviewProtocol slows down first navigation in Web process
https://bugs.webkit.org/show_bug.cgi?id=168940
<rdar://problem/29468999>

Reviewed by Simon Fraser.

No new tests, just a performance improvement.

* loader/DocumentLoader.cpp:
(WebCore::isRemoteWebArchive):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
Make use of isQuickLookPreviewURL.

* loader/ios/QuickLook.h:
* loader/ios/QuickLook.mm:
(WebCore::isQuickLookPreviewURL):
Add isQuickLookPreviewURL, which first early-returns if the protocol
of the URL is a well-known protocol, and then falls back to loading QuickLook.

In a microbenchmark this is a 30-40% improvement in total time spent
loading an empty HTML document (wall-clock time between loadHTMLString
and didFinishNavigation).

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
Make use of isQuickLookPreviewURL.

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

2 years agoFix API test regression(s):
beidson@apple.com [Tue, 28 Feb 2017 23:08:28 +0000 (23:08 +0000)]
Fix API test regression(s):
REGRESSION (r213168): API test WKUserContentController.ScriptMessageHandlerMultipleHandlerRemoval crashing
https://bugs.webkit.org/show_bug.cgi?id=168991

Unreviewed.

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

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

2 years ago[WebRTC] Fix an internal production build
achristensen@apple.com [Tue, 28 Feb 2017 23:05:13 +0000 (23:05 +0000)]
[WebRTC] Fix an internal production build
https://bugs.webkit.org/show_bug.cgi?id=168992

Reviewed by Youenn Fablet.

* libwebrtc.xcodeproj/project.pbxproj:
Link with Foundation and CoreFoundation frameworks.

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

2 years agoEnable the SigillCrashAnalyzer by default for iOS.
mark.lam@apple.com [Tue, 28 Feb 2017 23:02:23 +0000 (23:02 +0000)]
Enable the SigillCrashAnalyzer by default for iOS.
https://bugs.webkit.org/show_bug.cgi?id=168989

Reviewed by Keith Miller.

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

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

2 years agoAdd Geolocation and DeviceOrientation to features.json
simon.fraser@apple.com [Tue, 28 Feb 2017 23:01:12 +0000 (23:01 +0000)]
Add Geolocation and DeviceOrientation to features.json

* features.json:

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

2 years agoTest fix after r213163
ryanhaddad@apple.com [Tue, 28 Feb 2017 22:49:19 +0000 (22:49 +0000)]
Test fix after r213163
https://bugs.webkit.org/show_bug.cgi?id=168678

Unreviewed.

Tests and builds are timing out because this file is gigantic.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2017-02-28

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

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

2 years agoData interaction should support attachment elements
wenson_hsieh@apple.com [Tue, 28 Feb 2017 22:11:07 +0000 (22:11 +0000)]
Data interaction should support attachment elements
https://bugs.webkit.org/show_bug.cgi?id=168916
<rdar://problem/30664519>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Teaches DragController to recognize and initiate dragging on attachment elements, and also adds a new
convenience method to the WebItemProviderPasteboard for block enumeration of available UIItemProviders. Covered
by a new API test: DataInteractionTests.AttachmentElementItemProviders.

* page/DragController.cpp:
(WebCore::DragController::draggableElement):
(WebCore::DragController::startDrag):
* platform/ios/WebItemProviderPasteboard.h:
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard enumerateItemProvidersWithBlock:]):

Source/WebKit2:

Teaches WKContentView to recognize attachment elements as data interactive content, and add an internal hook to
adjust the list of item providers before initiating data interaction.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _adjustedDataInteractionItemProviders:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView pointIsInDataInteractionContent:]):

Tools:

Adds a new unit test verifying that a client injected bundle is able to augment UIItemProvider data vended to
the UI process.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/attachment-element.html: Added.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(-[CustomItemProviderWebView _adjustedDataInteractionItemProviders:]):
(TestWebKitAPI::TEST):

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

2 years agoRemove setExclusiveThread() and peers from the JSLock.
mark.lam@apple.com [Tue, 28 Feb 2017 21:56:44 +0000 (21:56 +0000)]
Remove setExclusiveThread() and peers from the JSLock.
https://bugs.webkit.org/show_bug.cgi?id=168977

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

JSLock::setExclusiveThread() was only used by WebCore.  Benchmarking with
Speedometer, we see that removal of exclusive thread status has no measurable
impact on performance.  So, let's remove the code for handling exclusive thread
status, and simplify the JSLock code.

For the records, exclusive thread status does improve JSLock locking/unlocking
time by up to 20%.  However, this difference is not measurable in the way WebCore
uses the JSLock as confirmed by Speedometer.

Also applied a minor optimization in JSLock::lock() to assume the initial lock
entry case (as opposed to the re-entry case).  This appears to shows a small
fractional improvement (about 5%) in JSLock cumulative locking and unlocking
time in a micro-benchmark.

* heap/Heap.cpp:
(JSC::Heap::Heap):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
* runtime/JSLock.cpp:
(JSC::JSLock::JSLock):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock):
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::grabAllLocks):
(JSC::JSLock::setExclusiveThread): Deleted.
* runtime/JSLock.h:
(JSC::JSLock::ownerThread):
(JSC::JSLock::hasExclusiveThread): Deleted.
(JSC::JSLock::exclusiveThread): Deleted.
* runtime/VM.h:
(JSC::VM::hasExclusiveThread): Deleted.
(JSC::VM::exclusiveThread): Deleted.
(JSC::VM::setExclusiveThread): Deleted.

Source/WebCore:

No new tests because this should already be covered by existing tests.

* bindings/js/CommonVM.cpp:
(WebCore::commonVMSlow):

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

2 years agoLayoutTest workers/sab/postMessage-clones.html is a flaky failure
ap@apple.com [Tue, 28 Feb 2017 21:54:38 +0000 (21:54 +0000)]
LayoutTest workers/sab/postMessage-clones.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168129

Reviewed by Tim Horton.

* workers/sab/postMessage-clones-expected.txt:
* workers/sab/postMessage-clones.html:
Fix raciness, and update the test to modern style.

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

2 years agoCentering text inside a button set to display flex and justify-content: center is...
hyatt@apple.com [Tue, 28 Feb 2017 21:47:38 +0000 (21:47 +0000)]
Centering text inside a button set to display flex and justify-content: center is impossible
https://bugs.webkit.org/show_bug.cgi?id=148872
<rdar://problem/22590086>

Reviewed by Simon Fraser.

Source/WebCore:

Added new test in fast/forms.

* rendering/RenderButton.cpp:
(WebCore::RenderButton::addChild):
(WebCore::RenderButton::updateAnonymousChildStyle):
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::styleWillChange): Deleted.
(WebCore::RenderButton::setupInnerStyle): Deleted.
* rendering/RenderButton.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderElement.h:
(WebCore::RenderElement::updateAnonymousChildStyle):

LayoutTests:

* fast/forms/button-set-display-flex-justifyContent-center-expected.html: Added.
* fast/forms/button-set-display-flex-justifyContent-center.html: Added.

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

2 years ago[Modern Media Controls] Add missing compact mode assets for macOS
commit-queue@webkit.org [Tue, 28 Feb 2017 21:45:18 +0000 (21:45 +0000)]
[Modern Media Controls] Add missing compact mode assets for macOS
https://bugs.webkit.org/show_bug.cgi?id=168980
<rdar://problem/30763269>

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

Adding missing compact mode assets for the AirPlay, tracks, PiP and volume buttons.

* Modules/modern-media-controls/controls/icon-service.js:
* Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css:
(.media-controls.mac.inline.compact button.airplay):
(.media-controls.mac.inline.compact button.pip):
(.media-controls.mac.inline.compact button.tracks):
* Modules/modern-media-controls/images/macOS/airplay-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/media-selection-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/media-selection-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-in-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-in-compact@2x.png: Added.
* Modules/modern-media-controls/images/macOS/volume-compact@1x.png:
* Modules/modern-media-controls/images/macOS/volume-compact@2x.png:
* Modules/modern-media-controls/images/macOS/volume-mute-compact@1x.png: Added.
* Modules/modern-media-controls/images/macOS/volume-mute-compact@2x.png: Added.

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

2 years agoArm64 disassembler prints "ars" instead of "asr"
sbarati@apple.com [Tue, 28 Feb 2017 21:30:43 +0000 (21:30 +0000)]
Arm64 disassembler prints "ars" instead of "asr"
https://bugs.webkit.org/show_bug.cgi?id=168923

Rubber stamped by Michael Saboff.

* disassembler/ARM64/A64DOpcode.cpp:
(JSC::ARM64Disassembler::A64DOpcodeBitfield::format):

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

2 years agoAdd delegate method to handle images with alternate data.
commit-queue@webkit.org [Tue, 28 Feb 2017 21:28:58 +0000 (21:28 +0000)]
Add delegate method to handle images with alternate data.
https://bugs.webkit.org/show_bug.cgi?id=168785
<rdar://problem/28776219>

Add delegate methods to WKUIDelegatePrivate so that a WebKit client can provide alternate URL or data for an image
before long-press or preview. When an image has alternate URL or data, we can change the actions accordingly.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2017-02-28
Reviewed by Enrica Casucci.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add two delegate methods _webView:getAlternateURLFromImage:completionHandler:
    and _webView:alternateURLFromImage:userInfo;
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Add an readonly property userInfo so that alternate data can be
    carried by _WKActivatedElementInfo and be processed by WebKit client.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]):
(-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]): A new initializer that also takes userInfo.
(-[_WKActivatedElementInfo userInfo]):
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: A new delegate method for WKActionSheetAssistantDelegate to fetch
    alternate data before showing image sheet.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]): Before showing the image sheet, if the image doesn't have linked URL (i.e. not a image
    link), try to fetch its alternate URL and data.
(-[WKActionSheetAssistant defaultActionsForImageSheet:]): Drive-by fix. We always use positionInformation's URL to populate the
    actions, however, we should use elementInfo's URL since the two URLs could mismatch.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:getAlternateURLForImage:completion:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]): Before previewing an image, synchronously get alternate
    data for the image and update the actions accordingly.

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

2 years ago[iOS] Throttle requestAnimationFrame to 30fps in low power mode
cdumez@apple.com [Tue, 28 Feb 2017 21:26:27 +0000 (21:26 +0000)]
[iOS] Throttle requestAnimationFrame to 30fps in low power mode
https://bugs.webkit.org/show_bug.cgi?id=168837
<rdar://problem/30700929>

Reviewed by Simon Fraser.

Source/WebCore:

Throttle requestAnimationFrame to 30fps in low power mode on iOS to save battery.

ScriptedAnimationController now maintains an OptionSet of throttling reasons.
Throttling reasons for now are: OutsideViewport, VisuallyIdle, and LowPowerMode.
The requestAnimationFrame interval is then determined based on those throttling
reasons:
- OutsideViewport or VisuallyIdle: 10 seconds (very aggressive throttling)
- LowPowerMode: 30fps
- No reasons: 60fps

The Page now keeps track of low power mode state using a LowPowerModeNotifier.
Whenever low power mode changes, it updates the throttling reasons in all the
documents' ScriptedAnimationControllers in the frame tree.

Tests: fast/animation/request-animation-frame-throttling-detached-iframe.html
       fast/animation/request-animation-frame-throttling-lowPowerMode.html

* dom/Document.cpp:
(WebCore::Document::requestAnimationFrame):
* dom/Document.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::throttlingReasonToString):
(WebCore::throttlingReasonsToString):
(WebCore::ScriptedAnimationController::addThrottlingReason):
(WebCore::ScriptedAnimationController::removeThrottlingReason):
(WebCore::ScriptedAnimationController::isThrottled):
(WebCore::ScriptedAnimationController::interval):
(WebCore::ScriptedAnimationController::page):
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::create):
* page/FrameView.cpp:
(WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::isLowPowerModeEnabled):
(WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
(WebCore::updateScriptedAnimationsThrottlingReason):
(WebCore::Page::setIsVisuallyIdleInternal):
(WebCore::Page::handleLowModePowerChange):
* page/Page.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::requestAnimationFrameInterval):
(WebCore::Internals::setLowPowerModeEnabled):
* testing/Internals.h:
* testing/Internals.idl:

Source/WTF:

Add support for operator -= on WTF::OptionSet for convenience:
    set -= Enum::A;
looks much better than:
    set = set - Enum::A;

* wtf/OptionSet.h:
(WTF::OptionSet::operator-=):

Tools:

Add unit test for -= operator on WTF::OptionSet.

* TestWebKitAPI/Tests/WTF/OptionSet.cpp:
(TestWebKitAPI::TEST):

LayoutTests:

Add layout test coverage.

* fast/animation/request-animation-frame-throttling-detached-iframe-expected.txt: Added.
* fast/animation/request-animation-frame-throttling-detached-iframe.html: Added.
* fast/animation/request-animation-frame-throttling-lowPowerMode-expected.txt: Added.
* fast/animation/request-animation-frame-throttling-lowPowerMode.html: Added.
* fast/animation/resources/frame-with-animation.html: Added.

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

2 years agoRefactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
beidson@apple.com [Tue, 28 Feb 2017 21:24:50 +0000 (21:24 +0000)]
Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
https://bugs.webkit.org/show_bug.cgi?id=168676

Reviewed by Alex Christensen and Sam Weinig.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:

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

2 years ago[WebRTC] Limit libwebrtc logging in Debug build
commit-queue@webkit.org [Tue, 28 Feb 2017 21:13:46 +0000 (21:13 +0000)]
[WebRTC] Limit libwebrtc logging in Debug build
https://bugs.webkit.org/show_bug.cgi?id=168974

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

Source/WebCore:

Covered by manual testing..

* platform/Logging.h:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::callOnWebRTCSignalingThread):

Source/WebKit2:

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::NetworkRTCProvider):
* Platform/Logging.h:

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

2 years ago[WebRTC] NetworkRTCProvider should stop the network thread from the main thread
commit-queue@webkit.org [Tue, 28 Feb 2017 21:02:25 +0000 (21:02 +0000)]
[WebRTC] NetworkRTCProvider should stop the network thread from the main thread
https://bugs.webkit.org/show_bug.cgi?id=168972

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

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::close): Ensuring to stop the network thread from the main thread when provider is
getting closed.

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

2 years agoUse of arguments in arrow function is slow
gskachkov@gmail.com [Tue, 28 Feb 2017 20:57:35 +0000 (20:57 +0000)]
Use of arguments in arrow function is slow
https://bugs.webkit.org/show_bug.cgi?id=168829

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/arrowfunciton-direct-arguments.js: Added.
(fn):
* microbenchmarks/arrowfunciton-reference-arguments.js: Added.
(fn):

Source/JavaScriptCore:

Current patch improves performance access to arguments within arrow functuion
by preventing create arguments variable within arrow function, also allow to cache
arguments variable. Before arguments variable always have Dynamic resolve type, after
patch it can be ClosureVar, that increase performance of access to arguments variable
in 9 times inside of the arrow function.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* runtime/JSScope.cpp:
(JSC::abstractAccess):

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

2 years agowebkitpy: Regular expression for parsing simctl device information is wrong for iPad Pro
jbedard@apple.com [Tue, 28 Feb 2017 20:51:48 +0000 (20:51 +0000)]
webkitpy: Regular expression for parsing simctl device information is wrong for iPad Pro
https://bugs.webkit.org/show_bug.cgi?id=168394

Reviewed by Daniel Bates.

* Scripts/webkitpy/xcode/simulator.py:
(Simulator): Allow for parenthesis in device name.
* Scripts/webkitpy/xcode/simulator_unittest.py: Add iPad Pro to test.

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

2 years ago[macOS] Migrate off of CTFontCreateForCSS
mmaxfield@apple.com [Tue, 28 Feb 2017 20:40:14 +0000 (20:40 +0000)]
[macOS] Migrate off of CTFontCreateForCSS
https://bugs.webkit.org/show_bug.cgi?id=168678

Reviewed by David Hyatt.

Source/WebCore:

This patch implements the Font Matching Algorithm detailed in
https://drafts.csswg.org/css-fonts-4/#font-matching-algorithm
Previously, this was implemented inside Core Text (via
CTFontCreateForCSS()), but that implementation does not understand
variation fonts. Therefore it should move to WebKit (along with
the general fact that CSS algorithms should be implemented in a
CSS engine, not the platform's text engine).

This implementation is not completely divorced from the platform,
however - Core Text exposes font weights on a [-1, 1] range, but
CSS operates on a [1, 999] range. In order to provide the mapping
to CSS weights, Core Text infrastructure is necessary. Therefore,
this new implementation of the matching algorithm is only used
on certain operating systems.

The new implementation of the algorithm is not bug-compatible with
the existing implementation; this patch does represent a behavior
change. However, I have reviewed the differences manually and
believe this algorithm to be a progression over the previous one
(except for one case with Helvetica Neue - see
LayoutTests/ChangeLog for more information about that).

This patch also represents a 27% performance progression on our
standard page load test (just measuring the performance of the font
matching algorithm, and nothing else). (Because font matching is
only a small part of the entire test, the overall progression is
much smaller.)

Tests: FontCacheTest.FontLookupFromFamilyName
       FontCacheTest.FontLookupFromPostScriptName

* platform/graphics/FontCache.h:
(WebCore::FontCache::createFontPlatformDataForTesting): Allow for
unit testing.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::isSystemFont): Inlined.
(WebCore::FontDatabase::singleton): Cache results of Core Text
lookups.
(WebCore::FontDatabase::Range::Range): Because of variation fonts,
fonts' weights, widths, and slopes need to be represented as a range
instead of an individual value.
(WebCore::FontDatabase::Range::isValid):
(WebCore::FontDatabase::Range::expand):
(WebCore::FontDatabase::Range::includes):
(WebCore::FontDatabase::InstalledFont::InstalledFont): Represents a
Font Descriptor as well as some lookup information about it.
(WebCore::FontDatabase::InstalledFontCollection::InstalledFontCollection):
A collection of installed fonts.
(WebCore::FontDatabase::InstalledFontCollection::insertInstalledFont):
Cache minima and maxima.
(WebCore::FontDatabase::InstalledFontCollection::isEmpty):
(WebCore::FontDatabase::InstalledFontCollection::size):
(WebCore::FontDatabase::lookupFamilyName): Get all the fonts in
the family.
(WebCore::FontDatabase::lookupPostScriptName): Get the font with
the given PostScript name.
(WebCore::FontDatabase::clear):
(WebCore::FontDatabase::FontDatabase): Cache.
(WebCore::iterateActiveFontsWithReturn): The Font Matching Algorithm
works by starting with every font in the family, and the eliminating
items from the set iteratively. Instead of actually removing items
from a vector or linked list, we instead want to treat the collection
as immutable and keep a parallel side-table of which items have been
eliminated (in order to reduce copies and allocations). This makes
sense because most families only have a handful of fonts in them.
This function consults with the side-table to iterate only over the
fonts which have not been eliminated.
(WebCore::iterateActiveFonts): Ditto.
(WebCore::findClosestStretch):
(WebCore::filterStretch): Eliminate fonts based on their stretch
value.
(WebCore::findClosestStyle):
(WebCore::filterStyle): Eliminate fonts based on their style value.
(WebCore::findClosestWeight):
(WebCore::filterWeight): Eliminate fonts based on their weight value.
(WebCore::computeTargetWeight):
(WebCore::findClosestFont): If we have a set of fonts in a family,
select the font in the set which best matches the criteria.
(WebCore::platformFontLookupWithFamily): While findClosestFont()
function satisfies the spec's notion of the font matching algorithm,
WebKit actually claims to be able to look up fonts by their PostScript
name. Therefore, this function has a higher-level of logic to rectify
the confusion that results when the PostScript name doesn't agree with
the other CSS properties (like if you say "Helvetica-Bold" but also say
font-weight: 100).
* platform/spi/cocoa/CoreTextSPI.h: Add signature for system CSS
font weight support.

Tools:

Exhaustively test the font matching algorithm on Sierra.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/FontCache.cpp: Added.
(TestWebKitAPI::FontCacheTest::SetUp):
(TestWebKitAPI::createPlatformFont):
(TestWebKitAPI::compareFonts):
(TestWebKitAPI::TEST_F):

LayoutTests:

Updating test results.

Note that there is a slight regression here with Helvetica Neue. In
particular, this family includes a Bold font with a weight of 700,
and a Condensed Black font with a weight of 900. Because we don't
currently have any notion of font-stretch, our model can only
distinguish between these fonts due to their differing weights, not
their widths. This means that requests for weights 800 or 900 will
match the Condensed Black font in accordance with the font matching
algorithm. This gives visually surprising results because weights
100-700 match regular-width fonts.

However, this regression is intentional and temporary - my next task
is to properly implement font-stretch, which will educate our model
on the difference between these two fonts. This will fix the regression
and allow the tests below to be reset to their original expected
results.

* platform/mac-elcapitan/fast/text/font-weights-expected.png: Copied from LayoutTests/platform/mac/fast/text/font-weights-expected.png.
* platform/mac-elcapitan/fast/text/font-weights-expected.txt: Copied from LayoutTests/platform/mac/fast/text/font-weights-expected.txt.
* platform/mac-elcapitan/fast/text/font-weights-zh-expected.png: Copied from LayoutTests/platform/mac/fast/text/font-weights-zh-expected.png.
* platform/mac-elcapitan/fast/text/font-weights-zh-expected.txt: Copied from LayoutTests/platform/mac/fast/text/font-weights-zh-expected.txt.
* platform/mac/fast/text/font-weights-expected.png:
* platform/mac/fast/text/font-weights-expected.txt:
* platform/mac/fast/text/font-weights-zh-expected.png:
* platform/mac/fast/text/font-weights-zh-expected.txt:

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

2 years agoWindows build doesn't start build if the git branch is not master
commit-queue@webkit.org [Tue, 28 Feb 2017 20:36:43 +0000 (20:36 +0000)]
Windows build doesn't start build if the git branch is not master
https://bugs.webkit.org/show_bug.cgi?id=168843

Patch by Basuke Suzuki <Basuke.Suzuki@am.sony.com> on 2017-02-28
Reviewed by Myles C. Maxfield.

Use correct value for product base dir.

* Scripts/build-webkit:

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

2 years agoMedia: notify clients when autoplayed media ends without being paused
mrajca@apple.com [Tue, 28 Feb 2017 19:42:20 +0000 (19:42 +0000)]
Media: notify clients when autoplayed media ends without being paused
https://bugs.webkit.org/show_bug.cgi?id=168852

Reviewed by Alex Christensen.

Source/WebCore:

Added API tests.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState):
 Set state accordingly if we autoplayed or if playback was prevented.
(WebCore::HTMLMediaElement::play):
 Update state if playback was prevented.
(WebCore::HTMLMediaElement::playInternal):
 Update state if playback began without user interaction.
(WebCore::HTMLMediaElement::pauseInternal):
 Update state.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
 If playback ends and it began without user interaction, send a DidPlayMediaWithoutInterference event.
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
* html/HTMLMediaElement.h:
* 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@213161 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm as flaky...
ryanhaddad@apple.com [Tue, 28 Feb 2017 19:30:06 +0000 (19:30 +0000)]
Mark imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm as flaky on El Capitan.
https://bugs.webkit.org/show_bug.cgi?id=168380

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years ago[WebRTC] LibWebRTC frame dropper is not working consistently
commit-queue@webkit.org [Tue, 28 Feb 2017 19:13:14 +0000 (19:13 +0000)]
[WebRTC] LibWebRTC frame dropper is not working consistently
https://bugs.webkit.org/show_bug.cgi?id=168973

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

* Source/webrtc/modules/video_coding/video_sender.cc: Disable temporarily the frame dropper as it is sometimes
dropping too many frames.

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

2 years agoAdd ability to configure JSC options from a file
msaboff@apple.com [Tue, 28 Feb 2017 18:50:00 +0000 (18:50 +0000)]
Add ability to configure JSC options from a file
https://bugs.webkit.org/show_bug.cgi?id=168914

Reviewed by Filip Pizlo.

Added the ability to set options and DataLog file location via a configuration file.
Source/JavaScriptCore:

The configuration file is specified with the --configFile option to JSC or the
JSC_configFile environment variable.

The file format allows for options conditionally dependent on various attributes.
Currently those attributes are the process name, parent process name and build
type (Release or Debug).  In this patch, the parent process type is not set.
That will be set up in WebKit code with a follow up patch.

Here is an example config file:

    logFile = "/tmp/jscLog.%pid.txt"

    jscOptions {
        dumpOptions = 2
    }

    build == "Debug" {
        jscOptions {
            useConcurrentJIT = false
            dumpDisassembly = true
        }
    }

    build == "Release" && processName == "jsc" {
        jscOptions {
            asyncDisassembly = true
        }
    }

Eliminated the prior options file code.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(jscmain):
* runtime/ConfigFile.cpp: Added.
(JSC::ConfigFileScanner::ConfigFileScanner):
(JSC::ConfigFileScanner::start):
(JSC::ConfigFileScanner::lineNumber):
(JSC::ConfigFileScanner::currentBuffer):
(JSC::ConfigFileScanner::atFileEnd):
(JSC::ConfigFileScanner::tryConsume):
(JSC::ConfigFileScanner::tryConsumeString):
(JSC::ConfigFileScanner::tryConsumeUpto):
(JSC::ConfigFileScanner::fillBufferIfNeeded):
(JSC::ConfigFileScanner::fillBuffer):
(JSC::ConfigFile::ConfigFile):
(JSC::ConfigFile::setProcessName):
(JSC::ConfigFile::setParentProcessName):
(JSC::ConfigFile::parse):
* runtime/ConfigFile.h: Added.
* runtime/Options.cpp:
(JSC::Options::initialize):
(JSC::Options::setOptions):
* runtime/Options.h:

Source/WTF:

The pathname can include the printf style "%pid", which will be replaced with the
current process id.

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

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

2 years agowebkitpy: jsc-ews should run when Makefiles and build scripts are changed
jbedard@apple.com [Tue, 28 Feb 2017 16:43:27 +0000 (16:43 +0000)]
webkitpy: jsc-ews should run when Makefiles and build scripts are changed
https://bugs.webkit.org/show_bug.cgi?id=168950

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/steps/checkpatchrelevance.py:
(CheckPatchRelevance): Add makefiles and build scripts to jsc_paths.

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

2 years agoUpdate flexbox to Blink's tip of tree
hyatt@apple.com [Tue, 28 Feb 2017 16:23:15 +0000 (16:23 +0000)]
Update flexbox to Blink's tip of tree
https://bugs.webkit.org/show_bug.cgi?id=168657

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new tests in css3/flexbox.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* rendering/FlexibleBoxAlgorithm.cpp: Added.
(WebCore::FlexItem::FlexItem):
(WebCore::FlexLayoutAlgorithm::FlexLayoutAlgorithm):
(WebCore::FlexLayoutAlgorithm::computeNextFlexLine):
* rendering/FlexibleBoxAlgorithm.h: Added.
(WebCore::FlexItem::hypotheticalMainAxisMarginBoxSize):
(WebCore::FlexItem::flexBaseMarginBoxSize):
(WebCore::FlexItem::flexedMarginBoxSize):
(WebCore::FlexLayoutAlgorithm::isMultiline):
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::computeTrackBasedSize):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::GridTrackSizingAlgorithm::assumedRowsSizeForOrthogonalChild):
(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild):
(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded):
* rendering/GridTrackSizingAlgorithm.h:
* rendering/OrderIterator.cpp:
(WebCore::OrderIterator::next):
(WebCore::OrderIterator::reset):
(WebCore::OrderIteratorPopulator::~OrderIteratorPopulator):
(WebCore::OrderIteratorPopulator::collectChild):
(WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Deleted.
(WebCore::OrderIteratorPopulator::removeDuplicatedOrderValues): Deleted.
* rendering/OrderIterator.h:
(WebCore::OrderIteratorPopulator::OrderIteratorPopulator):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::computeChildPreferredLogicalWidths):
(WebCore::RenderBlock::hasDefiniteLogicalHeight):
(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::hasPercentHeightDescendants):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::columnFlexItemHasStretchAlignment):
(WebCore::RenderBox::isStretchingColumnFlexItem):
(WebCore::RenderBox::hasStretchedLogicalWidth):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::cacheIntrinsicContentLogicalHeightForFlexItem):
(WebCore::RenderBox::updateLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightWithoutLayout):
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
(WebCore::RenderBox::shouldTreatChildAsReplacedInTableCells):
(WebCore::tableCellShouldHaveZeroInitialSize):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::percentageLogicalHeightIsResolvable):
(WebCore::RenderBox::hasUnsplittableScrollingOverflow):
(WebCore::flexItemHasStretchAlignment): Deleted.
(WebCore::isStretchingColumnFlexItem): Deleted.
(WebCore::logicalWidthIsResolvable): Deleted.
(WebCore::RenderBox::hasDefiniteLogicalWidth): Deleted.
(WebCore::percentageLogicalHeightIsResolvable): Deleted.
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): Deleted.
(WebCore::RenderBox::hasDefiniteLogicalHeight): Deleted.
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem):
(WebCore::RenderBox::isFlexItem):
(WebCore::RenderBox::selfAlignmentNormalBehavior):
* rendering/RenderBoxModelObject.cpp:
(WebCore::isOutOfFlowPositionedWithImplicitHeight):
(WebCore::RenderBoxModelObject::containingBlockForAutoHeightDetection):
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeChildInternal):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::LineContext::LineContext):
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
(WebCore::contentAlignmentNormalBehavior):
(WebCore::RenderFlexibleBox::styleDidChange):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
(WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning):
(WebCore::RenderFlexibleBox::hasOrthogonalFlow):
(WebCore::RenderFlexibleBox::flexBasisForChild):
(WebCore::RenderFlexibleBox::crossAxisExtentForChild):
(WebCore::RenderFlexibleBox::cachedChildIntrinsicContentLogicalHeight):
(WebCore::RenderFlexibleBox::setCachedChildIntrinsicContentLogicalHeight):
(WebCore::RenderFlexibleBox::clearCachedChildIntrinsicContentLogicalHeight):
(WebCore::RenderFlexibleBox::childIntrinsicLogicalHeight):
(WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth):
(WebCore::RenderFlexibleBox::crossAxisIntrinsicExtentForChild):
(WebCore::RenderFlexibleBox::mainAxisExtentForChild):
(WebCore::RenderFlexibleBox::mainAxisContentExtentForChildIncludingScrollbar):
(WebCore::RenderFlexibleBox::crossAxisExtent):
(WebCore::RenderFlexibleBox::mainAxisExtent):
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::transformedWritingMode):
(WebCore::RenderFlexibleBox::flowAwareMarginStartForChild):
(WebCore::RenderFlexibleBox::flowAwareMarginEndForChild):
(WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild):
(WebCore::RenderFlexibleBox::crossAxisMarginExtentForChild):
(WebCore::RenderFlexibleBox::flowAwareLocationForChild):
(WebCore::RenderFlexibleBox::useChildAspectRatio):
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing):
(WebCore::RenderFlexibleBox::setFlowAwareLocationForChild):
(WebCore::RenderFlexibleBox::mainAxisLengthIsDefinite):
(WebCore::RenderFlexibleBox::crossAxisLengthIsDefinite):
(WebCore::RenderFlexibleBox::cacheChildMainSize):
(WebCore::RenderFlexibleBox::clearCachedMainSizeForChild):
(WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild):
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
(WebCore::RenderFlexibleBox::updateAutoMarginsInMainAxis):
(WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis):
(WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild):
(WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
(WebCore::RenderFlexibleBox::computeChildMarginValue):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
(WebCore::RenderFlexibleBox::crossSizeForPercentageResolution):
(WebCore::RenderFlexibleBox::mainSizeForPercentageResolution):
(WebCore::RenderFlexibleBox::childLogicalHeightForPercentageResolution):
(WebCore::RenderFlexibleBox::adjustChildSizeForAspectRatioCrossAxisMinAndMax):
(WebCore::RenderFlexibleBox::constructFlexItem):
(WebCore::RenderFlexibleBox::freezeViolations):
(WebCore::RenderFlexibleBox::freezeInflexibleItems):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
(WebCore::alignmentOffset):
(WebCore::RenderFlexibleBox::setOverrideMainAxisContentSizeForChild):
(WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedChild):
(WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild):
(WebCore::RenderFlexibleBox::staticInlinePositionForPositionedChild):
(WebCore::RenderFlexibleBox::staticBlockPositionForPositionedChild):
(WebCore::RenderFlexibleBox::setStaticPositionForPositionedLayout):
(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
(WebCore::RenderFlexibleBox::alignmentForChild):
(WebCore::RenderFlexibleBox::resetAutoMarginsAndLogicalTopInCrossAxis):
(WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight):
(WebCore::RenderFlexibleBox::childHasIntrinsicMainAxisSize):
(WebCore::RenderFlexibleBox::crossAxisOverflowForChild):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
(WebCore::initialAlignContentOffset):
(WebCore::alignContentSpaceBetweenChildren):
(WebCore::RenderFlexibleBox::alignFlexLines):
(WebCore::RenderFlexibleBox::adjustAlignmentForChild):
(WebCore::RenderFlexibleBox::alignChildren):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
(WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
(WebCore::RenderFlexibleBox::flipForWrapReverse):
(WebCore::RenderFlexibleBox::Violation::Violation): Deleted.
(WebCore::RenderFlexibleBox::setCrossAxisExtent): Deleted.
(WebCore::RenderFlexibleBox::flowAwareMarginAfterForChild): Deleted.
(WebCore::RenderFlexibleBox::mainAxisBorderAndPaddingExtentForChild): Deleted.
(WebCore::RenderFlexibleBox::mainAxisScrollbarExtentForChild): Deleted.
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Deleted.
(WebCore::RenderFlexibleBox::computeNextFlexLine): Deleted.
(WebCore::RenderFlexibleBox::setLogicalOverrideSize): Deleted.
(WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren): Deleted.
(WebCore::RenderFlexibleBox::needToStretchChild): Deleted.
(WebCore::contentAlignmentNormalBehaviorFlexibleBox): Deleted.
* rendering/RenderFlexibleBox.h:
(WebCore::RenderFlexibleBox::orderIterator):
(WebCore::RenderFlexibleBox::isFlexibleBoxImpl):
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.cpp:
(WebCore::selfAlignmentChangedToStretchInRowAxis):
(WebCore::selfAlignmentChangedFromStretchInRowAxis):
(WebCore::selfAlignmentChangedFromStretchInColumnAxis):
(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize):
(WebCore::RenderGrid::gridGapForDirection):
(WebCore::RenderGrid::guttersSize):
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize):
(WebCore::RenderGrid::computeAutoRepeatTracksCount):
(WebCore::RenderGrid::trackSizesForComputedStyle):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::populateGridPositionsForDirection):
(WebCore::RenderGrid::alignSelfForChild):
(WebCore::RenderGrid::justifySelfForChild):
(WebCore::RenderGrid::columnAxisPositionForChild):
(WebCore::RenderGrid::rowAxisPositionForChild):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
* rendering/RenderGrid.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::layout):
* rendering/RenderTableSection.cpp:
(WebCore::shouldFlexCellChild):
(WebCore::RenderTableSection::relayoutCellIfFlexed):
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/style/RenderStyle.cpp:
(WebCore::resolvedSelfAlignment):
(WebCore::RenderStyle::resolvedAlignSelf):
(WebCore::RenderStyle::resolvedJustifySelf):
* rendering/style/RenderStyle.h:
* style/RenderTreeUpdater.cpp:
(WebCore::textRendererIsNeeded):

LayoutTests:

* css3/flexbox/align-absolute-child-expected.txt:
* css3/flexbox/align-absolute-child.html:
* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line-expected.txt: Added.
* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line.html: Added.
* css3/flexbox/anonymous-block-merge-crash.html:
* css3/flexbox/assert-generated-new-flexbox-expected.txt: Added.
* css3/flexbox/assert-generated-new-flexbox.html: Added.
* css3/flexbox/auto-height-dynamic-expected.txt:
* css3/flexbox/auto-height-dynamic.html:
* css3/flexbox/auto-height-with-flex-expected.html: Added.
* css3/flexbox/auto-height-with-flex.html: Added.
* css3/flexbox/auto-margins-expected.html: Removed.
* css3/flexbox/auto-margins.html: Removed.
* css3/flexbox/border-and-padding-abspos-expected.txt: Added.
* css3/flexbox/border-and-padding-abspos.html: Added.
* css3/flexbox/box-orient-button-expected.txt: Added.
* css3/flexbox/box-orient-button.html: Added.
* css3/flexbox/box-sizing-expected.txt:
* css3/flexbox/box-sizing-min-max-sizes-expected.txt:
* css3/flexbox/box-sizing-min-max-sizes.html:
* css3/flexbox/box-sizing.html:
* css3/flexbox/bug527039-expected.txt: Added.
* css3/flexbox/bug527039.html: Added.
* css3/flexbox/bug580586-expected.txt: Added.
* css3/flexbox/bug580586.html: Added.
* css3/flexbox/bug604346-expected.html: Added.
* css3/flexbox/bug604346.html: Added.
* css3/flexbox/bug605682-expected.txt: Added.
* css3/flexbox/bug605682.html: Added.
* css3/flexbox/bug633212-expected.txt: Added.
* css3/flexbox/bug633212.html: Added.
* css3/flexbox/bug646288-expected.txt: Added.
* css3/flexbox/bug646288.html: Added.
* css3/flexbox/bug669714-expected.txt: Added.
* css3/flexbox/bug669714.html: Added.
* css3/flexbox/canvas-dynamic-change-expected.txt: Added.
* css3/flexbox/canvas-dynamic-change.html: Added.
* css3/flexbox/change-flexitem-into-abspos-expected.txt: Added.
* css3/flexbox/change-flexitem-into-abspos.html: Added.
* css3/flexbox/child-overflow-expected.html:
* css3/flexbox/child-overflow.html:
* css3/flexbox/column-flex-child-with-overflow-scroll-expected.txt: Added.
* css3/flexbox/column-flex-child-with-overflow-scroll.html: Added.
* css3/flexbox/columns-auto-size.html:
* css3/flexbox/columns-center-with-margins-and-wrap-expected.html: Added.
* css3/flexbox/columns-center-with-margins-and-wrap.html: Added.
* css3/flexbox/columns-center-with-margins-expected.html: Added.
* css3/flexbox/columns-center-with-margins.html: Added.
* css3/flexbox/columns-height-set-via-top-bottom-expected.txt:
* css3/flexbox/columns-height-set-via-top-bottom.html:
* css3/flexbox/content-height-with-scrollbars.html:
* css3/flexbox/cross-axis-scrollbar-expected.html:
* css3/flexbox/cross-axis-scrollbar.html:
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/flexbox/csswg/flex-margin-no-collapse.html:
* css3/flexbox/definite-cross-sizes-expected.txt: Added.
* css3/flexbox/definite-cross-sizes.html: Added.
* css3/flexbox/definite-main-size-expected.txt: Added.
* css3/flexbox/definite-main-size.html: Added.
* css3/flexbox/display-flexbox-set-get-expected.txt:
* css3/flexbox/display-flexbox-set-get.html:
* css3/flexbox/flex-algorithm-expected.txt:
* css3/flexbox/flex-algorithm-min-max-expected.txt:
* css3/flexbox/flex-algorithm-min-max.html:
* css3/flexbox/flex-algorithm-with-margins-expected.txt:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-baseline-expected.txt:
* css3/flexbox/flex-align-baseline.html:
* css3/flexbox/flex-align-column-expected.txt:
* css3/flexbox/flex-align-column.html:
* css3/flexbox/flex-align-end-expected.txt:
* css3/flexbox/flex-align-end.html:
* css3/flexbox/flex-align-max-expected.txt:
* css3/flexbox/flex-align-max.html:
* css3/flexbox/flex-align-percent-height-expected.txt:
* css3/flexbox/flex-align-percent-height.html:
* css3/flexbox/flex-align-stretch-expected.txt:
* css3/flexbox/flex-align-stretch.html:
* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:
* css3/flexbox/flex-column-relayout-assert-expected.txt: Added.
* css3/flexbox/flex-column-relayout-assert.html: Added.
* css3/flexbox/flex-factor-less-than-one-expected.txt: Added.
* css3/flexbox/flex-factor-less-than-one.html: Added.
* css3/flexbox/flex-flow-2-expected.txt:
* css3/flexbox/flex-flow-2.html:
* css3/flexbox/flex-flow-auto-margins-expected.txt:
* css3/flexbox/flex-flow-auto-margins-no-available-space-assert-expected.txt: Added.
* css3/flexbox/flex-flow-auto-margins-no-available-space-assert.html: Added.
* css3/flexbox/flex-flow-auto-margins-no-available-space-expected.txt:
* css3/flexbox/flex-flow-auto-margins-no-available-space.html:
* css3/flexbox/flex-flow-auto-margins.html:
* css3/flexbox/flex-flow-border-expected.txt:
* css3/flexbox/flex-flow-border.html:
* css3/flexbox/flex-flow-expected.txt:
* css3/flexbox/flex-flow-initial-expected.txt:
* css3/flexbox/flex-flow-initial.html:
* css3/flexbox/flex-flow-margins-auto-size-expected.txt:
* css3/flexbox/flex-flow-margins-auto-size.html:
* css3/flexbox/flex-flow-margins-expected.txt:
* css3/flexbox/flex-flow-margins.html:
* css3/flexbox/flex-flow-orientations-expected.txt:
* css3/flexbox/flex-flow-orientations.html:
* css3/flexbox/flex-flow-overflow-expected.txt:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-flow-padding-expected.txt:
* css3/flexbox/flex-flow-padding.html:
* css3/flexbox/flex-flow.html:
* css3/flexbox/flex-item-child-overflow-expected.txt:
* css3/flexbox/flex-item-child-overflow.html:
* css3/flexbox/flex-item-contains-strict-expected.txt: Added.
* css3/flexbox/flex-item-contains-strict.html: Added.
* css3/flexbox/flex-item-firstLine-valid-expected.txt:
* css3/flexbox/flex-item-firstLine-valid.html:
* css3/flexbox/flex-justify-content-expected.txt:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/flex-longhand-parsing-expected.txt:
* css3/flexbox/flex-longhand-parsing.html:
* css3/flexbox/flex-no-flex-expected.txt:
* css3/flexbox/flex-no-flex.html:
* css3/flexbox/flex-one-sets-flex-basis-to-zero-px-expected.txt: Added.
* css3/flexbox/flex-one-sets-flex-basis-to-zero-px.html: Added.
* css3/flexbox/flex-order-expected.html: Added.
* css3/flexbox/flex-order-expected.png: Removed.
* css3/flexbox/flex-order-expected.txt: Removed.
* css3/flexbox/flex-order.html:
* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html:
* css3/flexbox/flex-shorthand-flex-basis-middle-expected.txt: Added.
* css3/flexbox/flex-shorthand-flex-basis-middle.html: Added.
* css3/flexbox/flexbox-baseline.html:
* css3/flexbox/flexbox-height-with-overflow-auto-expected.txt: Added.
* css3/flexbox/flexbox-height-with-overflow-auto.html: Added.
* css3/flexbox/flexbox-ignore-container-firstLetter-expected.txt:
* css3/flexbox/flexbox-ignore-container-firstLetter.html:
* css3/flexbox/flexbox-ignore-firstLetter-expected.txt:
* css3/flexbox/flexbox-ignore-firstLetter.html:
* css3/flexbox/flexbox-ignore-firstLine-expected.txt:
* css3/flexbox/flexbox-ignore-firstLine.html:
* css3/flexbox/flexbox-lines-must-be-stretched-by-default-expected.txt:
* css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
* css3/flexbox/flexbox-overflow-auto-expected.html:
* css3/flexbox/flexbox-overflow-auto.html:
* css3/flexbox/flexbox-with-multi-column-property-expected.html: Added.
* css3/flexbox/flexbox-with-multi-column-property.html: Added.
* css3/flexbox/flexbox-wordwrap-expected.txt: Added.
* css3/flexbox/flexbox-wordwrap.html: Added.
* css3/flexbox/flexitem-expected.txt:
* css3/flexbox/flexitem-no-margin-collapsing-expected.txt:
* css3/flexbox/flexitem-no-margin-collapsing.html:
* css3/flexbox/flexitem-percent-height-change-expected.txt:
* css3/flexbox/flexitem-percent-height-change.html:
* css3/flexbox/flexitem-stretch-image-expected.txt:
* css3/flexbox/flexitem-stretch-image.html:
* css3/flexbox/flexitem-stretch-range.html:
* css3/flexbox/flexitem.html:
* css3/flexbox/floated-flexbox-expected.txt:
* css3/flexbox/floated-flexbox.html:
* css3/flexbox/floated-flexitem.html:
* css3/flexbox/inline-flex-crash.html:
* css3/flexbox/inline-flex-crash2.html:
* css3/flexbox/inline-flex-expected.txt:
* css3/flexbox/inline-flex.html:
* css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt:
* css3/flexbox/inline-flexbox-ignore-firstLine.html:
* css3/flexbox/inline-flexbox-wrap-vertically-width-calculation-expected.txt: Added.
* css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html: Added.
* css3/flexbox/insert-text-crash.html:
* css3/flexbox/intrinsic-min-width-applies-with-fixed-width-expected.txt:
* css3/flexbox/intrinsic-min-width-applies-with-fixed-width.html:
* css3/flexbox/intrinsic-width-orthogonal-writing-mode-expected.txt: Added.
* css3/flexbox/intrinsic-width-orthogonal-writing-mode.html: Added.
* css3/flexbox/large-flex-shrink-assert-expected.txt: Added.
* css3/flexbox/large-flex-shrink-assert.html: Added.
* css3/flexbox/line-wrapping.html:
* css3/flexbox/mainAxisExtent-crash-expected.txt: Added.
* css3/flexbox/mainAxisExtent-crash.html: Added.
* css3/flexbox/max-width-violation-expected.txt: Added.
* css3/flexbox/max-width-violation.html: Added.
* css3/flexbox/min-size-auto-expected.txt:
* css3/flexbox/min-size-auto.html:
* css3/flexbox/minimum-size-image-expected.txt: Added.
* css3/flexbox/minimum-size-image.html: Added.
* css3/flexbox/multiline-align-content-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/multiline-align-self-expected.txt:
* css3/flexbox/multiline-align-self.html:
* css3/flexbox/multiline-column-auto-expected.txt:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-column-overflow-expected.html: Added.
* css3/flexbox/multiline-column-overflow.html: Added.
* css3/flexbox/multiline-expected.txt:
* css3/flexbox/multiline-justify-content-expected.txt:
* css3/flexbox/multiline-justify-content.html:
* css3/flexbox/multiline-min-max-expected.txt: Added.
* css3/flexbox/multiline-min-max.html: Added.
* css3/flexbox/multiline-min-preferred-width-expected.txt:
* css3/flexbox/multiline-min-preferred-width.html:
* css3/flexbox/multiline-reverse-wrap-baseline.html:
* css3/flexbox/multiline-reverse-wrap-overflow-expected.txt:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline-shrink-to-fit-expected.html:
* css3/flexbox/multiline-shrink-to-fit.html:
* css3/flexbox/multiline.html:
* css3/flexbox/negative-flex-rounding-assert.html:
* css3/flexbox/negative-margins-assert.html:
* css3/flexbox/negative-overflow-expected.txt:
* css3/flexbox/negative-overflow.html:
* css3/flexbox/nested-flexbox-min-size-auto-expected.txt: Added.
* css3/flexbox/nested-flexbox-min-size-auto.html: Added.
* css3/flexbox/nested-orthogonal-flexbox-relayout-expected.html: Added.
* css3/flexbox/nested-orthogonal-flexbox-relayout.html: Added.
* css3/flexbox/nested-stretch-expected.txt:
* css3/flexbox/nested-stretch.html:
* css3/flexbox/order-painting.html:
* css3/flexbox/orthogonal-flex-directions-expected.txt:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing-expected.txt: Added.
* css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing.html: Added.
* css3/flexbox/overflow-and-padding-expected.txt: Added.
* css3/flexbox/overflow-and-padding.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes-abspos-expected.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes-abspos.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes-expected.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes.html: Added.
* css3/flexbox/overflow-auto-resizes-correctly-expected.txt: Added.
* css3/flexbox/overflow-auto-resizes-correctly.html: Added.
* css3/flexbox/overflow-keep-scrollpos-expected.txt:
* css3/flexbox/overflow-keep-scrollpos.html:
* css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item-expected.txt: Added.
* css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html: Added.
* css3/flexbox/percent-margins-expected.txt:
* css3/flexbox/percent-margins.html:
* css3/flexbox/percentage-height-in-abspos-expected.html: Added.
* css3/flexbox/percentage-height-in-abspos.html: Added.
* css3/flexbox/percentage-height-replaced-element-expected.txt: Added.
* css3/flexbox/percentage-height-replaced-element.html: Added.
* css3/flexbox/percentage-heights-expected.txt:
* css3/flexbox/percentage-heights.html:
* css3/flexbox/percentage-max-width-cross-axis-expected.txt: Added.
* css3/flexbox/percentage-max-width-cross-axis.html: Added.
* css3/flexbox/percentage-sizes-expected.txt:
* css3/flexbox/percentage-sizes-quirks-expected.txt:
* css3/flexbox/percentage-sizes-quirks.html:
* css3/flexbox/percentage-sizes.html:
* css3/flexbox/percentage-width-in-abspos-expected.html: Added.
* css3/flexbox/percentage-width-in-abspos.html: Added.
* css3/flexbox/perpendicular-writing-modes-inside-flex-item-expected.txt:
* css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
* css3/flexbox/position-absolute-child-expected.txt:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/position-absolute-children-expected.txt:
* css3/flexbox/position-absolute-children.html:
* css3/flexbox/preferred-widths-expected.txt:
* css3/flexbox/preferred-widths-orthogonal.html:
* css3/flexbox/preferred-widths.html:
* css3/flexbox/relayout-align-items-expected.txt:
* css3/flexbox/relayout-align-items.html:
* css3/flexbox/relayout-image-load-expected.txt:
* css3/flexbox/relayout-image-load.html:
* css3/flexbox/relpos-with-percentage-top-expected.txt: Added.
* css3/flexbox/relpos-with-percentage-top.html: Added.
* css3/flexbox/relpos-with-scrollable-with-abspos-crash-expected.txt: Added.
* css3/flexbox/relpos-with-scrollable-with-abspos-crash.html: Added.
* css3/flexbox/resize-min-content-flexbox-expected.txt: Added.
* css3/flexbox/resize-min-content-flexbox.html: Added.
* css3/flexbox/resources/box-orient-button.js: Added.
(setFlexDirection):
(gebi):
(test):
* css3/flexbox/scrollbars-auto-expected.html: Added.
* css3/flexbox/scrollbars-auto.html: Added.
* css3/flexbox/scrollbars-expected.html: Added.
* css3/flexbox/scrollbars.html: Added.
* css3/flexbox/shrinking-column-flexbox-expected.txt: Added.
* css3/flexbox/shrinking-column-flexbox.html: Added.
* css3/flexbox/stretch-after-sibling-size-change-expected.txt:
* css3/flexbox/stretch-after-sibling-size-change.html:
* css3/flexbox/stretch-input-in-column-expected.html:
* css3/flexbox/stretch-simplified-layout-expected.txt:
* css3/flexbox/stretch-simplified-layout.html:
* css3/flexbox/stretch-table-child-expected.txt: Added.
* css3/flexbox/stretch-table-child.html: Added.
* css3/flexbox/stretched-child-shrink-on-relayout-expected.txt: Added.
* css3/flexbox/stretched-child-shrink-on-relayout.html: Added.
* css3/flexbox/stretching-orthogonal-flows-expected.html: Added.
* css3/flexbox/stretching-orthogonal-flows.html: Added.
* css3/flexbox/style-change-expected.txt:
* css3/flexbox/style-change.html:
* css3/flexbox/text-overflow-on-flexbox-expected.html: Added.
* css3/flexbox/text-overflow-on-flexbox.html: Added.
* css3/flexbox/true-centering-expected.txt:
* css3/flexbox/true-centering.html:
* css3/flexbox/undefined-min-width-expected.txt: Added.
* css3/flexbox/undefined-min-width.html: Added.
* css3/flexbox/vertical-align-do-not-effect-flex-items-expected.html: Added.
* css3/flexbox/vertical-align-do-not-effect-flex-items.html: Added.
* css3/flexbox/vertical-flexbox-percentage-ignored-expected.html: Added.
* css3/flexbox/vertical-flexbox-percentage-ignored.html: Added.
* css3/flexbox/whitespace-in-flexitem-expected.html: Added.
* css3/flexbox/whitespace-in-flexitem.html: Added.
* css3/flexbox/width-change-and-relayout-children-expected.txt:
* css3/flexbox/width-change-and-relayout-children.html:
* css3/flexbox/wrapping-column-dynamic-changes-expected.txt: Added.
* css3/flexbox/wrapping-column-dynamic-changes.html: Added.
* css3/flexbox/writing-modes-expected.txt:
* css3/flexbox/writing-modes.html:
* css3/flexbox/z-index.html:
* resources/check-layout-th.js: Added.
(checkSubtreeExpectedValues):
(checkAttribute):
(assert_tolerance):
(checkExpectedValues):
(window.checkLayout):

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

2 years agoRemove EFL leftover from WebPageProxy.messages.in
ossy@webkit.org [Tue, 28 Feb 2017 09:01:09 +0000 (09:01 +0000)]
Remove EFL leftover from WebPageProxy.messages.in
https://bugs.webkit.org/show_bug.cgi?id=168828

Reviewed by Gyuyoung Kim.

* UIProcess/WebPageProxy.messages.in:

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

2 years agoMain resource requests need cachePartition
achristensen@apple.com [Tue, 28 Feb 2017 08:30:44 +0000 (08:30 +0000)]
Main resource requests need cachePartition
https://bugs.webkit.org/show_bug.cgi?id=168806
Source/WebCore:

<rdar://30639764>

Reviewed by Brady Eidson.

Test: http/tests/security/credentials-main-resource.html

r211751 caused an unintended regression on pages whose main resource is protected
by basic authentication.  We were not setting the cache partition for main resource
requests, and we use the cache partition now for credentials, so the credentials for
the main resource were not being put into a partition in the CredentialStorage that
would not be used for subresources of the page, whose requests had the correct partition
for the domain of the page.  This caused users to have to enter their credentials twice,
once for the main resource and once for any subresources.  This is fixed by using the
domain from the main resource request as the cache partition.  Elsewhere the Document is
used to get the cache partition, but there is no Document yet when requesting the main resource.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
Set the cache partition for the main resource loads based on the SecurityOrigin of the
initial request if we are loading the main resource for a new top document.  If the main resource
request is redirected, then we will still use the partition of the initial request because that is
what the user requested and that is where the user entered the credentials.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setDomainForCachePartition):
* loader/cache/CachedResourceRequest.h:

Source/WebKit2:

Reviewed by Brady Eidson.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):

LayoutTests:

Reviewed by Brady Eidson.

* http/tests/security/credentials-main-resource-expected.txt: Added.
* http/tests/security/credentials-main-resource.html: Added.
* http/tests/security/resources/credentials-main-resource.php: Added.

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

2 years agoREGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on...
achristensen@apple.com [Tue, 28 Feb 2017 08:28:33 +0000 (08:28 +0000)]
REGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=167967

Reviewed by Brady Eidson.

Source/WebCore:

XHR credentials have a persistence of CredentialPersistenceNone because we keep
them in the WebCore::CredentialStorage.  We were storing them to CFNetwork's NSURLCredentialStorage
on iOS and then they were being given as the proposedCredential in
NetworkDataTaskCocoa::tryPasswordBasedAuthentication even though we set CredentialPersistenceNone.

This fixes http/tests/security/credentials-iframes.html

* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set):
* platform/network/CredentialStorage.h:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
* platform/network/mac/CredentialStorageMac.mm:
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.

LayoutTests:

* platform/ios-simulator/TestExpectations:

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