WebKit-https.git
3 years ago[WinCairo][MediaFoundation] The main thread can sometimes be blocked forever when...
peavo@outlook.com [Wed, 18 Nov 2015 18:24:57 +0000 (18:24 +0000)]
[WinCairo][MediaFoundation] The main thread can sometimes be blocked forever when ending a media session.
https://bugs.webkit.org/show_bug.cgi?id=151387

Reviewed by Alex Christensen.

This happens because the main thread is waiting for the sample scheduler thread to finish,
but sometimes it never does. This can be resolved by emptying the scheduler's sample queue
before requesting the scheduler thread to finish. This will make sure the scheduler thread
returns to its main loop quickly, and can handle the termination request.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):

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

3 years agoMarking two new mediastream/RTCPeerConnection tests as crashing on debug during inves...
ryanhaddad@apple.com [Wed, 18 Nov 2015 17:40:25 +0000 (17:40 +0000)]
Marking two new mediastream/RTCPeerConnection tests as crashing on debug during investigation.
https://bugs.webkit.org/show_bug.cgi?id=151304

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMarking storage/indexeddb/modern/aborted-put.html as flaky on mac-wk1
ryanhaddad@apple.com [Wed, 18 Nov 2015 17:25:32 +0000 (17:25 +0000)]
Marking storage/indexeddb/modern/aborted-put.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=151389

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoWebRTC: Initial testing of updated RTCPeerConnection API
adam.bergkvist@ericsson.com [Wed, 18 Nov 2015 14:52:29 +0000 (14:52 +0000)]
WebRTC: Initial testing of updated RTCPeerConnection API
https://bugs.webkit.org/show_bug.cgi?id=151304

Reviewed by Eric Carlson.

Source/WebCore:

Add an empty implementation of MediaEndpointPeerConnection which
realizes the PeerConnectionBackend interface. This makes it possible
to construct an RTCPeerConnection and do initial testing.

Tests: fast/mediastream/RTCPeerConnection-overloaded-operations-params.html
       fast/mediastream/RTCPeerConnection-overloaded-operations.html

Also unskip three existing RTCPeerConnection tests on GTK.

* CMakeLists.txt:
* Modules/mediastream/MediaEndpointPeerConnection.cpp: Added.
(WebCore::createMediaEndpointPeerConnection):
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
(WebCore::MediaEndpointPeerConnection::createOffer):
(WebCore::MediaEndpointPeerConnection::createAnswer):
(WebCore::MediaEndpointPeerConnection::setLocalDescription):
(WebCore::MediaEndpointPeerConnection::localDescription):
(WebCore::MediaEndpointPeerConnection::currentLocalDescription):
(WebCore::MediaEndpointPeerConnection::pendingLocalDescription):
(WebCore::MediaEndpointPeerConnection::setRemoteDescription):
(WebCore::MediaEndpointPeerConnection::remoteDescription):
(WebCore::MediaEndpointPeerConnection::currentRemoteDescription):
(WebCore::MediaEndpointPeerConnection::pendingRemoteDescription):
(WebCore::MediaEndpointPeerConnection::setConfiguration):
(WebCore::MediaEndpointPeerConnection::addIceCandidate):
(WebCore::MediaEndpointPeerConnection::getStats):
(WebCore::MediaEndpointPeerConnection::stop):
(WebCore::MediaEndpointPeerConnection::markAsNeedingNegotiation):
* Modules/mediastream/MediaEndpointPeerConnection.h: Added.
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Add two new tests and unskip three old ones (details below).

* fast/mediastream/RTCPeerConnection-overloaded-operations-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-overloaded-operations-params.html: Added.
Feeds some good but mostly bad input to the overloaded operations to verify JS built-ins
argument checking.
* fast/mediastream/RTCPeerConnection-overloaded-operations.html: Added.
Verifies that the correct overloaded operation is invoked. For examaple, createOffer()
without arguments should invoke the promise based function, but the same operation with
two function arguments should invoke the legacy callback version.
* platform/gtk/TestExpectations:
Unskip fast/mediastream/RTCIceCandidate.html, fast/mediastream/RTCPeerConnection.html
and fast/mediastream/RTCSessionDescription.html.

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

3 years ago[Cairo] SolidStroke broken in drawLine after r191658
commit-queue@webkit.org [Wed, 18 Nov 2015 13:25:22 +0000 (13:25 +0000)]
[Cairo] SolidStroke broken in drawLine after r191658
https://bugs.webkit.org/show_bug.cgi?id=151385

Patch by Alejandro G. Castro <alex@igalia.com> on 2015-11-18
Reviewed by Carlos Garcia Campos.

Fix the drawLine function after r191658, we have to make sure the
color is set when line is SolidStroke.

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

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

3 years ago[CSS Grid Layout] inline margins not honored when not using stretch in row-axis alignment
jfernandez@igalia.com [Wed, 18 Nov 2015 12:53:26 +0000 (12:53 +0000)]
[CSS Grid Layout] inline margins not honored when not using stretch in row-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=151323

Reviewed by Sergio Villar Senin.

Source/WebCore:

There are some situations where we avoid to compute the inline-axis
margins when computing the logical width of a box. One of those situations
is when we have set an override width; this only affects for now to flex
and grid items. We also follow this approach when setting the logical
width based on the restrictions of 'auto' value in the 'min-width'
property.

This behavior is not correct, since there is no reason to avoid
computing this margins, in the general case. I think this logic was
designed as an optimization for flexbox, which was already computing
the margins by its own, but it's not applicable in the general case, so
grid needs these margins to be computed properly.

For the shrink-to-fit behavior we can add some grid related logic to the
already defined RenderBox function "sizesLogicalWidthToFitContent",
so we avoid the override width.

Tests: fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding.html
       fast/css-grid-layout/min-width-height-auto-and-margins.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderGrid.cpp:
(WebCore::defaultAlignmentChangedFromStretchInRowAxis):
(WebCore::selfAlignmentChangedFromStretchInRowAxis):
(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
(WebCore::selfAlignmentChangedFromStretchInColumnAxis): Deleted.
(WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted.
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.

LayoutTests:

Tests to verify that margins are computed properly on grid items
using an alignment value different than stretch or when min-width
is auto.

* fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding.html: Added.
* fast/css-grid-layout/min-width-height-auto-and-margins-expected.txt: Added.
* fast/css-grid-layout/min-width-height-auto-and-margins.html: Added.

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

3 years ago[GTK] Update xserver version in jhbuild
carlosgc@webkit.org [Wed, 18 Nov 2015 12:43:39 +0000 (12:43 +0000)]
[GTK] Update xserver version in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=151383

Reviewed by Alejandro G. Castro.

In r192568 I assumed the bots would have a recent enough Xvfb
to use the -displayfd option, but I forgot we build our own
xserver just for Xvfb. The version we build is too old, so
we could just use an updated version (the same bots have
installed, for example) to use the -displayfd option.

* gtk/jhbuild.modules: Update xserver to 1.16.4.
* gtk/patches/xserver-fix-glx-init.patch: Deleted.
* gtk/patches/xserver-remove-bogus-dependencies.patch: Updated to
apply on 1.16.4.

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

3 years agoWebRTC: [GTK] Skip failing MediaStream tests
adam.bergkvist@ericsson.com [Wed, 18 Nov 2015 11:30:48 +0000 (11:30 +0000)]
WebRTC: [GTK] Skip failing MediaStream tests
https://bugs.webkit.org/show_bug.cgi?id=151360

Reviewed by Eric Carlson.

* platform/gtk/TestExpectations:
Two tests skipped. Awaits resolution of https://webkit.org/b/151344.

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

3 years agoAX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
commit-queue@webkit.org [Wed, 18 Nov 2015 11:12:42 +0000 (11:12 +0000)]
AX: Shadow DOM video player controls menus need aria-owns on the trigger buttons
https://bugs.webkit.org/show_bug.cgi?id=127065

Patch by Aaron Chu <arona.chu@gmail.com> on 2015-11-18
Reviewed by Darin Adler.

Source/WebCore:

Test: media/accessibility-closed-captions-has-aria-owns.html

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.buildCaptionMenu):
* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.createControls):
(Controller.prototype.buildCaptionMenu):

LayoutTests:

* media/accessibility-closed-captions-has-aria-owns-expected.txt: Added.
* media/accessibility-closed-captions-has-aria-owns.html: Added.

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

3 years agoUnreviewed. Fix webkitpy tests after r192568.
carlosgc@webkit.org [Wed, 18 Nov 2015 11:02:43 +0000 (11:02 +0000)]
Unreviewed. Fix webkitpy tests after r192568.

Instead of ignoring exception when closing mock fds, use a helper
function that the unit test can override to do nothing.

* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._xvfb_close_pipe):
(XvfbDriver._xvfb_run):
* Scripts/webkitpy/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):

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

3 years ago[XvfbDriver] Fail to run all layout tests when X server started with -displayfd option
carlosgc@webkit.org [Wed, 18 Nov 2015 09:05:28 +0000 (09:05 +0000)]
[XvfbDriver] Fail to run all layout tests when X server started with -displayfd option
https://bugs.webkit.org/show_bug.cgi?id=151135

Reviewed by Darin Adler.

The XvfbDriver uses the x server command line to check the
displays that are currently in use. This doesn't work when X
server was started with -displayfd option. This option is used to let
the server find the display id available that is written to the
given file descriptor. With this option xorg doesn't need to
create the lock files in tmp either. The -displayfd option is also
available in Xvfb, so we could use it too. That would simplify the
code, fixing also race conditions between the check for available
displays and Xvfb opening the connection, we wouldn't need to wait
for 4 seconds after launching Xvfb, and all lock files we are
using won't be needed either.

* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._xvfb_pipe): Helper function to create the pipe, only
needed to be overriden by unit tests.
(XvfbDriver._xvfb_read_display_id): Helper function to read from
the pipe, only needed to be overriden by unit tests.
(XvfbDriver._xvfb_run): Run Xvfb with -displayfd option, using a
pipe to read the display id.
(XvfbDriver._start): Call _xvfb_run() and remove the code to run
Xvfb for a given display.
(XvfbDriver.stop): Remove code to release and delete file locks.
* Scripts/webkitpy/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):
(XvfbDriverTest.test_start):
(XvfbDriverTest.test_start_arbitrary_worker_number):
(XvfbDriverTest.test_stop):
(XvfbDriverTest.assertDriverStartSuccessful): Deleted.
(XvfbDriverTest): Deleted.
(XvfbDriverTest.test_stop.FakeXvfbProcess): Deleted.

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

3 years agoNull dereference loading Blink layout test editing/execCommand/indent-button-crash...
carlosgc@webkit.org [Wed, 18 Nov 2015 07:52:47 +0000 (07:52 +0000)]
Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
https://bugs.webkit.org/show_bug.cgi?id=151187

Reviewed by Darin Adler.

Source/WebCore:

This is a merge of Blink r174671:
https://codereview.chromium.org/291143002

Fixes imported/blink/editing/execCommand/indent-button-crash.html.

* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::doApply):

LayoutTests:

Unskip the test.

* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

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

3 years agoREGRESSION(r192459): [GTK] User agent string is broken after r192459
carlosgc@webkit.org [Wed, 18 Nov 2015 07:48:06 +0000 (07:48 +0000)]
REGRESSION(r192459): [GTK] User agent string is broken after r192459
https://bugs.webkit.org/show_bug.cgi?id=151347

Reviewed by Žan Doberšek.

.:

Pass UA version numbers as strings to the build.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Remove the incorrect macro and simply use the given values
USER_AGENT_GTK_MAJOR_VERSION and USER_AGENT_GTK_MINOR_VERSION that
are now strings.

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

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

3 years agorun-webkit-tests should not truncate persistent lines
ap@apple.com [Wed, 18 Nov 2015 06:27:09 +0000 (06:27 +0000)]
run-webkit-tests should not truncate persistent lines
https://bugs.webkit.org/show_bug.cgi?id=151376
rdar://problem/23162775

Reviewed by Antti Koivisto.

It is OK to truncate progress lines, but it's not OK to truncate error (or otherwise
unexpected result) messages that remain on the screen to be read. In practice, this
almost always truncates the test path, which is important to see.

* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer._test_status_line):
(Printer.print_finished_test):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_test_status_line):

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

3 years agoSimple line layout: Add letter-spacing support.
zalan@apple.com [Wed, 18 Nov 2015 03:00:43 +0000 (03:00 +0000)]
Simple line layout: Add letter-spacing support.
https://bugs.webkit.org/show_bug.cgi?id=151362

Reviewed by Antti Koivisto.

This enables us to use simple line layout on letter-spacing content.
(fixme: webkit.org/b/151368 -> Repaint rect is not computed correctly when negative letter-spacing applied)

Source/WebCore:

Test: fast/text/simple-line-letterspacing.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): RenderLineBoxList tests vertical intersection only.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):

LayoutTests:

* fast/text/simple-line-letterspacing-expected.html: Added.
* fast/text/simple-line-letterspacing.html: Added.

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

3 years ago[JSC] Untangle the dependencies on FTLAbbreviations a bit
benjamin@webkit.org [Wed, 18 Nov 2015 01:53:44 +0000 (01:53 +0000)]
[JSC] Untangle the dependencies on FTLAbbreviations a bit
https://bugs.webkit.org/show_bug.cgi?id=151375

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-17
Reviewed by Geoffrey Garen.

FTLAbbreviations was included in many places but in most cases
we just need the Abbreviated types. Update the #include accordingly.

Also remove the IntrinsicRepository dependency from the B3Output.

* ftl/FTLAbstractHeap.cpp:
* ftl/FTLAbstractHeap.h:
* ftl/FTLAbstractHeapRepository.cpp:
* ftl/FTLB3Output.h:
(JSC::FTL::Output::Output):
(JSC::FTL::Output::stackmapIntrinsic):
(JSC::FTL::Output::frameAddressIntrinsic):
(JSC::FTL::Output::patchpointInt64Intrinsic):
(JSC::FTL::Output::patchpointVoidIntrinsic):
* ftl/FTLCommonValues.cpp:
* ftl/FTLCommonValues.h:
* ftl/FTLFormattedValue.h:
* ftl/FTLIntrinsicRepository.cpp:
* ftl/FTLOSRExit.h:
* ftl/FTLOSRExitCompilationInfo.h:
* ftl/FTLStackmapArgumentList.h:
* ftl/FTLState.cpp:
* ftl/FTLState.h:
* ftl/FTLTypedPointer.h:

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

3 years agoWeb Inspector: Move Timeline creation into a recording
commit-queue@webkit.org [Wed, 18 Nov 2015 01:34:49 +0000 (01:34 +0000)]
Web Inspector: Move Timeline creation into a recording
https://bugs.webkit.org/show_bug.cgi?id=151367

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-17
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._loadNewRecording): Deleted.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.create):
(WebInspector.Timeline.prototype.get type):
(WebInspector.Timeline): Deleted.
(WebInspector.Timeline.prototype.get recording): Deleted.
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get readonly):
(WebInspector.TimelineRecording.prototype.unloaded):
(WebInspector.TimelineRecording.prototype.reset):
(WebInspector.TimelineRecording.prototype.isWritable): Deleted.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.shown):

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

3 years agoReorganize the graphics benchmark string table
commit-queue@webkit.org [Wed, 18 Nov 2015 01:29:15 +0000 (01:29 +0000)]
Reorganize the graphics benchmark string table
https://bugs.webkit.org/show_bug.cgi?id=151334

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-17
Reviewed by Simon Fraser.

Make the graphics benchmark string table be an object of sub-objects. Each
sub-object represents an associative array, the key is the string name and
the value is the string data.

* Animometer/resources/extensions.js:
(ResultsDashboard.prototype.toJSON):
(ResultsTable.prototype._showGraph):
(ResultsTable.prototype._showJSON):
(ResultsTable.prototype._isNoisyMeasurement):
(ResultsTable.prototype._isNoisyTest):
(ResultsTable.prototype._showTest):
(ResultsTable.prototype._showSuite):
(ResultsTable.prototype._showIteration):
* Animometer/resources/sampler.js:
(Sampler.prototype.toJSON):
* Animometer/resources/strings.js:
* Animometer/runner/resources/animometer.js:
(window.benchmarkRunnerClient.didFinishLastIteration):
(window.suitesManager.updateLocalStorageFromJSON):
(window.benchmarkController.showResults):
(window.benchmarkController.showJson):
(window.benchmarkController.showTestGraph):
(window.benchmarkController.showTestJSON):
* Animometer/runner/resources/tests.js:
* Animometer/tests/resources/main.js:

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

3 years agoB3::generate should separate out the final Air codegen, so that it can be done outsid...
fpizlo@apple.com [Wed, 18 Nov 2015 01:27:28 +0000 (01:27 +0000)]
B3::generate should separate out the final Air codegen, so that it can be done outside the Graph safepoint
https://bugs.webkit.org/show_bug.cgi?id=151371

Reviewed by Benjamin Poulain.

One of the FTL optimizations is that while the expensive backend is running, we are at a "graph
safepoint" that allows the VM to do GCs and other dangerous and time-sensitive things without
waiting for the compilation thread. While in the safepoint, we cannot do anything that touches
anything other than the backend's state. That means, for example, that we wouldn't be able to run
any of the stackmap generation callbacks, since those need to mess with DFG state.

That means that we need to separate the B3 pipeline into "preparation" and "generation".
Preparation is all of the expensive stuff: all B3 phases, lowering to Air, all Air phases.
Generation is just the part where we turn fully lowered Air into machine code. Generation also
happens to be the part where we call stackmap generation callbacks. In other words, preparation
is exactly the stuff that should go into the graph safepoint, while generation is the stuff that
we want to do after we emerge from the safepoint.

Because the tests were using the higher-level Compilation API, I didn't have to change any test
code. The FTL will not use that high-level API.

* b3/B3Compilation.cpp:
(JSC::B3::Compilation::Compilation):
* b3/B3Generate.cpp:
(JSC::B3::prepareForGeneration):
(JSC::B3::generate):
(JSC::B3::generateToAir):
* b3/B3Generate.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::lowerToAir):
* b3/B3LowerToAir.h:
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::Procedure):
* b3/B3Procedure.h:
(JSC::B3::Procedure::takeByproducts):
(JSC::B3::Procedure::code):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::proc):
(JSC::B3::Air::Code::lastPhaseName):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::prepareForGeneration):
(JSC::B3::Air::generate):
* b3/air/AirGenerate.h:

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

3 years agoWeb Inspector: Breakpoint condition field should use CodeMirror
mattbaker@apple.com [Wed, 18 Nov 2015 00:23:56 +0000 (00:23 +0000)]
Web Inspector: Breakpoint condition field should use CodeMirror
https://bugs.webkit.org/show_bug.cgi?id=151333

Reviewed by Joseph Pecoraro.

Updated breakpoint popover's condition field to use CodeMirror.

* UserInterface/Controllers/BreakpointPopoverController.js:
Removed keyboard shortcuts. Now handled by CodeMirror.
(WebInspector.BreakpointPopoverController.prototype.completionControllerShouldAllowEscapeCompletion):
Prevent handling of escape to allow tabbing to next element.
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
Create CodeMirror instance.
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorChanged):
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
Enforce single-line editor.
(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
(WebInspector.BreakpointPopoverController): Deleted.
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint):
Removed condition element select. CodeMirror sets focus when popover content is created.
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputChanged): Deleted.
Replaced by BreakpointPopoverController.prototype._conditionCodeMirrorChanged.
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputKeyDown): Deleted.
Replaced by BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey.

* UserInterface/Views/BreakpointPopoverController.css:
(.edit-breakpoint-popover-condition):
(.edit-breakpoint-popover-condition > .CodeMirror):
(#edit-breakpoint-popover-condition): Deleted.
Replace selector id with class, styled CodeMirror element to match original input element.

* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): Deleted.
Moved common CodeMirror placeholder text style to CodeMirrorOverrides.css.

* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-placeholder):
Add placeholder style.

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

3 years agoDisable flattening the stage iframe of the graphics benchmark when running on iOS
said@apple.com [Wed, 18 Nov 2015 00:16:56 +0000 (00:16 +0000)]
Disable flattening the stage iframe of the graphics benchmark when running on iOS
https://bugs.webkit.org/show_bug.cgi?id=151361

Reviewed by Simon Fraser.

Use fixed size for stage iframe of the graphics benchmark to disable
flattening the iframe while animating the particles. Also ensure the
bouncing particles do not go outside the iframe's boundaries.

* Animometer/runner/resources/animometer.css:
(section#running > #running-test > iframe):
(@media screen and (min-device-width: 1800px)):
* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
(BouncingParticle.prototype.animate):

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

3 years agoUse the media queries to dynamically set the stage for the graphics benchmark
commit-queue@webkit.org [Wed, 18 Nov 2015 00:08:38 +0000 (00:08 +0000)]
Use the media queries to dynamically set the stage for the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151327

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-17
Reviewed by Simon Fraser.

Clean setting the benchmark css rules by using the media queries. Accessing
document.stylesheets.cssRules seems to be unreliable. Fix the test harness
load event listener invocation. And also remove the options for normalizing
the stage resolution for retina display.

* Animometer/resources/extensions.js:
(window.DocumentExtension.insertCssRuleAfter): Deleted.
* Animometer/runner/animometer.html:
* Animometer/runner/resources/animometer.css:
(@media screen and (min-device-width: 1800px)):
* Animometer/runner/resources/animometer.js:
(window.sectionsManager.setupRunningSectionStyle):
(window.benchmarkController.initialize):
(window.sectionsManager.setupSectionStyle): Deleted.
* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
(BouncingParticlesStage):
* Animometer/tests/text/layering-text.html:
* Animometer/tests/text/resources/layering-text.js:
(LayeringTextStage):
(LayeringTextStage.prototype._setFontSize): Deleted.

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

3 years agoUnreviewed, fix a ChangeLog entry to have the right filename.
fpizlo@apple.com [Wed, 18 Nov 2015 00:07:34 +0000 (00:07 +0000)]
Unreviewed, fix a ChangeLog entry to have the right filename.

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

3 years agoFTL::State should be able to refer to B3::Procedure
fpizlo@apple.com [Wed, 18 Nov 2015 00:05:47 +0000 (00:05 +0000)]
FTL::State should be able to refer to B3::Procedure

Rubber stamped by Benjamin Poulain.

* ftl/FTLState.h:

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

3 years ago[JSC] Add an empty FTLOutput for B3 that crashes on any operation
benjamin@webkit.org [Tue, 17 Nov 2015 23:44:01 +0000 (23:44 +0000)]
[JSC] Add an empty FTLOutput for B3 that crashes on any operation
https://bugs.webkit.org/show_bug.cgi?id=151366

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-17
Reviewed by Filip Pizlo.

* JavaScriptCore.xcodeproj/project.pbxproj:
* ftl/B3Output.h: Added.
* ftl/FTLAbbreviatedTypes.h:
* ftl/FTLAbstractHeap.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::createPhiVariables):
* ftl/FTLOutput.cpp:
* ftl/FTLOutput.h:

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

3 years agoMarking storage/indexeddb/modern/get-index-failures.html as flaky on mac-wk1
ryanhaddad@apple.com [Tue, 17 Nov 2015 23:15:31 +0000 (23:15 +0000)]
Marking storage/indexeddb/modern/get-index-failures.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=151364

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years ago[JSC] Do not copy the adjacency list when we just need to manipulate them
commit-queue@webkit.org [Tue, 17 Nov 2015 23:10:14 +0000 (23:10 +0000)]
[JSC] Do not copy the adjacency list when we just need to manipulate them
https://bugs.webkit.org/show_bug.cgi?id=151343

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-17
Reviewed by Geoffrey Garen.

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::precoloredCoalescingHeuristic):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::conservativeHeuristic):

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

3 years ago[JSC] Remove FTLOutput operations that act directly on floats
commit-queue@webkit.org [Tue, 17 Nov 2015 22:48:19 +0000 (22:48 +0000)]
[JSC] Remove FTLOutput operations that act directly on floats
https://bugs.webkit.org/show_bug.cgi?id=151342

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-17
Reviewed by Geoffrey Garen.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithFRound):
(JSC::FTL::DFG::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutByVal):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::store):
* ftl/FTLOutput.h:
(JSC::FTL::Output::loadFloatToDouble):
(JSC::FTL::Output::fround):
(JSC::FTL::Output::loadFloat): Deleted.

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

3 years agoAdd a FTL_USES_B3 compile-time setting and set it to 0.
fpizlo@apple.com [Tue, 17 Nov 2015 22:46:53 +0000 (22:46 +0000)]
Add a FTL_USES_B3 compile-time setting and set it to 0.

Rubber stamped by Benjamin Poulain.

* dfg/DFGCommon.h:

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

3 years ago[WinCairo][MediaFoundation] Current playback time is not shown.
peavo@outlook.com [Tue, 17 Nov 2015 22:41:24 +0000 (22:41 +0000)]
[WinCairo][MediaFoundation] Current playback time is not shown.
https://bugs.webkit.org/show_bug.cgi?id=151357

Reviewed by Alex Christensen.

We need to implement the currentTime() method.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
(WebCore::MediaPlayerPrivateMediaFoundation::paused):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::paintCurrentFrame):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::currentTime):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

3 years agoCheckAdd/Mul should have commutativity optimizations in B3->Air lowering
fpizlo@apple.com [Tue, 17 Nov 2015 22:31:40 +0000 (22:31 +0000)]
CheckAdd/Mul should have commutativity optimizations in B3->Air lowering
https://bugs.webkit.org/show_bug.cgi?id=151214

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This is an overhaul of CheckAdd/CheckSub/CheckMul that fixes bugs, improves codegen, and
simplifies the contract between B3 and its client.

Previously, the idea was that the operands to the Air BranchAdd/Sub/Mul matched the children of
the B3 CheckAdd/Sub/Mul, or at least, that's what the B3::CheckSpecial would make you believe.
This meant that B3/Air had to avoid optimizations that would break this protocol. This prevented
commutativity optimizations on CheckAdd/Mul and it also prevented strength reduction from
CheckMul(x, 2) to CheckAdd(x, x), for example. Those optimizations would break things because the
client's Stackmap generation callback was allowed to assume that the first entry in params.reps
was the first child. Also, there was a contract between B3 and its client that for CheckAdd/Sub,
the client would undo the operation by doing the opposite operation with the params.reps[0] as the
source and params.reps[1] as the destination.

This not only prevented commutativity optimizations, it also led to bugs. Here are two bugs that
we had:

- Add(x, x) would not work. The client would be told to undo the add using %x as both the source
  and destination. The client would use a sub() instruction. The result would not be x - it would
  be zero.

- Mul where the result got coalesced with one of the sources. You can't undo a multiplication, so
  you need to keep the inputs alive until after the result is computed - i.e. the inputs are late
  uses. I initially thought I worked around this by using a three-operand form of Mul, but of
  course that doesn't actually fix the issue.

This patch fixes these issues comprehensively by introducing the following changes:

The params.reps corresponding to the first two children of CheckAdd/Sub/Mul and the first child of
Check are always garbage: if you want to know the values of those children in the slow path, pass
them as additional stackmap children. This makes it clear to the compiler whose values you
actually care about, and frees the compiler to reorder and commute the non-stackmap children.

The "undo" of an Add or Sub is handled internally by B3: the client doesn't have to know anything
about undoing. B3 does it. The contract is simply that if a B3::Value* is a stackmap child of a
CheckXYZ, then the corresponding entry in params.reps inside the stackmap generator callback will
contain the value of that Value*. For Add and Sub, B3 undoes the operation. For Add(x, x), the
undo uses the carry flag and some shift magic. For Mul, B3 uses LateUse:

A new kind of Arg::Role called Arg::LateUse is introduced: This kind of use means that the use
happens at the start of the execution of the next instruction. None of the built-in Air opcodes
use LateUse, but it is used by B3::CheckSpecial. We use it to implement CheckMul.

Finally, this change fixes testComplex to actually create many live variables. This revealed a
really dumb pathology in allocateStack(), and this patch fixes it. Basically, it's a bad idea to
build interference graphs by repeatedly recreating the same cliques.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::test32):
(JSC::MacroAssemblerX86Common::setCarry):
(JSC::MacroAssemblerX86Common::invert):
* b3/B3CheckSpecial.cpp:
(JSC::B3::Air::numB3Args):
(JSC::B3::CheckSpecial::Key::Key):
(JSC::B3::CheckSpecial::Key::dump):
(JSC::B3::CheckSpecial::CheckSpecial):
(JSC::B3::CheckSpecial::forEachArg):
(JSC::B3::CheckSpecial::isValid):
(JSC::B3::CheckSpecial::generate):
(JSC::B3::CheckSpecial::dumpImpl):
(JSC::B3::CheckSpecial::deepDumpImpl):
* b3/B3CheckSpecial.h:
(JSC::B3::CheckSpecial::Key::Key):
(JSC::B3::CheckSpecial::Key::operator==):
(JSC::B3::CheckSpecial::Key::operator!=):
(JSC::B3::CheckSpecial::Key::opcode):
(JSC::B3::CheckSpecial::Key::numArgs):
(JSC::B3::CheckSpecial::Key::stackmapRole):
(JSC::B3::CheckSpecial::Key::hash):
* b3/B3CheckValue.cpp:
(JSC::B3::CheckValue::~CheckValue):
(JSC::B3::CheckValue::convertToAdd):
(JSC::B3::CheckValue::CheckValue):
* b3/B3CheckValue.h:
* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::checkMulConstant):
(JSC::B3::Const32Value::checkNegConstant):
(JSC::B3::Const32Value::divConstant):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::checkMulConstant):
(JSC::B3::Const64Value::checkNegConstant):
(JSC::B3::Const64Value::divConstant):
* b3/B3Const64Value.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.h:
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::~PatchpointSpecial):
(JSC::B3::PatchpointSpecial::forEachArg):
(JSC::B3::PatchpointSpecial::isValid):
* b3/B3ReduceStrength.cpp:
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
* b3/B3StackmapSpecial.h:
* b3/B3StackmapValue.cpp:
(JSC::B3::StackmapValue::append):
(JSC::B3::StackmapValue::appendSomeRegister):
(JSC::B3::StackmapValue::setConstrainedChild):
* b3/B3StackmapValue.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::checkMulConstant):
(JSC::B3::Value::checkNegConstant):
(JSC::B3::Value::divConstant):
* b3/B3Value.h:
* b3/air/AirAllocateStack.cpp:
(JSC::B3::Air::allocateStack):
* b3/air/AirArg.cpp:
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isLateUse):
(JSC::B3::Air::Arg::isDef):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::isUse): Deleted.
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::generate):
* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::allocate):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::InterferenceEdge::hash):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::InterferenceEdge::dump):
(JSC::B3::Air::addSpillAndFillToProgram):
(JSC::B3::Air::iteratedRegisterCoalescingOnType):
(JSC::B3::Air::iteratedRegisterCoalescing):
* b3/air/AirLiveness.h:
(JSC::B3::Air::Liveness::Liveness):
(JSC::B3::Air::Liveness::LocalCalc::LocalCalc):
(JSC::B3::Air::Liveness::LocalCalc::live):
(JSC::B3::Air::Liveness::LocalCalc::takeLive):
(JSC::B3::Air::Liveness::LocalCalc::execute):
* b3/air/AirOpcode.opcodes:
* b3/air/AirReportUsedRegisters.cpp:
(JSC::B3::Air::reportUsedRegisters):
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/testb3.cpp:
(JSC::B3::testMulArg):
(JSC::B3::testMulArgStore):
(JSC::B3::testMulAddArg):
(JSC::B3::testMulArgs):
(JSC::B3::testComplex):
(JSC::B3::testSimpleCheck):
(JSC::B3::testCheckLessThan):
(JSC::B3::testCheckMegaCombo):
(JSC::B3::testCheckAddImm):
(JSC::B3::testCheckAddImmCommute):
(JSC::B3::testCheckAddImmSomeRegister):
(JSC::B3::testCheckAdd):
(JSC::B3::testCheckAdd64):
(JSC::B3::testCheckSubImm):
(JSC::B3::testCheckSubBadImm):
(JSC::B3::testCheckSub):
(JSC::B3::testCheckSub64):
(JSC::B3::testCheckNeg):
(JSC::B3::testCheckNeg64):
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul2):
(JSC::B3::testCheckMul64):
(JSC::B3::run):

Source/WTF:

Disable my failed attempts at perfect forwarding, since they were incorrect, and caused compile
errors if you tried to pass an argument that bound to lvalue. This shouldn't affect performance of
anything we care about, and performance tests seem to confirm that it's all good.

* wtf/ScopedLambda.h:

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

3 years agoAir should lay out code optimally
fpizlo@apple.com [Tue, 17 Nov 2015 22:29:54 +0000 (22:29 +0000)]
Air should lay out code optimally
https://bugs.webkit.org/show_bug.cgi?id=150478

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This adds a phase that optimizes code layout using something that's worked well for me in the past.
Basically, it just forces pre-ordering on the CFG, except that:

- Blocks that are only reachable by Rare control flow are scheduled separately, all the way at the
  end.

- Successors of the same frequency class are pushed in ascending order of frequency, so that the most
  frequent successor is scheduled immediately after.

This also adds the requisite branch flipping, so that a branch's taken successor is not the
fall-through block. We want the fall-through to be the not-taken successor if at all possible.

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3BlockWorklist.h:
* b3/B3GenericFrequentedBlock.h:
(JSC::B3::GenericFrequentedBlock::frequency):
(JSC::B3::GenericFrequentedBlock::isRare):
(JSC::B3::GenericFrequentedBlock::dump):
* b3/B3Procedure.h:
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isDoubleCond):
(JSC::B3::Air::Arg::isCondition):
(JSC::B3::Air::Arg::isSpecial):
(JSC::B3::Air::Arg::asDoubleCondition):
(JSC::B3::Air::Arg::isInvertible):
(JSC::B3::Air::Arg::inverted):
* b3/air/AirBasicBlock.h:
(JSC::B3::Air::BasicBlock::index):
(JSC::B3::Air::BasicBlock::setIndex):
(JSC::B3::Air::BasicBlock::size):
(JSC::B3::Air::BasicBlock::begin):
(JSC::B3::Air::BasicBlock::containsPredecessor):
(JSC::B3::Air::BasicBlock::frequency):
* b3/air/AirBlockWorklist.h: Added.
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::findNextBlock):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::proc):
(JSC::B3::Air::Code::at):
(JSC::B3::Air::Code::operator[]):
(JSC::B3::Air::Code::blockList):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::generate):
* b3/air/AirOpcode.opcodes:
* b3/air/AirOptimizeBlockOrder.cpp: Added.
(JSC::B3::Air::optimizeBlockOrder):
* b3/air/AirOptimizeBlockOrder.h: Added.

Source/WTF:

* wtf/GraphNodeWorklist.h:
(WTF::GraphNodeWorklist::push):
(WTF::GraphNodeWorklist::isEmpty):
(WTF::GraphNodeWorklist::notEmpty):
(WTF::GraphNodeWorklist::pop):

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

3 years ago[JSC] JSPropertyNameEnumerator could be destructorless.
akling@apple.com [Tue, 17 Nov 2015 22:13:41 +0000 (22:13 +0000)]
[JSC] JSPropertyNameEnumerator could be destructorless.
<https://webkit.org/b/151242>

Reviewed by Mark Lam.

Make JSPropertyNameEnumerator destructorless and have it store the property names
cache in CopiedSpace. This was the most popular occupant of 64-byte destructor cells
in MarkedSpace, so making it destructorless gets rid of some ill-filled MarkedBlocks.

This patch had two issues on 32-bit platforms when first landed:

- Copied space allocations are required to be 8-byte divisible in size.

- WriteBarrier<Unknown> and WriteBarrier<JSString> are not the same size on 32-bit;
  the former is a 64-bit EncodedJSValue internally, and the latter is a 32-bit JSCell*.
  My patch was reinterpret_cast'ing a WriteBarrier<JSString> to a WriteBarrier<Unknown>
  when passing to SlotVisitor::appendValues(), which led to invalid addresses getting
  marked and strings getting GC'd prematurely.

* heap/CopyToken.h:
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::finishCreation):
(JSC::JSPropertyNameEnumerator::visitChildren):
(JSC::JSPropertyNameEnumerator::copyBackingStore):
(JSC::JSPropertyNameEnumerator::destroy): Deleted.
* runtime/JSPropertyNameEnumerator.h:

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

3 years agoRefactoring: move branchMul32's imm arg to the 3rd argument to be consistent.
mark.lam@apple.com [Tue, 17 Nov 2015 22:09:07 +0000 (22:09 +0000)]
Refactoring: move branchMul32's imm arg to the 3rd argument to be consistent.
https://bugs.webkit.org/show_bug.cgi?id=151358

Reviewed by Saam Barati.

branch32, branchAdd32, and branchSub32 all have it as the 3rd argument.
branchMul32 is the odd man out.  This patch makes branchMul32 consistent with
the others.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::branchAdd32):
(JSC::MacroAssembler::branchMul32):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branchMul32):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::branchMul32):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::branchMul32):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchMul32):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::branchNeg32):
(JSC::MacroAssemblerSH4::branchMul32):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchMul32):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mul):

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

3 years agoUse the JITAddGenerator snippet in the DFG.
mark.lam@apple.com [Tue, 17 Nov 2015 21:55:33 +0000 (21:55 +0000)]
Use the JITAddGenerator snippet in the DFG.
https://bugs.webkit.org/show_bug.cgi?id=151266

Reviewed by Geoffrey Garen.

No tests added because the op_add.js stress test already tests for correctness
(using the LLINT as a reference).

Performance-wise, the difference from the pre-existing DFG implementation is
insignificant (at least as measured on x86 and x86_64).  We're moving forward
with adopting this implementation because it unifies the 32-bit and 64-bit
implementations, as well as lays ground work for a repatching inline cache
implementation of op_add later.

* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::resultType):
- Made an assertion less restrictive.  For ValueAdd operands, the DFG thinks that
  the operand can also be empty (though we should never see this in practice).

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
- Add fallback to unused type operands.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueAdd):
- Introduce a common function to compile the ValueAdd node.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::JSValueOperand::JSValueOperand):
- Add the forwarding constructor so that we can use Optional<JSValueOperand>.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- Changed to use the common compileValueAdd().

* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::moveValue):
- Similar to moveTrustedValue() but used for untrusted constants.

* jit/JITAddGenerator.cpp:
(JSC::JITAddGenerator::generateFastPath):
* jit/JITAddGenerator.h:
(JSC::JITAddGenerator::JITAddGenerator):
- Updated to take the left or right operand as a constant.  This is necessary
  because the client should not be making assumptions about whether the snippet
  will determine the operation to be commutative or not.  Instead, the client
  should just pass in the operands and let the snippet do any operand order
  swapping if necessary.

* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):
- Updated to use the new JITAddGenerator interface.

* tests/stress/op_add.js:
(stringifyIfNeeded):
(runTest):
- Made test output more clear about when string results are expected.

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

3 years agoIt's best for the DFG to always have some guess of basic block frequency
fpizlo@apple.com [Tue, 17 Nov 2015 21:41:43 +0000 (21:41 +0000)]
It's best for the DFG to always have some guess of basic block frequency
https://bugs.webkit.org/show_bug.cgi?id=151350

Reviewed by Geoffrey Garen.

It'll simplify things for B3 if we always have some estimate of block frequency, even if it's not
a great estimate. Using NaN as an estimate is probably worse than using any non-NaN number.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCriticalEdgeBreakingPhase.cpp:
(JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge):
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::createPreHeader):

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

3 years agoA window with a hung tab waits 5s before closing
ggaren@apple.com [Tue, 17 Nov 2015 21:31:57 +0000 (21:31 +0000)]
A window with a hung tab waits 5s before closing
https://bugs.webkit.org/show_bug.cgi?id=151319

Reviewed by Anders Carlsson.

I manually tested that I did not break unload events upon window close
by running run-webkit-httpd and invoking a 1x1 image load of
http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
handler.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
close without waiting for a response.

* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.

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

3 years agoReserved VM pool established in r187125 is likely too conservative
msaboff@apple.com [Tue, 17 Nov 2015 21:30:01 +0000 (21:30 +0000)]
Reserved VM pool established in r187125 is likely too conservative
https://bugs.webkit.org/show_bug.cgi?id=151351

Reviewed by Filip Pizlo.

Reduce the VM allocation reserved pool from 25% to 15% for ARM32.

* jit/ExecutableAllocator.h:

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

3 years agoSplit SimpleLineLayout::canUseFor into canUseForStyle and canUseForFontAndText.
zalan@apple.com [Tue, 17 Nov 2015 21:16:07 +0000 (21:16 +0000)]
Split SimpleLineLayout::canUseFor into canUseForStyle and canUseForFontAndText.
https://bugs.webkit.org/show_bug.cgi?id=151338

Reviewed by Myles C. Maxfield.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::canUseFor):

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

3 years agoFTLLazySlowPaths should be able to handle being passed the zero register as a location
sbarati@apple.com [Tue, 17 Nov 2015 20:52:26 +0000 (20:52 +0000)]
FTLLazySlowPaths should be able to handle being passed the zero register as a location
https://bugs.webkit.org/show_bug.cgi?id=151193

Reviewed by Geoffrey Garen.

On arm64, SP and ZR are the same register number. The meaning
of the register number being SP or ZR is dependent on context of
the instruction and the register within the instruction. LLVM may
prove that a value is zero, or sometimes, we will lower a
value as a constant zero (for example, we might compile
CreateDirectArguments of an inlined call frame and we might know
that the arguments have a length of zero). LazySlowPaths should
be able to gracefully handle being passed a stackmap location
with a gpr value of SP by moving zero into another register
and replacing the location's register with the new register.
This way, no lazy slow path will ever have access to a location with a GPR
value of SP.  This patch makes this work by using a scratch register
allocator when we need to do this maneuver of moving zero into a scratch
register.  Inside FTLCompile, we track if we need to move zero into a register,
and if so, into which register. We actually emit the necessary
instructions to move zero into this register, and to spill reused
registers if necessary, while generating the code for the lazy slow
path itself.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLDWARFRegister.cpp:
(JSC::FTL::DWARFRegister::reg):
* ftl/FTLLazySlowPath.cpp:
(JSC::FTL::LazySlowPath::LazySlowPath):
(JSC::FTL::LazySlowPath::generate):
* ftl/FTLLazySlowPath.h:
(JSC::FTL::LazySlowPath::createGenerator):

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

3 years ago[JSC] Support Doubles with B3's Mul.
mark.lam@apple.com [Tue, 17 Nov 2015 20:24:12 +0000 (20:24 +0000)]
[JSC] Support Doubles with B3's Mul.
https://bugs.webkit.org/show_bug.cgi?id=151355

Reviewed by Filip Pizlo.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testMulLoadTwice):
(JSC::B3::testMulArgDouble):
(JSC::B3::testMulArgsDouble):
(JSC::B3::testMulArgImmDouble):
(JSC::B3::testMulImmArgDouble):
(JSC::B3::testMulImmsDouble):
(JSC::B3::testDivArgDouble):
(JSC::B3::run):

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

3 years agoRemoved useless variable scriptResult from testExecutionTimeLimit
commit-queue@webkit.org [Tue, 17 Nov 2015 19:56:01 +0000 (19:56 +0000)]
Removed useless variable scriptResult from testExecutionTimeLimit
https://bugs.webkit.org/show_bug.cgi?id=151331

Patch by Matthew Daiter <mdaiter8121@gmail.com> on 2015-11-17
Reviewed by Alex Christensen.

* API/tests/ExecutionTimeLimitTest.cpp: Removed scriptResult
(testExecutionTimeLimit):

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

3 years ago[JSC] Support Doubles with B3's Sub.
mark.lam@apple.com [Tue, 17 Nov 2015 19:41:27 +0000 (19:41 +0000)]
[JSC] Support Doubles with B3's Sub.
https://bugs.webkit.org/show_bug.cgi?id=151322

Reviewed by Filip Pizlo.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:

* b3/testb3.cpp:
(JSC::B3::testSubImmArg32):
(JSC::B3::testSubArgDouble):
(JSC::B3::testSubArgsDouble):
(JSC::B3::testSubArgImmDouble):
(JSC::B3::testSubImmArgDouble):
(JSC::B3::testSubImmsDouble):
(JSC::B3::testBitAndArgs):
(JSC::B3::negativeZero):
(JSC::B3::posInfinity):
(JSC::B3::negInfinity):
(JSC::B3::doubleOperands):
(JSC::B3::run):
- Added RUN_UNARY and RUN_BINARY macros to auto generate permutations
  of operands for the tests.
- Added SubDouble tests using the new macros.

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

3 years agoModern IDB: Support IDBObjectStore.indexNames.
beidson@apple.com [Tue, 17 Nov 2015 19:41:26 +0000 (19:41 +0000)]
Modern IDB: Support IDBObjectStore.indexNames.
https://bugs.webkit.org/show_bug.cgi?id=151341

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by existing storage/indexeddb/modern/objectstore-attributes.html).

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::indexNames):
* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::indexNames):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

LayoutTests:

* storage/indexeddb/modern/objectstore-attributes-expected.txt:
* storage/indexeddb/modern/objectstore-attributes.html:

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

3 years agoCommit working changes from build.webkit.org
lforschler@apple.com [Tue, 17 Nov 2015 19:30:14 +0000 (19:30 +0000)]
Commit working changes from build.webkit.org

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

3 years ago[JSC] IteratedRegisterCoalescingAllocator's freeze can add zombie Tmps to our colorin...
commit-queue@webkit.org [Tue, 17 Nov 2015 19:11:22 +0000 (19:11 +0000)]
[JSC] IteratedRegisterCoalescingAllocator's freeze can add zombie Tmps to our coloring algorithm
https://bugs.webkit.org/show_bug.cgi?id=151345

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-17
Reviewed by Filip Pizlo.

The extended test of https://bugs.webkit.org/show_bug.cgi?id=151214 revealed a problem with
the Move freezing step of the iterated register allocator.

When freezing a move related Tmp, we go over all the move instructions and update the other
Tmp of the move as needed. If that Tmp is no longer Move related and is of low degree it can
be simplified too.

The problem arise when one of those Tmp was already coalesced. For example, say we have

  1: move %tmp42, %tmp43
  2: move %tmp42, %tmp44

The first move cannot be coalesced for some reason and is moved to the Active worklist.
The second move is coalesced and %tmp42 is now %tmp44.

When nothing can be simplified or coalesced, we look at freezing a Move-related Tmp.
Let's say we pick %tmp43. The code of freeze() was going to all the Move instructions
to update them. Here you would find @1 above, get %tmp42 as the other Tmp. Since %tmp42
is no longer move related, it is added to the simplify work list.
-> We just added a coalesced Tmp to our worklist!

To fix that, I get the alias of every other Tmp before updating its status.

There is still a problem: multiple Moves instructions may have been coalesced to the same
Tmp. We must not add a Tmp twice to a worklist.
To avoid duplicates, I rely on the fact that the freeze worklist should not contains
aliased Tmps. Before adding something to the simplify worklist, I check that it was
in the freeze worklist.

I cannot find how this problem would have been avoided in the original paper. I suspect
that may have been a bug in the pseudo-code.

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::freeze):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::freezeMoves):

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

3 years agoUnreviewed, skip crashing mediastream tests
wenson_hsieh@apple.com [Tue, 17 Nov 2015 19:05:29 +0000 (19:05 +0000)]
Unreviewed, skip crashing mediastream tests

Tests in fast/mediastream/ that attempt to render mock video source frames crash due to
use-after-free. https://bugs.webkit.org/show_bug.cgi?id=151353 tracks these crashes.

* platform/mac/TestExpectations:

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

3 years ago[WK1] Mark test failure to get bots green after r192499
bfulgham@apple.com [Tue, 17 Nov 2015 17:58:42 +0000 (17:58 +0000)]
[WK1] Mark test failure to get bots green after r192499
https://bugs.webkit.org/show_bug.cgi?id=151055

* webgl/1.0.3/151055_asan.html: Mark webgl/1.0.3/151055_asan.html as failing.

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

3 years agoASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForM...
svillar@igalia.com [Tue, 17 Nov 2015 10:13:19 +0000 (10:13 +0000)]
ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
https://bugs.webkit.org/show_bug.cgi?id=151025

Reviewed by Darin Adler.

Source/WebCore:

Negative margins could make RenderFlexibleBox compute negative
intrinsic sizes. Clamp intrinsic sizes to 0.

Test: css3/flexbox/negative-margins-assert.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):

LayoutTests:

* css3/flexbox/negative-margins-assert-expected.txt: Added.
* css3/flexbox/negative-margins-assert.html: Added.

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

3 years ago[css-grid] Fix alignment with gutters and negative free spaces
svillar@igalia.com [Tue, 17 Nov 2015 10:11:43 +0000 (10:11 +0000)]
[css-grid] Fix alignment with gutters and negative free spaces
https://bugs.webkit.org/show_bug.cgi?id=151307

Reviewed by Zalan Bujtas.

Source/WebCore:

This is a regression caused by r192154. The problem was that
the free space was not properly computed when the grid
container was narrower than the track sizes + gutters size for
a given axis. The culprit was an unneeded clamp to 0 which was
polluting the freeSpace computation as the track sizing
algorithm works perfectly OK with negative freeSpace values.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeTrackSizesForDirection):

LayoutTests:

* fast/css-grid-layout/grid-gutters-and-alignment-expected.txt:
* fast/css-grid-layout/grid-gutters-and-alignment.html:

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

3 years ago[GStreamer] Use RunLoop instead of GMainLoop in AudioFileReaderGStreamer
carlosgc@webkit.org [Tue, 17 Nov 2015 09:57:42 +0000 (09:57 +0000)]
[GStreamer] Use RunLoop instead of GMainLoop in AudioFileReaderGStreamer
https://bugs.webkit.org/show_bug.cgi?id=151256

Reviewed by Žan Doberšek.

Use RunLoop instead of the platform specific code. The AudioBus
can be created from any thread, so we create a helper thread to
ensure we don't use the main RunLoop.

This patch also includes some code cleanups:
  - Uses smart pointers when possible.
  - Fixes uninitialized members in constructors.
  - Makes private members private.
  - Uses lambdas instead of static non-members functions.
  - nullptr instead of 0 in some places.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createWeakPtr):
(WebCore::AudioFileReader::deinterleavePadAddedCallback):
(WebCore::AudioFileReader::deinterleaveReadyCallback):
(WebCore::AudioFileReader::decodebinPadAddedCallback):
(WebCore::AudioFileReader::AudioFileReader):
(WebCore::AudioFileReader::~AudioFileReader):
(WebCore::AudioFileReader::handleSample):
(WebCore::AudioFileReader::handleMessage):
(WebCore::AudioFileReader::handleNewDeinterleavePad):
(WebCore::AudioFileReader::deinterleavePadsConfigured):
(WebCore::AudioFileReader::plugDeinterleave):
(WebCore::AudioFileReader::decodeAudioForBusCreation):
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
(WebCore::onAppsinkPullRequiredCallback): Deleted.
(WebCore::messageCallback): Deleted.
(WebCore::onGStreamerDeinterleavePadAddedCallback): Deleted.
(WebCore::onGStreamerDeinterleaveReadyCallback): Deleted.
(WebCore::onGStreamerDecodebinPadAddedCallback): Deleted.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstBufferList>):
(WTF::derefGPtr<GstBufferList>):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:

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

3 years ago[GTK] Web Process crashes on reparenting a WebView with AC mode on
carlosgc@webkit.org [Tue, 17 Nov 2015 08:37:21 +0000 (08:37 +0000)]
[GTK] Web Process crashes on reparenting a WebView with AC mode on
https://bugs.webkit.org/show_bug.cgi?id=151139

Reviewed by Mario Sanchez Prada.

When the web view is reparented, the widget is first unrealized,
and then realized again when added to the new parent. In the
second realize, the old redirected XComposite window is destroyed
and a new one is created, but the web process is still using the
old redirected window ID. As soon as the redirected window is
destroyed and the web process tries to use the window ID, it
crashes due to a BadDrawable X error. We have to notify the web
process as soon as the web view is unrealized to stop using the
current window ID and exit accelerated compositing mode until a
new window ID is given. This notification needs to be synchronous,
because the window can be destroyed in the UI process before the
message is received in the web process.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Add an assert to ensure we never have
a redirected window when the view is realized. Also check drawing
area is not nullptr, since it can be destroyed at any time if the
web process crashes.
(webkitWebViewBaseUnrealize): Call
DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
and destroy the redirected XComposite window.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing):
Send DestroyNativeSurfaceHandleForCompositing synchronous messsage
to the web process.
* UIProcess/DrawingAreaProxyImpl.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in: Add
DestroyNativeSurfaceHandleForCompositing message.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::destroyNativeSurfaceHandleForCompositing):
Set the native surface handler for compositing to 0 to reset it.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::makeContextCurrent): Return false
early always when layer tree context ID is 0, even if we already
have a context.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
Cancel any pending layer flush when setting a new handler.

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

3 years agoUnreviewed EFL Gardening on 16th Nov.
hs85.jeong@samsung.com [Tue, 17 Nov 2015 08:11:37 +0000 (08:11 +0000)]
Unreviewed EFL Gardening on 16th Nov.
https://bugs.webkit.org/show_bug.cgi?id=151339

* platform/efl/fast/text/decorations-with-text-combine-expected.txt:
* platform/efl/fast/text/international/text-combine-image-test-expected.txt:
* platform/efl/fast/text/mark-matches-overflow-clip-expected.txt: Added.
* platform/efl/fast/text/text-combine-shrink-on-color-change-expected.txt: Added.

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

3 years ago[JSC] Make FTLOutput's load8() and load16() compatible with B3
benjamin@webkit.org [Tue, 17 Nov 2015 06:20:21 +0000 (06:20 +0000)]
[JSC] Make FTLOutput's load8() and load16() compatible with B3
https://bugs.webkit.org/show_bug.cgi?id=151336

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-16
Reviewed by Filip Pizlo.

B3 does not have 8bit and 16bit types. Make FTLOutput abstract enough
to handle LLVM IR and B3.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileGetArrayLength):
(JSC::FTL::DFG::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStringCharCodeAt):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNotifyWrite):
(JSC::FTL::DFG::LowerDFGToLLVM::compileSwitch):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckHasInstance):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckWatchdogTimer):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateTruthyObject):
(JSC::FTL::DFG::LowerDFGToLLVM::boolify):
(JSC::FTL::DFG::LowerDFGToLLVM::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToLLVM::switchStringRecurse):
(JSC::FTL::DFG::LowerDFGToLLVM::isObject):
(JSC::FTL::DFG::LowerDFGToLLVM::isNotObject):
(JSC::FTL::DFG::LowerDFGToLLVM::isArrayType):
(JSC::FTL::DFG::LowerDFGToLLVM::isExoticForTypeof):
(JSC::FTL::DFG::LowerDFGToLLVM::isType):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateNonNullObject):
(JSC::FTL::DFG::LowerDFGToLLVM::loadCellState):
(JSC::FTL::DFG::LowerDFGToLLVM::emitStoreBarrier):
* ftl/FTLOutput.h:
(JSC::FTL::Output::load8SignExt32):
(JSC::FTL::Output::load8ZeroExt32):
(JSC::FTL::Output::load16SignExt32):
(JSC::FTL::Output::load16ZeroExt32):
(JSC::FTL::Output::constInt8): Deleted.
(JSC::FTL::Output::load8): Deleted.
(JSC::FTL::Output::load16): Deleted.
(JSC::FTL::Output::store8): Deleted.
(JSC::FTL::Output::storeFloat): Deleted.
(JSC::FTL::Output::isZero8): Deleted.
(JSC::FTL::Output::notZero8): Deleted.
(JSC::FTL::Output::testIsZero8): Deleted.
(JSC::FTL::Output::testNonZero8): Deleted.

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

3 years agoRemove the option for animating using setInterval from the graphics benchmark
commit-queue@webkit.org [Tue, 17 Nov 2015 03:29:43 +0000 (03:29 +0000)]
Remove the option for animating using setInterval from the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151283

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-16
Reviewed by Darin Adler.

Get rid of the option to run animation using setInterval().

* Animometer/tests/resources/main.js:
(Animator.prototype.animate):
(Benchmark):
(Benchmark.prototype.start):
(Animator.prototype.start): Deleted.

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

3 years ago[MediaStream] VideoTrack should respond to MediaStreamTrack state changes
eric.carlson@apple.com [Tue, 17 Nov 2015 02:52:16 +0000 (02:52 +0000)]
[MediaStream] VideoTrack should respond to MediaStreamTrack state changes
https://bugs.webkit.org/show_bug.cgi?id=151299

Reviewed by Jer Noble.

Source/WebCore:

Test: fast/mediastream/MediaStream-video-element-track-stop.html

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::ended): Check m_ended.
(WebCore::MediaStreamTrack::stopProducingData): Set m_ended before telling private track to
  stop so we won't fire an 'ended' event.
(WebCore::MediaStreamTrack::trackEnded): Set m_ended, add comments from spec.
* Modules/mediastream/MediaStreamTrack.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Live streams have infinite duration,
  not indefinite.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Return NULL when displayMode
  is None.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Calculate current
  displayMode based on MediaStream state.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Renamed from
  setPausedImageVisible, use m_displayMode. Don't start/stop clock, it makes more sense
  to do that in play and pause.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Start clock.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Stop clock.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Call updateDisplayMode.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Always try to create
  both layers if necessary.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::renderingModeChanged): New, update displayMode
  and call back to the media element.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Get rid of some unused locals.
  React to a change in the enabled video track.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Paint black when
  the active video track is disabled.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPausedImageVisible): Deleted.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::updateActiveState): Split the logic of updating the active video
  track out into updateActiveVideoTrack.
(WebCore::MediaStreamPrivate::hasVideo): Check for track.ended.
(WebCore::MediaStreamPrivate::hasAudio): Ditto.
(WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Don't call the source directly.
(WebCore::MediaStreamPrivate::updateActiveVideoTrack): New.
(WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveVideoTrack.
(WebCore::MediaStreamPrivate::trackEnded): new.
* platform/mediastream/MediaStreamPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::setEnabled): Call observers if enabled state changes.
(WebCore::MediaStreamTrackPrivate::endTrack): Call observers.
(WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): New.
(WebCore::MediaStreamTrackPrivate::preventSourceFromStopping): Add comments.
* platform/mediastream/MediaStreamTrackPrivate.h:

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext): Remove a commented-out line.

LayoutTests:

* fast/mediastream/MediaStream-video-element-expected.txt:
* fast/mediastream/MediaStream-video-element-track-stop-expected.txt: Added.
* fast/mediastream/MediaStream-video-element-track-stop.html: Added.
* fast/mediastream/MediaStream-video-element.html:
* platform/gtk/TestExpectations: Skip new test.
* platform/ios-simulator/TestExpectations: Ditto.
* platform/mac-wk2/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

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

3 years agoFix CMake build and make PluginProcess executable
commit-queue@webkit.org [Tue, 17 Nov 2015 02:10:35 +0000 (02:10 +0000)]
Fix CMake build and make PluginProcess executable
https://bugs.webkit.org/show_bug.cgi?id=151332

Patch by Alex Christensen <achristensen@webkit.org> on 2015-11-16
Reviewed by Tim Horton.

.:

* Source/cmake/OptionsMac.cmake:

Source/WebKit2:

* PlatformMac.cmake:

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

3 years agoMulti-WKWebView find completes after the first view
timothy_horton@apple.com [Tue, 17 Nov 2015 01:21:06 +0000 (01:21 +0000)]
Multi-WKWebView find completes after the first view
https://bugs.webkit.org/show_bug.cgi?id=151325

Reviewed by Anders Carlsson.

* UIProcess/mac/WKTextFinderClient.mm:
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
Update progress before calling the completion handler; NSTextFinder assumes
that if the progress doesn't change, the search is complete.

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

3 years agoSource/WebCore:
bfulgham@apple.com [Tue, 17 Nov 2015 01:19:10 +0000 (01:19 +0000)]
Source/WebCore:
Fixes the buffer-overflow when reading characters from textRun
https://bugs.webkit.org/attachment.cgi?bugid=151055
<rdar://problem/23251789>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-16
Reviewed by Brent Fulgham.

* platform/graphics/FontCascade.cpp

LayoutTests:
Checks for buffer-overflows when reading characters from textRun
https://bugs.webkit.org/attachment.cgi?bugid=151055
<rdar://problem/23251789>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-16
Reviewed by Brent Fulgham.

* webgl/1.0.3/151055_asan-expected.txt
* webgl/1.0.3/151055_asan.html

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

3 years agoFix a typo in AirIteratedRegisterCoalescing
benjamin@webkit.org [Tue, 17 Nov 2015 00:53:05 +0000 (00:53 +0000)]
Fix a typo in AirIteratedRegisterCoalescing

I forgot to fix that review comment from Geoff.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-16

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build):

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

3 years ago[JSC] Add support for the extra registers that can be clobbered by Specials
benjamin@webkit.org [Tue, 17 Nov 2015 00:44:28 +0000 (00:44 +0000)]
[JSC] Add support for the extra registers that can be clobbered by Specials
https://bugs.webkit.org/show_bug.cgi?id=151246

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-16
Reviewed by Geoffrey Garen.

Specials can clobber arbitrary registers. This was not handled correctly by Air
and nothing was preventing us from re-allocating those registers.

This patch adds support for the extra clobbered registers in the two register allocators.

I also fixed the re-spilling FIXME of the iterated allocator because the test might
not always converge without it. Since we are at maximum register pressure at the patch point,
we could be always spilling the return value, which would loop forever.

To fix the re-spilling, I just kept a Set of every value spilled or filled so far. When selecting
a spill candidate, we never pick a Tmp from that set.

* b3/air/AirGenerate.cpp:
(JSC::B3::Air::generate):
* b3/air/AirHandleCalleeSaves.cpp:
(JSC::B3::Air::handleCalleeSaves):
* b3/air/AirInst.h:
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::forEachDefAndExtraClobberedTmp):
* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::IteratedRegisterCoalescingAllocator):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addEdges):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::selectSpill):
(JSC::B3::Air::addSpillAndFillToProgram):
(JSC::B3::Air::iteratedRegisterCoalescingOnType):
(JSC::B3::Air::iteratedRegisterCoalescing):
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/testb3.cpp:
(JSC::B3::testSimplePatchpointWithoutOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithoutOuputClobbersFPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersFPArgs):
(JSC::B3::run):
* jit/RegisterSet.h:

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

3 years agoWebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function...
ryuan.choi@navercorp.com [Tue, 17 Nov 2015 00:26:57 +0000 (00:26 +0000)]
WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function after it's been moved from
https://bugs.webkit.org/show_bug.cgi?id=151248

Reviewed by Darin Adler.

Like r188287, calling an empty std::function results in a std::bad_function_call
exception being thrown when sendSync is failed.

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

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

3 years agoBuild fix after r192492
benjamin@webkit.org [Tue, 17 Nov 2015 00:14:54 +0000 (00:14 +0000)]
Build fix after r192492

Last second change broke the build.

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::contains):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::takeMove):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::takeLastMove):

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

3 years agoHighlight the alarming test results in the graphics benchmark results page
commit-queue@webkit.org [Mon, 16 Nov 2015 23:52:46 +0000 (23:52 +0000)]
Highlight the alarming test results in the graphics benchmark results page
https://bugs.webkit.org/show_bug.cgi?id=151286

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-16
Reviewed by Simon Fraser.

When showing the results of a test in the graphics benchmark the following
criteria is going to be applied:

1. If the standard deviation of the test complexity or the frame rate is
   equal to or more than 10%, the standard deviation and the test name
   will be displayed in red.
2. If the average frame rate is not in the range = [(desired_frame_rate - 2)
   .. (desired_frame_rate + 2)], the average frame rate and the test name will
   be displayed in red.

* Animometer/resources/extensions.js:
(ResultsTable.prototype._showHeaderRow):
(ResultsTable.prototype._showHeader):
(ResultsTable.prototype._showEmptyCell):
(ResultsTable.prototype._showText):
(ResultsTable.prototype._showFixedNumber):
(ResultsTable.prototype.):
(ResultsTable.prototype._showGraph):
(ResultsTable.prototype._showJSON):
(ResultsTable.prototype._isAlarmingMeasurement):
(ResultsTable.prototype._isAlarmingTestResults):
(ResultsTable.prototype._showEmptyCells):
(ResultsTable.prototype._showEmptyRow):
(ResultsTable.prototype._showTest):
(ResultsTable.prototype._showSuite):
(ResultsTable.prototype._showIteration):
(ResultsTable.prototype.showRecord):
(ResultsTable.prototype.showIterations):
(ResultsTable.prototype._showEmpty): Deleted.
* Animometer/runner/resources/animometer.js:
(window.benchmarkRunnerClient.didFinishLastIteration):
* Animometer/tests/resources/stage.js:
(StageBenchmark.prototype.showResults):

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

3 years ago[JSC] Add trivial lowering for B3's Div with doubles
benjamin@webkit.org [Mon, 16 Nov 2015 23:49:22 +0000 (23:49 +0000)]
[JSC] Add trivial lowering for B3's Div with doubles
https://bugs.webkit.org/show_bug.cgi?id=151292

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-16
Reviewed by Geoffrey Garen.

Filip had already made the constant propagation for it.
The Air Opcode was all we had left.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testDivArgDouble):
(JSC::B3::testDivArgsDouble):
(JSC::B3::testDivArgImmDouble):
(JSC::B3::testDivImmArgDouble):
(JSC::B3::testDivImmsDouble):
(JSC::B3::run):

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

3 years ago[JSC] Speed up the coalescing-related operation of the iterated register allocator
benjamin@webkit.org [Mon, 16 Nov 2015 23:47:10 +0000 (23:47 +0000)]
[JSC] Speed up the coalescing-related operation of the iterated register allocator
https://bugs.webkit.org/show_bug.cgi?id=151290

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-16
Reviewed by Geoffrey Garen.

One step closer to removing the Hash structures:

For the coalescing operation, we need to keep track of Move instructions. We do not strictly
need those to be the Air Move, just any abstract operation that copy a Tmp into another Tmp.

In this patch, I exploit that to remove the Hash structure related to the Inst. Instead of
using the Move Inst, we just keep track of the Use() and Def() of the instructions.
Those are added in the global list m_coalescingCandidates and the index in that list represent
the move for the remaining of the algorithm.

With Moves transformed into dense indices, we can start using arrays to make fast sets.

The m_activeMoves Set is easy since we only need simple add/remove/contains. It is transformed
into a BitVector.
The bit vector is always fully allocated to allow for quick uniform access. The assumtion is that
activeMoves will contains a few values for non trivial cases.

The worklist m_worklistMoves is more complicated. I want it to be ordered to coalesce moves starting
at the top of blocks. Having a fast remove() operation is also useful for mass coalescing.
It also needs Set operations, especially a fast contains().

For m_worklistMoves, I created a new structure: OrderedMoveSet.
It contains a list of ordered values, and a map of each value to its position in the list.

This resembles Briggs' Sparse Set but it is not exactly the same. When removing a value,
I set a special marker in the map (UINT_MAX). The reason is that I want contains() to be fast
instead of remove(). The marker in the map allows contains() with a single memory operation instead of two.

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::allocate):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::forEachNodeMoves):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::isMoveRelated):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::enableMovesOnValue):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::coalesce):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::combine):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::freezeMoves):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::dumpWorkLists):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::addMove):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::isEmpty):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::contains):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::takeMove):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::takeLastMove):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::returnMove):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::OrderedMoveSet::clear):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::assignColors): Deleted.

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

3 years agoClean referencing the options object in the graphics benchmark
commit-queue@webkit.org [Mon, 16 Nov 2015 23:22:16 +0000 (23:22 +0000)]
Clean referencing the options object in the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151284

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-16
Reviewed by Simon Fraser.

Get rid of the Benchmark.options member and rely only on the private member
Benchmark._options. The animator need to have its own options member instead
of accessing it from its reference to Benchmark object.

* Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
(BouncingCanvasParticlesAnimator):
(BouncingCanvasParticlesBenchmark.prototype.createAnimator):
* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
(BouncingParticle.prototype.animate):
(BouncingParticlesAnimator):
(BouncingParticlesBenchmark.prototype.createAnimator):
* Animometer/tests/examples/resources/canvas-electrons.js:
(CanvasElectronsStage.prototype.animate):
(CanvasElectronsAnimator):
(CanvasElectronsBenchmark.prototype.createAnimator):
(window.benchmarkClient.create):
* Animometer/tests/examples/resources/canvas-stars.js:
(CanvasStarsStage.prototype.animate):
(CanvasStarsAnimator):
(CanvasStarsBenchmark.prototype.createAnimator):
(window.benchmarkClient.create):
* Animometer/tests/resources/main.js:
(BenchmarkState.prototype.currentProgress):
(Animator):
(Animator.prototype.animate):
(Benchmark):
(Benchmark.prototype.update):
* Animometer/tests/resources/stage.js:
(Stage.prototype.clear):
(StageAnimator):
(StageBenchmark.prototype.createAnimator):
(StageBenchmark.prototype.tune):
(StageBenchmark.prototype.showResults):
* Animometer/tests/simple/resources/simple-canvas.js:
(SimpleCanvasStage.prototype.animate):
(SimpleCanvasAnimator):
(SimpleCanvasAnimator.prototype.animate):
(SimpleCanvasBenchmark.prototype.createAnimator):
* Animometer/tests/template/resources/template-canvas.js:
(TemplateCanvasStage.prototype.animate):
(TemplateCanvasBenchmark.prototype.createAnimator):
(window.benchmarkClient.create):

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

3 years agoModern IDB:Make in-memory ObjectStore cursors work.
beidson@apple.com [Mon, 16 Nov 2015 23:17:46 +0000 (23:17 +0000)]
Modern IDB:Make in-memory ObjectStore cursors work.
https://bugs.webkit.org/show_bug.cgi?id=151196

Reviewed by Darin Adler.

Source/WebCore:

Tests: storage/indexeddb/modern/cursor-2.html
       storage/indexeddb/modern/cursor-3.html
       storage/indexeddb/modern/cursor-4.html
       storage/indexeddb/modern/cursor-5.html
       storage/indexeddb/modern/cursor-6.html
       storage/indexeddb/modern/cursor-7.html
       storage/indexeddb/modern/cursor-8.html
       storage/indexeddb/modern/objectstore-cursor-advance-failures.html
       storage/indexeddb/modern/objectstore-cursor-continue-failures.html

Object store cursors directly hold on to a std::set<>::iterator to act as the cursor.

The object store tells all of its cursors when it is cleared or records are deleted
so the cursors can invalidate their iterators as needed.

In case of such invalidation, the cursor hangs on to the current key value so it can
pick up where it left off in case it is iterated.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::isolatedCopy):

* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::containsKey):
(WebCore::IDBKeyRangeData::loggingString):
* Modules/indexeddb/IDBKeyRangeData.h:

* Modules/indexeddb/client/IDBAnyImpl.cpp:
(WebCore::IDBClient::IDBAny::modernIDBCursor):

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::setGetResult):
* Modules/indexeddb/client/IDBCursorImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent):
(WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor):
* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::pendingCursor):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::addRequest): Deleted.

* Modules/indexeddb/client/TransactionOperation.cpp:
(WebCore::IDBClient::TransactionOperation::TransactionOperation):
* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::cursorIdentifier):

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryCursor.cpp: Added.
(WebCore::IDBServer::cursorMap):
(WebCore::IDBServer::MemoryCursor::MemoryCursor):
(WebCore::IDBServer::MemoryCursor::~MemoryCursor):
(WebCore::IDBServer::MemoryCursor::cursorForIdentifier):
* Modules/indexeddb/server/MemoryCursor.h: Added.

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::clear):
(WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
(WebCore::IDBServer::MemoryObjectStore::deleteRecord):
(WebCore::IDBServer::MemoryObjectStore::addRecord):
(WebCore::IDBServer::MemoryObjectStore::updateCursorsForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::updateCursorsForDeleteRecord):
(WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor):
* Modules/indexeddb/server/MemoryObjectStore.h:
(WebCore::IDBServer::MemoryObjectStore::orderedKeys):

* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp: Added.
(WebCore::IDBServer::MemoryObjectStoreCursor::create):
(WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
(WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
(WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
(WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
(WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::firstForwardIteratorInRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::firstReverseIteratorInRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::hasValidPosition):
(WebCore::IDBServer::MemoryObjectStoreCursor::iterate):
* Modules/indexeddb/server/MemoryObjectStoreCursor.h: Added.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/shared/IDBCursorInfo.h:
(WebCore::IDBCursorInfo::range):

* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
(WebCore::IDBRequestData::cursorIdentifier):
* Modules/indexeddb/shared/IDBRequestData.h:

LayoutTests:

* storage/indexeddb/modern/cursor-1-expected.txt:
* storage/indexeddb/modern/cursor-2-expected.txt: Added.
* storage/indexeddb/modern/cursor-2.html: Added.
* storage/indexeddb/modern/cursor-3-expected.txt: Added.
* storage/indexeddb/modern/cursor-3.html: Added.
* storage/indexeddb/modern/cursor-4-expected.txt: Added.
* storage/indexeddb/modern/cursor-4.html: Added.
* storage/indexeddb/modern/cursor-5-expected.txt: Added.
* storage/indexeddb/modern/cursor-5.html: Added.
* storage/indexeddb/modern/cursor-6-expected.txt: Added.
* storage/indexeddb/modern/cursor-6.html: Added.
* storage/indexeddb/modern/cursor-7-expected.txt: Added.
* storage/indexeddb/modern/cursor-7.html: Added.
* storage/indexeddb/modern/cursor-8-expected.txt: Added.
* storage/indexeddb/modern/cursor-8.html: Added.
* storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt: Added.
* storage/indexeddb/modern/objectstore-cursor-advance-failures.html: Added.
* storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt: Added.
* storage/indexeddb/modern/objectstore-cursor-continue-failures.html: Added.

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

3 years agoRemoved Yosemite modifier for flaky test http/tests/media/video-preload.html
ryanhaddad@apple.com [Mon, 16 Nov 2015 23:13:39 +0000 (23:13 +0000)]
Removed Yosemite modifier for flaky test http/tests/media/video-preload.html
https://bugs.webkit.org/show_bug.cgi?id=141084

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMarking webarchive/loading/missing-data.html as flaky due to intermittent crashes.
ryanhaddad@apple.com [Mon, 16 Nov 2015 22:46:25 +0000 (22:46 +0000)]
Marking webarchive/loading/missing-data.html as flaky due to intermittent crashes.
https://bugs.webkit.org/show_bug.cgi?id=151326

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoAdd SPI for handling inline link navigation for peek/pop
bdakin@apple.com [Mon, 16 Nov 2015 22:38:20 +0000 (22:38 +0000)]
Add SPI for handling inline link navigation for peek/pop
https://bugs.webkit.org/show_bug.cgi?id=151270
-and corresponding-
rdar://problem/22233739

Reviewed by Darin Adler.

This patch adds three new SPI methods. If a client wants to disable previews
entirely for the given element, they should return NO in
shouldPreviewElement:. Returning NO in shouldPreviewElement will prevent the
other methods from being invoked. The client can provide a custom preview by
returning their own UIViewController from
previewingViewControllerForElement:defaultActions:. Returning nil will result
in the default preview behavior for that element. This will allow clients to
implement this method to handle http link navigation inline, but still opt
into UIKit’s built-in DataDetectors behaviors for DD links once we start
supporting DD links in WK2.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Added linkURL to _WKElementInfo. linkURL will be nil for elements that are
not links.
* UIProcess/API/Cocoa/_WKElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.mm:
(-[_WKElementInfo copyWithZone:]):
(-[_WKElementInfo linkURL]):
* UIProcess/API/Cocoa/_WKElementInfoInternal.h: Added.

_WKPreviewingElementInfo inherits from _WKElementInfo. Added a constructor.
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKPreviewElementInfo.mm: Added.
(-[_WKPreviewElementInfo _initWithLinkURL:]):
* UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h: Added.

Invoke shouldPreviewElement:.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):

Invoke previewingViewControllerForElement: for all potentially preview-able
elements that have a default implementations, which will be limited to links
at this time.
(-[WKContentView _presentedViewControllerForPreviewItemController:]):

Invoke commitPreviewingViewController:
(-[WKContentView _previewItemController:commitPreview:]):
* WebKit2.xcodeproj/project.pbxproj:

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

3 years agoDFGEdge's dump method should print "Untyped:" for untyped uses.
sbarati@apple.com [Mon, 16 Nov 2015 22:10:56 +0000 (22:10 +0000)]
DFGEdge's dump method should print "Untyped:" for untyped uses.
https://bugs.webkit.org/show_bug.cgi?id=151314

Rubber stamped by Filip Pizlo.

* dfg/DFGEdge.cpp:
(JSC::DFG::Edge::dump):

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

3 years agoEnable passing tests in LayoutTests/fast/mediastream
wenson_hsieh@apple.com [Mon, 16 Nov 2015 22:04:32 +0000 (22:04 +0000)]
Enable passing tests in LayoutTests/fast/mediastream
https://bugs.webkit.org/show_bug.cgi?id=151311

Reviewed by Eric Carlson.

Mark LayoutTests/fast/mediastream as passing by default, and skip only the tests that currently
fail. Also unprefixes some tests that fail due to invoking the webkitMediaStream constructor
rather than MediaStream. As we implement more functionality in the Media Stream and Capture
spec, we will remove entries from the fast/mediastream section under Mac TestExpectations.

* fast/events/constructors/media-stream-event-constructor.html:
* fast/mediastream/MediaStream-add-ended-tracks.html:
* fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html:
* fast/mediastream/MediaStream-construct-with-ended-tracks.html:
* fast/mediastream/MediaStreamConstructor-expected.txt:
* fast/mediastream/MediaStreamConstructor.html:
* fast/mediastream/MediaStreamTrack-onended.html:
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

3 years agoAdd identifier strings for a bunch of context menu items
andersca@apple.com [Mon, 16 Nov 2015 20:46:19 +0000 (20:46 +0000)]
Add identifier strings for a bunch of context menu items
https://bugs.webkit.org/show_bug.cgi?id=151272

Reviewed by Dan Bernstein.

Source/WebCore:

Have NSMenuItem conform to NSUserInterfaceItemIdentification.

* platform/spi/mac/NSMenuSPI.h:

Source/WebKit2:

* UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
* UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):
* WebKit2.xcodeproj/project.pbxproj:

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

3 years agoMake sure that the address matcher correctly handles Shl(x, 1)
fpizlo@apple.com [Mon, 16 Nov 2015 19:29:34 +0000 (19:29 +0000)]
Make sure that the address matcher correctly handles Shl(x, 1)
https://bugs.webkit.org/show_bug.cgi?id=151316

Reviewed by Geoffrey Garen.

This optimization isn't really that awesome, but the nicest part of the change is just the
testing. If we ever do more cleverness with shifts, these tests will come in handy.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::effectiveAddr):
* b3/testb3.cpp:
(JSC::B3::testLoadOffsetUsingAddNotConstant):
(JSC::B3::testLoadAddrShift):
(JSC::B3::testFramePointer):
(JSC::B3::run):

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

3 years agoNull-pointer dereference in WebCore::firstEditablePositionAfterPositionInRoot
jiewen_tan@apple.com [Mon, 16 Nov 2015 19:04:02 +0000 (19:04 +0000)]
Null-pointer dereference in WebCore::firstEditablePositionAfterPositionInRoot
https://bugs.webkit.org/show_bug.cgi?id=151288
<rdar://problem/23450367>

Reviewed by Darin Adler.

Source/WebCore:

Some problematic organization of body element could cause problems to JustifyRight
and Indent commnads.

Tests: editing/execCommand/justify-right-then-indent-with-problematic-body.html
       editing/execCommand/justify-right-with-problematic-body.html

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
Assertion at l1017 is not held anymore with the testcase:
editing/execCommand/justify-right-with-problematic-body.html.
Therefore, change it to an if statement.
Also, add a guardance before calling insertNewDefaultParagraphElementAt()
as insertNodeAt() requires an editable position.
(WebCore::CompositeEditCommand::moveParagraphWithClones):
Add a guardance before calling insertNodeAt() as it requires an editable position.
* editing/htmlediting.cpp:
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):

LayoutTests:

* editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt: Added.
* editing/execCommand/justify-right-then-indent-with-problematic-body.html: Added.
* editing/execCommand/justify-right-with-problematic-body-expected.txt: Added.
* editing/execCommand/justify-right-with-problematic-body.html: Added.

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

3 years agoSort the Xcode project files.
simon.fraser@apple.com [Mon, 16 Nov 2015 18:50:45 +0000 (18:50 +0000)]
Sort the Xcode project files.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:

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

3 years agoUnreviewed. Fix GTK+ unit tests after r192469.
carlosgc@webkit.org [Mon, 16 Nov 2015 17:31:38 +0000 (17:31 +0000)]
Unreviewed. Fix GTK+ unit tests after r192469.

In r192469 jhbuild version was updated and coinfig lcas API changed.

* jhbuild/jhbuildutils.py:
(enter_jhbuild_environment_if_available): Pass an empty list for
conditions to the Config constructor.

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

3 years agoRebaselining LayoutTest js/dom/global-constructors-attributes on Mac
ryanhaddad@apple.com [Mon, 16 Nov 2015 16:56:26 +0000 (16:56 +0000)]
Rebaselining LayoutTest js/dom/global-constructors-attributes on Mac
https://bugs.webkit.org/show_bug.cgi?id=150166

Unreviewed test gardening.

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

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

3 years agoUnreviewed. Use commit id instead of tag name for jhbuild revision.
carlosgc@webkit.org [Mon, 16 Nov 2015 16:18:43 +0000 (16:18 +0000)]
Unreviewed. Use commit id instead of tag name for jhbuild revision.

In r192469 I updated the jhbuild version to 3.12.0, and used the
tag instead of the commit id to make it easier to read and
remember. But we use the commit id to check if the current
revision is up to date, and when compared to the tag id it always
fails and jhbuild is always updated.

* jhbuild/jhbuild-wrapper: Use commit id and add a comment to
remember this is the id of 3.12.0.

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

3 years agoUnreviewed. Fix GTK+ layout tests running after r192469.
carlosgc@webkit.org [Mon, 16 Nov 2015 16:13:51 +0000 (16:13 +0000)]
Unreviewed. Fix GTK+ layout tests running after r192469.

We fail to find the Gallium llvmpipe driver because of the build
directory change in r192469.

* gtk/jhbuildrc: Use buildroot instead of checkoutdir to build
the LLVMPIPE_LIBGL_PATH.

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

3 years agoWebRTC: Expose RTCPeerConnectionInternals functions to JS builtins.
commit-queue@webkit.org [Mon, 16 Nov 2015 14:15:12 +0000 (14:15 +0000)]
WebRTC: Expose RTCPeerConnectionInternals functions to JS builtins.
https://bugs.webkit.org/show_bug.cgi?id=151302

Patch by Sebastian Dröge <sebastian@centricular.com> on 2015-11-16
Reviewed by Youenn Fablet.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
Expose RTCPeerConnectionInternals functions to JS builtins.

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

3 years ago[GTK] Use FTL by default when LLVM 3.7 is available
carlosgc@webkit.org [Mon, 16 Nov 2015 13:02:00 +0000 (13:02 +0000)]
[GTK] Use FTL by default when LLVM 3.7 is available
https://bugs.webkit.org/show_bug.cgi?id=142128

Reviewed by Csaba Osztrogonác.

.:

Enable FTL by default when architecture is X86_64. It requires
LLVM 3.7, but can be disabled manually as a cmake configure
argument.

* Source/cmake/FindLLVM.cmake: In debian llvm-config is only
available if the metapackage is installed and it points to
llvm-config-3.5. So, here we check first if the llvm-config is
from a recent enough version, and if not we check several
llvm-config-<version> programs, so this should work on any distro.
* Source/cmake/OptionsGTK.cmake: Enable FTL by default when
target architecture is X86_64, and check the LLVM is at least
3.7. The option is now public, since we want people to be able to
disable it manually.

Source/JavaScriptCore:

* PlatformGTK.cmake: Install libllvmForJSC.so.
* llvm/InitializeLLVMLinux.cpp:
(JSC::getLLVMInitializerFunction): For developer build try to load first
libllvmForJSC.so from standard paths since not installed binaries
have the RPATH set. If it fails try the installed one. For
production buils load always the installed one.

Tools:

* Scripts/run-javascriptcore-tests: Enable FTL for GTK+ port when
architecture is x86_64.
* Scripts/update-webkit-libs-jhbuild:
(cleanJhbuild): Remove also the separate Build directory used by
GTK+ port now.
* Scripts/webkitdirs.pm:
(isX86_64):
* Scripts/webkitperl/FeatureList.pm: Enable FTL by default for
GTK+ port when architecture is x86_64.
* gtk/jhbuild-optional.modules: Remove llvm.
* gtk/jhbuild.modules: Add llvm 3.7 and include it as dependecy
only when architecture is x86_64.
* gtk/jhbuildrc: Set a buildroot to use a separate build
directory. LLVM 3.7 fails to build if configure script is run from
source dir. Since it's not possible to use a separate build dir
only for llvm, we do it now globally. Modules not supporting non
source build dirs are marked in the moduleset. Also set x86_64
condition when the architecture is x86_64.
* gtk/patches/llvm-elf-add-stackmaps-arm64.patch: Removed.
* gtk/patches/llvm-elf-add-stackmaps.patch: Removed.
* gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range-arm64.patch: Removed.
* gtk/patches/llvm-elf-allow-fde-references-outside-the-2gb-range.patch: Removed.
* jhbuild/jhbuild-wrapper: Use a newer jhbuild version to be able
to use conditions.

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

3 years agoFinalization of https://bugs.webkit.org/show_bug.cgi?id=151190, removing empty files
youenn.fablet@crf.canon.fr [Mon, 16 Nov 2015 11:00:53 +0000 (11:00 +0000)]
Finalization of https://bugs.webkit.org/show_bug.cgi?id=151190, removing empty files

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

3 years agoClean imported/w3c/web-platform-tests folder
youenn.fablet@crf.canon.fr [Mon, 16 Nov 2015 10:37:43 +0000 (10:37 +0000)]
Clean imported/w3c/web-platform-tests folder
https://bugs.webkit.org/show_bug.cgi?id=151190

Reviewed by Chris Dumez.

Adding missing files.
Removing resource files that are not needed anymore.
Removing some dangling expected.txt files.

* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/empty.html.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/empty.svg.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/empty.xhtml.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/empty.xml.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_mathml.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_mathml.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_mathml.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_mathml.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_svg.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_svg.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_svg.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_svg.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_xhtml.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_xhtml.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_xhtml.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/bare_xhtml.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/generate.py: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/mathml.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/mathml.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/mathml.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/mathml.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/minimal_html.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/minimal_html.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/minimal_html.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/minimal_html.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/svg.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/svg.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/svg.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/svg.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_changed.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_changed.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_changed.xml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_removed.html: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_removed.svg: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml: Removed.
* web-platform-tests/dom/nodes/resources/Document-createElement-namespace-tests/xhtml_ns_removed.xml: Removed.
* web-platform-tests/dom/nodes/resources/Node-parentNode-iframe.html: Removed.
* web-platform-tests/dom/nodes/resources/ParentNode-querySelector-All-content.html: Removed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01-expected.txt: Removed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script-expected.txt: Removed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01-expected.txt: Removed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_02-expected.txt: Removed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_03-expected.txt: Removed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04-expected.txt: Removed.
* web-platform-tests/w3c-import.log:

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

3 years ago[Streams API] Update the implementation up to spec of Nov 11 2015
calvaris@igalia.com [Mon, 16 Nov 2015 10:21:37 +0000 (10:21 +0000)]
[Streams API] Update the implementation up to spec of Nov 11 2015
https://bugs.webkit.org/show_bug.cgi?id=151195

Reviewed by Youenn Fablet.

Source/WebCore:

Updated the implementation of Readable and Writable Streams to the latest changes in the spec. Main changes are
the removal of the error and the state from the reader, readers are not automatically released and then minor or
style changes.

Implementation is up to date with version
https://github.com/whatwg/streams/commit/48c8a3c30ea7e76c5e4eb9f157a438dd755bcc8e.

Tests: streams/reference-implementation/readable-stream-templated.html
       streams/reference-implementation/readable-stream-reader.html

* Modules/streams/ReadableStream.js:
(getReader): Removed check for locked stream.
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader): Removed setting @error and @state and initialized owner and owner's
reader as per spec.
(teeReadableStreamPullFunction): Added assertions.
(isReadableStreamReader): Added comment about resetting the reader owner to null instead of undefined as a means
to distinguish between not having the slot and having it unset.
(finishClosingReadableStream): Inline @closeReadableStreamReader as it is used only here now.
(readFromReadableStreamReader): Reworked the state and error to use the stream one and changed the conditions to
pull again as per spec.
(errorReadableStream): Not releasing the reader and removed the reader error and state management.
(releaseReadableStreamReader): Deleted.
(closeReadableStreamReader): Deleted.
* Modules/streams/ReadableStreamReader.js:
(cancel): Removed some checks and assertions as per spec.
(read): Added check for owner.
(releaseLock): No closing the reader and rejecting close promise and unlinking reader and owner instead.
* Modules/streams/WritableStream.js:
(abort): Style change.
* Modules/streams/WritableStreamInternals.js:
(writableStreamAdvanceQueue):
(closeWritableStream): Used @call instead of @apply.

LayoutTests:

Updated expectations.

* streams/reference-implementation/readable-stream-reader-expected.txt:
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/readable-stream-templated.html:

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

3 years ago64-bit in the DFG: non tail Calls unnecessarily store the argument count twice on...
sbarati@apple.com [Mon, 16 Nov 2015 07:42:36 +0000 (07:42 +0000)]
64-bit in the DFG: non tail Calls unnecessarily store the argument count twice on the callee frame and tails calls unnecessarily store it once
https://bugs.webkit.org/show_bug.cgi?id=151297

Reviewed by Geoffrey Garen.

Non tail calls only need to store the count once. Tail calls
never need to store the count on the callee frame because they
will be reusing the caller's frame.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):

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

3 years agoWebRTC: Update RTCPeerConnection API and introduce PeerConnectionBackend
adam.bergkvist@ericsson.com [Sun, 15 Nov 2015 22:00:32 +0000 (22:00 +0000)]
WebRTC: Update RTCPeerConnection API and introduce PeerConnectionBackend
https://bugs.webkit.org/show_bug.cgi?id=150166

Reviewed by Eric Carlson and Youenn Fablet

Source/JavaScriptCore:

Added generic isDictionary() function to GlobalObject.js that tests if a
value can be interpreted as a dictionary.

* builtins/GlobalObject.js:
(isDictionary):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

Source/WebCore:

This change introduces PeerConnectionBackend which is a WebCore interface
that allows RTCPeerConnection to have platform abstractions at different
levels. For example, the MediaEndpoint interface [1] is a lower level
WebRTC backend abstraction where a big part of the WebRTC specification
is implemented in WebCore to be reusable. RTCPeerConnectionHandler (in
the repo today) is on the other hand a higher level WebRTC backend
abstraction where the calls are mostly forwarded directly to the
backend. The PeerConnectionBackend interface facilitates both approaches.

RTCPeerConnection
 | (has)
 |
PeerConnectionBackend
 |   |
 |   | (realizes)
 |  MediaEndpointPeerConnection
 |   | (has)
 |   |
 |  MediaEndpoint (platform interface)
 |
 | (realizes)
RTCPeerHandlerPeerConnection
 | (has)
 |
RCPeerConnectionHandler (existing platform interface)

Notable changes:

# Overloaded methods on RTCPeerConnection (Promise + legacy callback
signatures) are implemented with JSBuiltins.

# "Queued operations" ([1] Section 4.3.1) is implemented in JS bindings
with Promises.

# New RTCPeerConnection features
 - add/removeTrack()
 - pending/currentLocal/RemoteDescription attributes
 - RTCRtpSender/Receiver

# Information carrying objects like RTCSessionDescription and
RTCCandidate don't encapsulate a "mirrored" platform object anymore.

# Remove RTCPeerConnection specific callback implementations (not used
with JS bindings)

[1] http://webkit.org/b/150165
[2] https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html

Tests: Mock should be added to test future WebRTC backend abstractions.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/PeerConnectionBackend.cpp: Added.
(WebCore::createPeerConnectionBackend):
* Modules/mediastream/PeerConnectionBackend.h: Added.
(WebCore::PeerConnectionBackendClient::~PeerConnectionBackendClient):
(WebCore::PeerConnectionBackend::~PeerConnectionBackend):
* Modules/mediastream/PeerConnectionStates.h: Added.
* Modules/mediastream/RTCConfiguration.cpp: Added.
(WebCore::validateIceServerURL):
(WebCore::parseIceServer):
(WebCore::RTCConfiguration::create):
(WebCore::RTCConfiguration::RTCConfiguration):
(WebCore::RTCConfiguration::initialize):
* Modules/mediastream/RTCConfiguration.h:
(WebCore::RTCConfiguration::iceTransportPolicy):
(WebCore::RTCConfiguration::bundlePolicy):
(WebCore::RTCConfiguration::iceServers):
(WebCore::RTCConfiguration::create): Deleted.
(WebCore::RTCConfiguration::appendServer): Deleted.
(WebCore::RTCConfiguration::numberOfServers): Deleted.
(WebCore::RTCConfiguration::server): Deleted.
(WebCore::RTCConfiguration::iceTransports): Deleted.
(WebCore::RTCConfiguration::setIceTransports): Deleted.
(WebCore::RTCConfiguration::requestIdentity): Deleted.
(WebCore::RTCConfiguration::setRequestIdentity): Deleted.
(WebCore::RTCConfiguration::privateConfiguration): Deleted.
(WebCore::RTCConfiguration::RTCConfiguration): Deleted.
* Modules/mediastream/RTCConfiguration.idl:
* Modules/mediastream/RTCIceCandidate.cpp:
(WebCore::RTCIceCandidate::create):
(WebCore::RTCIceCandidate::RTCIceCandidate):
(WebCore::RTCIceCandidate::~RTCIceCandidate): Deleted.
(WebCore::RTCIceCandidate::candidate): Deleted.
(WebCore::RTCIceCandidate::sdpMid): Deleted.
(WebCore::RTCIceCandidate::sdpMLineIndex): Deleted.
(WebCore::RTCIceCandidate::descriptor): Deleted.
* Modules/mediastream/RTCIceCandidate.h:
(WebCore::RTCIceCandidate::~RTCIceCandidate):
(WebCore::RTCIceCandidate::candidate):
(WebCore::RTCIceCandidate::setCandidate):
(WebCore::RTCIceCandidate::sdpMid):
(WebCore::RTCIceCandidate::setSdpMid):
(WebCore::RTCIceCandidate::sdpMLineIndex):
(WebCore::RTCIceCandidate::setSdpMLineIndex):
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCIceCandidateEvent.cpp:
(WebCore::RTCIceCandidateEvent::create):
(WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
* Modules/mediastream/RTCIceCandidateEvent.h:
* Modules/mediastream/RTCIceServer.h:
(WebCore::RTCIceServer::urls):
(WebCore::RTCIceServer::credential):
(WebCore::RTCIceServer::username):
(WebCore::RTCIceServer::RTCIceServer):
(WebCore::RTCIceServer::create): Deleted.
(WebCore::RTCIceServer::privateServer): Deleted.
* Modules/mediastream/RTCOfferAnswerOptions.cpp:
(WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
(WebCore::RTCOfferAnswerOptions::initialize):
(WebCore::RTCOfferOptions::RTCOfferOptions):
(WebCore::RTCOfferOptions::initialize):
(WebCore::RTCAnswerOptions::create):
(WebCore::RTCAnswerOptions::initialize):
(WebCore::RTCOfferAnswerOptions::create): Deleted.
* Modules/mediastream/RTCOfferAnswerOptions.h:
(WebCore::RTCOfferAnswerOptions::voiceActivityDetection):
(WebCore::RTCOfferOptions::offerToReceiveVideo):
(WebCore::RTCOfferOptions::offerToReceiveAudio):
(WebCore::RTCOfferOptions::iceRestart):
(WebCore::RTCAnswerOptions::RTCAnswerOptions):
(WebCore::RTCOfferAnswerOptions::requestIdentity): Deleted.
(WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions): Deleted.
(WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions): Deleted.
(WebCore::RTCOfferOptions::voiceActivityDetection): Deleted.
(WebCore::RTCOfferOptions::privateOfferOptions): Deleted.
(WebCore::RTCOfferOptions::~RTCOfferOptions): Deleted.
(WebCore::RTCOfferOptions::RTCOfferOptions): Deleted.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::getSenders):
(WebCore::RTCPeerConnection::getReceivers):
(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::queuedCreateOffer):
(WebCore::RTCPeerConnection::queuedCreateAnswer):
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::localDescription):
(WebCore::RTCPeerConnection::currentLocalDescription):
(WebCore::RTCPeerConnection::pendingLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::remoteDescription):
(WebCore::RTCPeerConnection::currentRemoteDescription):
(WebCore::RTCPeerConnection::pendingRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
(WebCore::RTCPeerConnection::signalingState):
(WebCore::RTCPeerConnection::iceGatheringState):
(WebCore::RTCPeerConnection::iceConnectionState):
(WebCore::RTCPeerConnection::setConfiguration):
(WebCore::RTCPeerConnection::privateGetStats):
(WebCore::RTCPeerConnection::createDataChannel):
(WebCore::RTCPeerConnection::close):
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::setSignalingState):
(WebCore::RTCPeerConnection::updateIceGatheringState):
(WebCore::RTCPeerConnection::updateIceConnectionState):
(WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
(WebCore::RTCPeerConnection::fireEvent):
(WebCore::validateIceServerURL): Deleted.
(WebCore::processIceServer): Deleted.
(WebCore::RTCPeerConnection::parseConfiguration): Deleted.
(WebCore::RTCPeerConnection::~RTCPeerConnection): Deleted.
(WebCore::RTCPeerConnection::createOffer): Deleted.
(WebCore::RTCPeerConnection::createAnswer): Deleted.
(WebCore::RTCPeerConnection::checkStateForLocalDescription): Deleted.
(WebCore::RTCPeerConnection::checkStateForRemoteDescription): Deleted.
(WebCore::RTCPeerConnection::setLocalDescription): Deleted.
(WebCore::RTCPeerConnection::setRemoteDescription): Deleted.
(WebCore::RTCPeerConnection::updateIce): Deleted.
(WebCore::RTCPeerConnection::addIceCandidate): Deleted.
(WebCore::RTCPeerConnection::addStream): Deleted.
(WebCore::RTCPeerConnection::removeStream): Deleted.
(WebCore::RTCPeerConnection::getLocalStreams): Deleted.
(WebCore::RTCPeerConnection::getRemoteStreams): Deleted.
(WebCore::RTCPeerConnection::getStreamById): Deleted.
(WebCore::RTCPeerConnection::getStats): Deleted.
(WebCore::RTCPeerConnection::hasLocalStreamWithTrackId): Deleted.
(WebCore::RTCPeerConnection::createDTMFSender): Deleted.
(WebCore::RTCPeerConnection::negotiationNeeded): Deleted.
(WebCore::RTCPeerConnection::didGenerateIceCandidate): Deleted.
(WebCore::RTCPeerConnection::didChangeSignalingState): Deleted.
(WebCore::RTCPeerConnection::didChangeIceGatheringState): Deleted.
(WebCore::RTCPeerConnection::didChangeIceConnectionState): Deleted.
(WebCore::RTCPeerConnection::didAddRemoteStream): Deleted.
(WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
(WebCore::RTCPeerConnection::didAddRemoteDataChannel): Deleted.
(WebCore::RTCPeerConnection::didAddOrRemoveTrack): Deleted.
(WebCore::RTCPeerConnection::changeSignalingState): Deleted.
(WebCore::RTCPeerConnection::changeIceGatheringState): Deleted.
(WebCore::RTCPeerConnection::changeIceConnectionState): Deleted.
(WebCore::RTCPeerConnection::scheduleDispatchEvent): Deleted.
(WebCore::RTCPeerConnection::scheduledEventTimerFired): Deleted.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCPeerConnection.js: Added.
(createOffer):
(createAnswer):
(setLocalDescription):
(setRemoteDescription):
(addIceCandidate):
(getStats):
* Modules/mediastream/RTCPeerConnectionErrorCallback.h:
(WebCore::RTCPeerConnectionErrorCallback::~RTCPeerConnectionErrorCallback): Deleted.
* Modules/mediastream/RTCPeerConnectionInternals.js: Added.
(runNext):
(enqueueOperation):
(setLocalOrRemoteDescription):
(extractCallbackArg):
* Modules/mediastream/RTCRtpReceiver.cpp: Added.
(WebCore::RTCRtpReceiver::RTCRtpReceiver):
* Modules/mediastream/RTCRtpReceiver.h: Added.
(WebCore::RTCRtpReceiver::create):
* Modules/mediastream/RTCRtpReceiver.idl: Added.
* Modules/mediastream/RTCRtpSender.cpp: Added.
(WebCore::RTCRtpSender::RTCRtpSender):
* Modules/mediastream/RTCRtpSender.h: Added.
(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::mediaStreamId):
* Modules/mediastream/RTCRtpSender.idl: Added.
* Modules/mediastream/RTCRtpSenderReceiverBase.h: Added.
(WebCore::RTCRtpSenderReceiverBase::~RTCRtpSenderReceiverBase):
(WebCore::RTCRtpSenderReceiverBase::track):
(WebCore::RTCRtpSenderReceiverBase::RTCRtpSenderReceiverBase):
* Modules/mediastream/RTCSessionDescription.cpp:
(WebCore::RTCSessionDescription::create):
(WebCore::RTCSessionDescription::RTCSessionDescription):
(WebCore::RTCSessionDescription::setType):
(WebCore::RTCSessionDescription::~RTCSessionDescription): Deleted.
(WebCore::RTCSessionDescription::type): Deleted.
(WebCore::RTCSessionDescription::sdp): Deleted.
(WebCore::RTCSessionDescription::setSdp): Deleted.
(WebCore::RTCSessionDescription::descriptor): Deleted.
* Modules/mediastream/RTCSessionDescription.h:
(WebCore::RTCSessionDescription::~RTCSessionDescription):
(WebCore::RTCSessionDescription::type):
(WebCore::RTCSessionDescription::sdp):
(WebCore::RTCSessionDescription::setSdp):
* Modules/mediastream/RTCSessionDescriptionCallback.h:
(WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback): Deleted.
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Removed.
(WebCore::RTCSessionDescriptionRequestImpl::create): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::requestFailed): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::stop): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::activeDOMObjectName): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::canSuspendForPageCache): Deleted.
(WebCore::RTCSessionDescriptionRequestImpl::clear): Deleted.
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Removed.
* Modules/mediastream/RTCStatsCallback.h: Removed.
(WebCore::RTCStatsCallback::~RTCStatsCallback): Deleted.
* Modules/mediastream/RTCStatsCallback.idl: Removed.
* Modules/mediastream/RTCStatsRequestImpl.cpp: Removed.
(WebCore::RTCStatsRequestImpl::create): Deleted.
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Deleted.
(WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl): Deleted.
(WebCore::RTCStatsRequestImpl::createResponse): Deleted.
(WebCore::RTCStatsRequestImpl::hasSelector): Deleted.
(WebCore::RTCStatsRequestImpl::track): Deleted.
(WebCore::RTCStatsRequestImpl::requestSucceeded): Deleted.
(WebCore::RTCStatsRequestImpl::requestFailed): Deleted.
(WebCore::RTCStatsRequestImpl::stop): Deleted.
(WebCore::RTCStatsRequestImpl::activeDOMObjectName): Deleted.
(WebCore::RTCStatsRequestImpl::canSuspendForPageCache): Deleted.
(WebCore::RTCStatsRequestImpl::clear): Deleted.
* Modules/mediastream/RTCStatsRequestImpl.h: Removed.
* Modules/mediastream/RTCTrackEvent.cpp: Added.
(WebCore::RTCTrackEventInit::RTCTrackEventInit):
(WebCore::RTCTrackEvent::create):
(WebCore::RTCTrackEvent::RTCTrackEvent):
* Modules/mediastream/RTCTrackEvent.h: Added.
(WebCore::RTCTrackEvent::receiver):
(WebCore::RTCTrackEvent::track):
(WebCore::RTCTrackEvent::eventInterface):
* Modules/mediastream/RTCTrackEvent.idl: Added.
* Modules/mediastream/RTCVoidRequestImpl.cpp: Removed.
(WebCore::RTCVoidRequestImpl::create): Deleted.
(WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl): Deleted.
(WebCore::RTCVoidRequestImpl::~RTCVoidRequestImpl): Deleted.
(WebCore::RTCVoidRequestImpl::requestSucceeded): Deleted.
(WebCore::RTCVoidRequestImpl::requestFailed): Deleted.
(WebCore::RTCVoidRequestImpl::stop): Deleted.
(WebCore::RTCVoidRequestImpl::activeDOMObjectName): Deleted.
(WebCore::RTCVoidRequestImpl::canSuspendForPageCache): Deleted.
(WebCore::RTCVoidRequestImpl::clear): Deleted.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
* bindings/js/WebCoreBuiltinNames.h:
* bindings/js/WebCoreJSBuiltinInternals.h:
(WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
(WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals):
(WebCore::JSBuiltinInternalFunctions::visit):
(WebCore::JSBuiltinInternalFunctions::init):
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
(WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins):
(WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins):
* dom/EventNames.in:

LayoutTests:

Updated expected results (listed below) with the new types added by
this change (RTCRtpSender, RTCRtpReceiver and RTCTrackEvent).

* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:

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

3 years agoUnreviewed, rolling out r192462.
commit-queue@webkit.org [Sun, 15 Nov 2015 18:52:23 +0000 (18:52 +0000)]
Unreviewed, rolling out r192462.
https://bugs.webkit.org/show_bug.cgi?id=151295

failing python tests (Requested by youenn on #webkit).

Reverted changeset:

"WPT server should use its own testharness.js file and
generate a warning when it does not match WebKit version"
https://bugs.webkit.org/show_bug.cgi?id=150332
http://trac.webkit.org/changeset/192462

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

3 years agoWPT server should use its own testharness.js file and generate a warning when it...
youenn.fablet@crf.canon.fr [Sun, 15 Nov 2015 18:17:29 +0000 (18:17 +0000)]
WPT server should use its own testharness.js file and generate a warning when it does not match WebKit version
https://bugs.webkit.org/show_bug.cgi?id=150332

Reviewed by Darin Adler.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer.__init__): Removed testharness.js as file to copy from WK to WPT.
(WebPlatformTestServer._copy_webkit_test_files): Added warning generation when WK testharness.js is not matching WPT version.

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

3 years agoWebKit should not need to modify testharness.js
youenn.fablet@crf.canon.fr [Sun, 15 Nov 2015 16:01:49 +0000 (16:01 +0000)]
WebKit should not need to modify testharness.js
https://bugs.webkit.org/show_bug.cgi?id=151262

Reviewed by Darin Adler.

* resources/testharness.js: Resetting global testharness.js timeout values to the default ones.
* resources/testharnessreport.js: Disabling global testharness.js timeout.

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

3 years agoREGRESSION (r192404): Fix tvOS and watchOS builds
ddkilzer@apple.com [Sun, 15 Nov 2015 08:42:34 +0000 (08:42 +0000)]
REGRESSION (r192404): Fix tvOS and watchOS builds

* platform/spi/cocoa/QuartzCoreSPI.h: Add more version checks to
fix all the builds.

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

3 years ago[EFL][GTK] Remove use of String::format() in versionForUAString()
gyuyoung.kim@webkit.org [Sun, 15 Nov 2015 07:56:55 +0000 (07:56 +0000)]
[EFL][GTK] Remove use of String::format() in versionForUAString()
https://bugs.webkit.org/show_bug.cgi?id=151250

Reviewed by Darin Adler.

As String::format() will be deprecated due to the security problem, reimplement
versionForUAString() using a macro.

* platform/efl/UserAgentEfl.cpp:
(WebCore::versionForUAString):
* platform/gtk/UserAgentGtk.cpp:
(WebCore::platformVersionForUAString):
(WebCore::versionForUAString):

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

3 years agoRegression(r188820): Downloads of data URLs is broken
antti@apple.com [Sun, 15 Nov 2015 05:23:08 +0000 (05:23 +0000)]
Regression(r188820): Downloads of data URLs is broken
https://bugs.webkit.org/show_bug.cgi?id=150900
rdar://problem/23399223

Reviewed by Darin Adler.

No test, the current test infrastructure only allows testing policy decisions, not the actual download.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):

Use normal download path for data URLs instead of trying to convert the main resource load.
Since we decode data URLs locally there is no associated resource load on WebKit side.

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

3 years agoREGRESSION (r190370): CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple...
msaboff@apple.com [Sat, 14 Nov 2015 21:13:02 +0000 (21:13 +0000)]
REGRESSION (r190370): CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.JavaScriptCore: JSC::JITCode::execute + 158
https://bugs.webkit.org/show_bug.cgi?id=151279

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

We need to restore callee saves even when we take the slow path in a polymorphic call stub.
Move the restoration to the top of the stub so that it is done for all paths.

* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):

LayoutTests:

New regression test.

* js/regress-151279-expected.txt: Added.
* js/regress-151279.html: Added.
* js/script-tests/regress-151279.js: Added.

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

3 years agoAX: add a new trait for elements in fieldset on iOS
n_wang@apple.com [Sat, 14 Nov 2015 09:39:28 +0000 (09:39 +0000)]
AX: add a new trait for elements in fieldset on iOS
https://bugs.webkit.org/show_bug.cgi?id=151281

Reviewed by Chris Fleizach.

Source/WebCore:

Added a new trait for elements in the fieldset, so VoiceOver can speak the legend
information for those elements.

Test: accessibility/ios-simulator/fieldset-traits.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(assistiveTechnologySimulatedFocusCallback):
(fieldsetAncestorElementCallback):
(childAtIndexCallback):
(getElementTextLengthCallback):
(hasContainedByFieldsetTraitCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::elementTextLength):
(AccessibilityUIElement::hasContainedByFieldsetTrait):
(AccessibilityUIElement::fieldsetAncestorElement):
(AccessibilityUIElement::url):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::scrollPageDown):
(WTR::AccessibilityUIElement::scrollPageLeft):
(WTR::AccessibilityUIElement::scrollPageRight):
(WTR::AccessibilityUIElement::hasContainedByFieldsetTrait):
(WTR::AccessibilityUIElement::fieldsetAncestorElement):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::identifier):
(WTR::AccessibilityUIElement::hasContainedByFieldsetTrait):
(WTR::AccessibilityUIElement::fieldsetAncestorElement):
(WTR::AccessibilityUIElement::rowCount):

LayoutTests:

* accessibility/ios-simulator/fieldset-traits-expected.txt: Added.
* accessibility/ios-simulator/fieldset-traits.html: Added.

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

3 years agoEliminate a request for layout every time an item is added to the stage of the graphi...
commit-queue@webkit.org [Sat, 14 Nov 2015 05:51:27 +0000 (05:51 +0000)]
Eliminate a request for layout every time an item is added to the stage of the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151289

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-13
Reviewed by Simon Fraser.

Cache the stage size when it is created instead of requesting every time
an object is added via clientWidth and clientHeight.

* Animometer/resources/extensions.js:
(Insets.elementPadding):
* Animometer/tests/resources/stage.js:
(Stage):
(Stage.prototype.get size):

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

3 years agoUnreviewed, rolling out r192445, r192451, and r192452.
commit-queue@webkit.org [Sat, 14 Nov 2015 04:03:14 +0000 (04:03 +0000)]
Unreviewed, rolling out r192445, r192451, and r192452.
https://bugs.webkit.org/show_bug.cgi?id=151291

Broke Mavericks build (and thus EWS) (Requested by ap on
#webkit).

Reverted changesets:

"Add identifier strings for a bunch of context menu items"
https://bugs.webkit.org/show_bug.cgi?id=151272
http://trac.webkit.org/changeset/192445

"Try to fix the 32-bit build"
http://trac.webkit.org/changeset/192451

"Try to fix the 32-bit build"
http://trac.webkit.org/changeset/192452

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

3 years agoUnreviewed, rolling out r192416 and r192443.
commit-queue@webkit.org [Sat, 14 Nov 2015 01:18:58 +0000 (01:18 +0000)]
Unreviewed, rolling out r192416 and r192443.
https://bugs.webkit.org/show_bug.cgi?id=151285

Broke 32-bit in some mysterious way I need to understand
(Requested by kling on #webkit).

Reverted changesets:

"[JSC] JSPropertyNameEnumerator could be destructorless."
https://bugs.webkit.org/show_bug.cgi?id=151242
http://trac.webkit.org/changeset/192416

"Follow-up for 32-bit test failures after..."
https://bugs.webkit.org/show_bug.cgi?id=151242
http://trac.webkit.org/changeset/192443

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

3 years agoTry to fix the 32-bit build
timothy_horton@apple.com [Sat, 14 Nov 2015 00:56:22 +0000 (00:56 +0000)]
Try to fix the 32-bit build

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):

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