WebKit-https.git
4 years agoWeb Inspector: add pixel area column to layout timeline view
mattbaker@apple.com [Thu, 30 Jun 2016 22:29:32 +0000 (22:29 +0000)]
Web Inspector: add pixel area column to layout timeline view
https://bugs.webkit.org/show_bug.cgi?id=148677
<rdar://problem/22518762>

Reviewed by Timothy Hatcher.

The view can simply add the column. LayoutTimelineDataGridNode
already includes area data and cell formatting.

* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):

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

4 years agoDrawing an SVG image into a <canvas> that is not in the DOM draws the wrong region
commit-queue@webkit.org [Thu, 30 Jun 2016 22:18:12 +0000 (22:18 +0000)]
Drawing an SVG image into a <canvas> that is not in the DOM draws the wrong region
https://bugs.webkit.org/show_bug.cgi?id=159276

Patch by Antoine Quint <graouts@apple.com> on 2016-06-30
Reviewed by Dean Jackson.

Source/WebCore:

In the event where the <img> element that we are passing to CanvasRenderingContext2D.drawImage()
points to an SVG resource, we ensure that the container for the SVG image is sized to match the
HTML element. The necessity for setting this container size, explained in webkit.org/b/148845,
is that we must ensure a cached image does not have an outdated container size.

Tests: svg/as-image/img-with-svg-resource-in-dom-and-drawImage.html
       svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage.html
       svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage.html
       svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):

LayoutTests:

Adding a series of new tests to check we correctly respect mismatching source and
destination rectangles with SVG images as sources, both with the source <img> element
being present and absent from the DOM, and explicit sizes being set or not set.

* svg/as-image/img-with-svg-resource-in-dom-and-drawImage-expected.html: Added.
* svg/as-image/img-with-svg-resource-in-dom-and-drawImage.html: Added.
* svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage-expected.html: Added.
* svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage.html: Added.
* svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage-expected.html: Added.
* svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage.html: Added.
* svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage-expected.html: Added.
* svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage.html: Added.

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

4 years agoWeb Inspector: the last normal tab cannot be closed with "Close Tab" context menu...
bburg@apple.com [Thu, 30 Jun 2016 22:14:20 +0000 (22:14 +0000)]
Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item
https://bugs.webkit.org/show_bug.cgi?id=159317
<rdar://problem/27042491>

Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem.prototype._handleContextMenuEvent):
(WebInspector.TabBarItem): fix the expression that controls whether the item is disabled.

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

4 years agoget_by_id_with_this does not trigger a to_this in caller.
sbarati@apple.com [Thu, 30 Jun 2016 22:06:44 +0000 (22:06 +0000)]
get_by_id_with_this does not trigger a to_this in caller.
https://bugs.webkit.org/show_bug.cgi?id=159226

Reviewed by Keith Miller.

This is a bug if the caller is in sloppy mode and the callee is in strict
mode. This can't happen with ES6 classes because they're all in strict mode,
but it can happen with method syntax on an object literal. The caller must
to_this on |this| when it knows that it performs super property accesses.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* tests/stress/super-property-access-object-literal-to-this-2.js: Added.
(assert):
(test):
(let.o1.get foo):
(let.o2.a):
(let.o2.aa):
* tests/stress/super-property-access-object-literal-to-this.js: Added.
(assert):
(test):
(let.o1.get foo):
(let.o2.a):
(let.o2.aa):
(let.o2.b):
(let.o2.bb):
* tests/stress/super-property-access-to-this.js: Added.
(assert):
(test):
(Base.prototype.get foo):
(Base):
(Child.prototype.a):
(Child.prototype.b):
(Child):

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

4 years agoTab pointed out a typo that made the overdamped case fail.
dino@apple.com [Thu, 30 Jun 2016 21:50:40 +0000 (21:50 +0000)]
Tab pointed out a typo that made the overdamped case fail.

* demos/spring/spring.js:
(SpringSolver.prototype.solve):

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

4 years agogetUserMedia() exposed, but not functional
eric.carlson@apple.com [Thu, 30 Jun 2016 21:20:27 +0000 (21:20 +0000)]
getUserMedia() exposed, but not functional
https://bugs.webkit.org/show_bug.cgi?id=158393
<rdar://problem/26642259>

Reviewed by Dean Jackson.

Set default value of the Media Stream runtime flag to false on Mac OS X and iOS until the
browser support is in place.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): Disable media stream by default
on Mac OS X and iOS.
* bindings/generic/RuntimeEnabledFeatures.h:

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

4 years agoWeb Inspector: Add "spring" to transition-timing-function value autocompletion
nvasilyev@apple.com [Thu, 30 Jun 2016 21:19:04 +0000 (21:19 +0000)]
Web Inspector: Add "spring" to transition-timing-function value autocompletion
https://bugs.webkit.org/show_bug.cgi?id=159313
<rdar://problem/27114269>

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSKeywordCompletions.js:

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

4 years agoREGRESSION(r202329): WebInspectorProxy's WKPagePolicyClient callbacks are not being...
bburg@apple.com [Thu, 30 Jun 2016 21:17:05 +0000 (21:17 +0000)]
REGRESSION(r202329): WebInspectorProxy's WKPagePolicyClient callbacks are not being called
https://bugs.webkit.org/show_bug.cgi?id=159308
<rdar://problem/27111764>

Reviewed by Tim Horton.

Adopt WKPageNavigationClient and ditch WKPolicyClient and WKPageLoaderClient.
After r202329, it's not possible to set a WKPolicyClient for a WKPage/WebPageProxy that backs a WKWebView.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::isMainOrTestInspectorPage): Take a WebCore::ResourceRequest.
(WebKit::processDidCrash): Deleted.
(WebKit::webProcessDidCrash): Rename to match new client callback name.
(WebKit::decidePolicyForNavigationAction): Rework this to take new argument types.
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
Install a WKPageNavigationClient.

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

4 years agoUnreviewed, rolling out r202676.
ryanhaddad@apple.com [Thu, 30 Jun 2016 20:44:42 +0000 (20:44 +0000)]
Unreviewed, rolling out r202676.
https://bugs.webkit.org/show_bug.cgi?id=159314

This change caused storage/websql tests to crash on Mac and
iOS WK1 (Requested by ryanhaddad on #webkit).

Reverted changeset:

"Purge PassRefPtr in Modules/webdatabase"
https://bugs.webkit.org/show_bug.cgi?id=159255
http://trac.webkit.org/changeset/202676

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-30

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

4 years agoFixed a typo in the link to the other version.
dino@apple.com [Thu, 30 Jun 2016 20:29:26 +0000 (20:29 +0000)]
Fixed a typo in the link to the other version.

* blog-files/color-gamut/index.html:

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

4 years ago[iOS] Process suspension is prevented for 30 seconds after closing a tab
cdumez@apple.com [Thu, 30 Jun 2016 20:17:30 +0000 (20:17 +0000)]
[iOS] Process suspension is prevented for 30 seconds after closing a tab
https://bugs.webkit.org/show_bug.cgi?id=159280
<rdar://problem/27014867>

Reviewed by Gavin Barraclough.

When closing a tab, ConnectionTerminationWatchdog takes a background
assertion on behalf of the WebContent process and only releases it
after 30 seconds, allowing for the WebContent process to exit cleanly
without worrying about getting suspended too early.

However, the child process normally exits much sooner than this and
we end up holding a process assertion for no reason for a full 30
seconds anyway. This patch addresses the issue by registering an
invalidation handler with the BKSProcessAssertion and releasing our
our assertion in such case. The invalidation handler gets called
as soon as the child process exits.

* Platform/spi/ios/AssertionServicesSPI.h:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::ProcessAssertion):
* UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::validity):
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):
(WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
(WebKit::ProcessAssertion::setState): Deleted.

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

4 years agoKeep track of when a WKWebView is blank before the initial non-empty layout
timothy_horton@apple.com [Thu, 30 Jun 2016 19:15:15 +0000 (19:15 +0000)]
Keep track of when a WKWebView is blank before the initial non-empty layout
https://bugs.webkit.org/show_bug.cgi?id=159217
<rdar://problem/26071766>

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
(-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):

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

4 years ago[iOS] Media controls are too cramped with small video
commit-queue@webkit.org [Thu, 30 Jun 2016 19:10:36 +0000 (19:10 +0000)]
[iOS] Media controls are too cramped with small video
https://bugs.webkit.org/show_bug.cgi?id=158815
<rdar://problem/26824238>

Patch by Antoine Quint <graouts@apple.com> on 2016-06-30
Reviewed by Eric Carlson.

Source/WebCore:

In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
for the progress indicator. However, we were not accounting for the width used by
the current and remaining time labels on either side of it, so we would incorrectly
conclude that we were guaranteeing the minimum time and yield incorrect layouts since
we were trying to fit more buttons than we had room for.

In order to correctly compute the available width for the progress indicator, we now
have clones of the current and remaining time labels, hidden from video and VoiceOver,
that we update along with the originals. The same styles apply to both clones and
originals, so we may measure the clones to determine the space used by the time labels.
The reason we need to use clones is that if the time labels had previously been hidden
from view, precisely because there was not enough space to display them along with the
progress indicator, then trying to obtain metrics from them would yield 0 since they had
"display: none" styles applied. In order to avoid extra layouts and possible flashing, we
use the clones so that we never have to toggle the "display" property of the originals
just to obtain their measurements.

As a result of this change, we adjust the constant used to set the minimum required
width available to display the progress indicator after all other essential controls
and labels have been measured. That constant used to account for the width of the
time labels, and this is no longer correct.

Test: media/video-controls-drop-and-restore-timeline.html

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.createTimeClones):
(Controller.prototype.removeTimeClass):
(Controller.prototype.addTimeClass):
(Controller.prototype.updateDuration):
(Controller.prototype.updateLayoutForDisplayedWidth):
(Controller.prototype.updateTime):
(Controller.prototype.updateControlsWhileScrubbing):
* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsiOS.js:

LayoutTests:

Adjust the output of a couple of tests to account for the time label clones, ensure the video
is wide enough to always have its timeline visible for tests that rely on the timeline being
visible to drag and seek, and finally add a new test.

* media/controls-drag-timebar.html:
* media/media-controls-drag-timeline-set-controls-property.html:
* media/video-controls-drop-and-restore-timeline-expected.txt: Added.
* media/video-controls-drop-and-restore-timeline.html: Added.
* platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt:
* platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt:

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

4 years agoWe need to to_this when an inner arrow function uses 'this'
sbarati@apple.com [Thu, 30 Jun 2016 18:46:23 +0000 (18:46 +0000)]
We need to to_this when an inner arrow function uses 'this'
https://bugs.webkit.org/show_bug.cgi?id=159290
<rdar://problem/27058322>

Reviewed by Geoffrey Garen.

We put the |this| value into the closure object when there
is an arrow function that uses |this|. However, an arrow function
using |this| wasn't causing the creator of the closure that
holds |this| to to_this its value before putting it in the
closure. That's a huge bug because it means some arrow functions
can capture the raw |this| value, which might be a JSLexicalEnvironment.
This patch fixes this by adding an easy to check to see if any
inner arrow functions use |this|, and if any do, it will to_this
the |this| value.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* tests/stress/to-this-before-arrow-function-closes-over-this-that-starts-as-lexical-environment.js: Added.
(assert):
(obj):
(foo.capture):
(foo.wrapper.let.x.):
(foo2.capture):
(foo2.wrapper.let.x.):
(foo2.wrapper.bar):

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

4 years agoRemoving duplicated line from Mac TestExpectations file.
ryanhaddad@apple.com [Thu, 30 Jun 2016 18:19:41 +0000 (18:19 +0000)]
Removing duplicated line from Mac TestExpectations file.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoCleanup ProcessAssertion RunInBackground management
barraclough@apple.com [Thu, 30 Jun 2016 18:15:47 +0000 (18:15 +0000)]
Cleanup ProcessAssertion RunInBackground management
https://bugs.webkit.org/show_bug.cgi?id=159284

Reviewed by Chris Dumez.

Factor out code that handles taking a background assertion on the UI app into
ProcessAndUIAssertion::updateRunInBackgroundCount helper.

This patch just cleanup to enable a futher fix.

* UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertion::state):
    - Added ProcessAndUIAssertion::updateRunInBackgroundCount
    - Added ProcessAndUIAssertion::m_isHoldingBackgroundAssertionOnApp
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount):
    - helper to manage calls to incrementNeedsToRunInBackgroundCount/decrementNeedsToRunInBackgroundCount
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
    - call updateRunInBackgroundCount
(WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
    changed to use m_isHoldingBackgroundAssertionOnApp
(WebKit::ProcessAndUIAssertion::setState):
    - call updateRunInBackgroundCount

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

4 years agoGenerators violate bytecode liveness validation
fpizlo@apple.com [Thu, 30 Jun 2016 18:13:26 +0000 (18:13 +0000)]
Generators violate bytecode liveness validation
https://bugs.webkit.org/show_bug.cgi?id=159279

Reviewed by Yusuke Suzuki.
PerformanceTests:

Add Basic to our test harness.

Also made some cosmetic changes to the benchmark harness.

* ES6SampleBench/Basic/basic-tests.yaml: Added.
* ES6SampleBench/Basic/stress-test.js: Added.
(preciseTime):
* ES6SampleBench/driver.js:
(Driver):
(Driver.prototype.start):
(Driver.prototype.reportError):
* ES6SampleBench/glue.js:
* ES6SampleBench/index.html:

Source/JavaScriptCore:

Fix a liveness bug found by Basic. The problem is that resume's intended liveness rule is:
"live-in is just the token argument", but the liveness analysis thought that the rule was
"live-in is live-out minus defs plus live-at-catch". Clearly these two rules are quite
different. The way this sort of worked before is that we would define the defs of resume
as being equal to our prediction of what the live-outs would be. We did this in the hope
that we would subtract all live-outs. But, this misses the live-at-catch part. So, this
change adds another hack to neutralize live-at-catch.

This would make a lot more sense if we wrote a new liveness analysis that was just for
generator conversion. It could reuse BytecodeUseDef but otherwise it would be a new thing.
It would be easy to write crazy rules for save/resume in such an analysis, especially if
that analysis rewrote the bytecode. We could then just have an op_yield that is a no-op.
We would just record the live-outs of op_yield and use that for rewriting the code in terms
of a switch statement.

* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::stepOverInstruction):
(JSC::BytecodeLivenessAnalysis::dumpResults):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):

Tools:

Add Basic to our test harness.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

4 years agoUnreviewed, fix the macOS Sierra Release configuration after r202642.
bburg@apple.com [Thu, 30 Jun 2016 18:06:12 +0000 (18:06 +0000)]
Unreviewed, fix the macOS Sierra Release configuration after r202642.

* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
Add missing UNUSED_PARAM for when logging is not enabled.

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

4 years agoMarking fast/shrink-wrap/rect-shrink-wrap.html as flaky on ios-simulator
ryanhaddad@apple.com [Thu, 30 Jun 2016 17:49:27 +0000 (17:49 +0000)]
Marking fast/shrink-wrap/rect-shrink-wrap.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=159275

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years ago[Win][Debug] Assertion fails in TestWTF.
pvollan@apple.com [Thu, 30 Jun 2016 17:48:50 +0000 (17:48 +0000)]
[Win][Debug] Assertion fails in TestWTF.
https://bugs.webkit.org/show_bug.cgi?id=159299

Reviewed by Alex Christensen.

The assert in the & operator in the UniqueRef class fails, because the instance has been moved.
The Windows version of the UNUSED_PARAM macro is getting the address of the parameter, causing
the assertion failure. Since the variable is actually used, there is no need to use the
UNUSED_PARAM macro.

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

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

4 years agoMail crashes on launch at WebCore::PaymentCoordinator::~PaymentCoordinator() + 20
andersca@apple.com [Thu, 30 Jun 2016 17:47:20 +0000 (17:47 +0000)]
Mail crashes on launch at WebCore::PaymentCoordinator::~PaymentCoordinator() + 20
https://bugs.webkit.org/show_bug.cgi?id=159306
rdar://problem/27092107

Reviewed by Tim Horton.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
Create a WebPaymentCoordinatorClient. Remove an unneeded #import.

(-[WebView _commonInitializationWithFrameName:groupName:]):
Remove an unneeded #import.

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

4 years agoUnreviewed, rolling out r202659.
ryanhaddad@apple.com [Thu, 30 Jun 2016 17:31:23 +0000 (17:31 +0000)]
Unreviewed, rolling out r202659.
https://bugs.webkit.org/show_bug.cgi?id=159305

The test for this change times out on mac-wk2 debug and caused
an existing test to crash. (Requested by ryanhaddad on
#webkit).

Reverted changeset:

"Web Inspector: Wrong function name next to scope"
https://bugs.webkit.org/show_bug.cgi?id=158210
http://trac.webkit.org/changeset/202659

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-30

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

4 years ago[JSC] Date.setYear() misses timeClip()
commit-queue@webkit.org [Thu, 30 Jun 2016 17:16:39 +0000 (17:16 +0000)]
[JSC] Date.setYear() misses timeClip()
https://bugs.webkit.org/show_bug.cgi?id=159289

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-30
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetYear):

LayoutTests:

* js/date-timeClip-large-values-expected.txt:
* js/script-tests/date-timeClip-large-values.js:
The failures are caused by bugs related to GregorianDateTime.
The last test case is the one covering this patch.

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

4 years agoUnreviewed, rolling out r202679.
commit-queue@webkit.org [Thu, 30 Jun 2016 16:19:32 +0000 (16:19 +0000)]
Unreviewed, rolling out r202679.
https://bugs.webkit.org/show_bug.cgi?id=159302

Still causing timeouts on media/controls-drag-timebar.html
(Requested by ap on #webkit).

Reverted changeset:

"[iOS] Media controls are too cramped with small video"
https://bugs.webkit.org/show_bug.cgi?id=158815
http://trac.webkit.org/changeset/202679

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

4 years agoLayoutTests intermittently failing to run due to issues starting Web Platform Test...
commit-queue@webkit.org [Thu, 30 Jun 2016 16:14:44 +0000 (16:14 +0000)]
LayoutTests intermittently failing to run due to issues starting Web Platform Test server
https://bugs.webkit.org/show_bug.cgi?id=159166
<rdar://problem/27051759>

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-30
Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

Pregenerating certificates.

* resources/_wpt_certs/.gitignore: Added.
* resources/_wpt_certs/localhost.key: Added.
* resources/_wpt_certs/localhost.pem: Added.
* resources/config.json:

Tools:

Setting the certificate directory to the copied config.json.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._copy_webkit_test_files):

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

4 years ago[JSC] Implement isFinite / isNaN in JS and make DFG ToNumber accept non number values
utatane.tea@gmail.com [Thu, 30 Jun 2016 15:26:47 +0000 (15:26 +0000)]
[JSC] Implement isFinite / isNaN in JS and make DFG ToNumber accept non number values
https://bugs.webkit.org/show_bug.cgi?id=154022

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We aim at optimizing @toInteger operation.
While it still has an unoptimized part[1], this patch should be a first step.

We introduce the @toNumber builtin intrinsic operation.
This converts the given value to the JS number by emitting op_to_number bytecode.
Previously @toInteger called C++ @Number constructor for that purpose.

And in DFG, op_to_number is converted to DFG ToNumber node.
During DFG, we attempt to convert this to edge filtering and Identity, but if we fail,
we just fall back to calling the C++ function.

To utilize ToNumber in user-land side, we add a path attempting to convert Number constructor calls
to ToNumber DFG nodes. This conversion is useful because `Number(value)` is used to convert a value to a number in JS.

Before this patch, we emit simple edge filtering (NumberUse) instead of emitting DFG node like ToNumber for op_to_number.
But emitting ToNumber is useful, because in the case of `Number(value)`, considering `value` may not be a number is reasonable.

By leveraging @toNumber operation, we rewrite Number.{isFinite, isNaN}, global.{isFinite, isNaN} and @toInteger.

ToNumber DFG node has a value profiling. This profiling is leveraged to determine the result number type of the ToNumber operation.
This value profiling is provided from either NumberConstructor's call operation or op_to_number.

The results (with the added performance tests) show that, while existing cases are performance neutral, the newly added cases gain the performance benefit.
And ASMBench/n-body.c also shows stable ~2% progression.

[1]: https://bugs.webkit.org/show_bug.cgi?id=153738

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinNames.h:
* builtins/GlobalObject.js:
(globalPrivate.isFinite):
(globalPrivate.isNaN):
(globalPrivate.toInteger): Deleted.
(globalPrivate.toLength): Deleted.
(globalPrivate.isDictionary): Deleted.
(globalPrivate.speciesGetter): Deleted.
(globalPrivate.speciesConstructor): Deleted.
* builtins/GlobalOperations.js: Copied from Source/JavaScriptCore/builtins/GlobalObject.js.
(globalPrivate.toInteger):
(globalPrivate.toLength):
(globalPrivate.isDictionary):
(globalPrivate.speciesGetter):
(globalPrivate.speciesConstructor):
* builtins/NumberConstructor.js: Added.
(isFinite):
(isNaN):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/BytecodeList.json:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finishCreation):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitUnaryOp):
(JSC::BytecodeGenerator::emitUnaryOpProfiled):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitToNumber):
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emit_intrinsic_toNumber):
(JSC::UnaryPlusNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::parseBlock):
We use `getPrediction()` to retrieve the heap prediction from the to_number bytecode.
According to the benchmark results, choosing `getPredictionWithoutOSRExit()` causes performance regression (1.5%) in kraken stanford-crypto-aes.

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupToNumber):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
Always on the heap prediction.

* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
As of 64bit version, we carefully manage the register reuse. The largest difference between 32bit and 64bit is
`branchIfNotNumber()` requires the temporary register. We should not use the result registers for that since
it may be reuse the argument registers and it can break the argument registers before using them to call the operation.
Currently, we allocate the additional temporary register for that scratch register.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
Reuse the argument register for the result if possible. And manually decrement the use count in the middle of the node.
This is similar technique used in ToPrimitive. Typically, the child of ToNumber is only used by this ToNumber node since
we would like to perform the type conversion onto this child node here. So this careful register reuse effectively removes
the spills to call the operation. The example of the actually emitted code is the following.

76:<!2:loc11>     ToNumber(Untyped:@68, JS|MustGen|UseAsOther, DoubleimpurenanTopEmpty, R:World, W:Heap, Exits, ClobbersExit, bc#48)  predicting DoubleimpurenanTopEmpty
    0x7f986d5fe693: test %rax, %r14
    0x7f986d5fe696: jz 0x7f986d5fe6a1
    0x7f986d5fe69c: jmp 0x7f986d5fe6d1
    0x7f986d5fe6a1: mov %rax, %rsi
    0x7f986d5fe6a4: mov %rbp, %rdi
    0x7f986d5fe6a7: mov $0x2, 0x24(%rbp)
    0x7f986d5fe6ae: mov $0x7f98711ea5f0, %r11
    0x7f986d5fe6b8: call *%r11
    0x7f986d5fe6bb: mov $0x7f982d3f72d0, %r11
    0x7f986d5fe6c5: mov (%r11), %r11
    0x7f986d5fe6c8: test %r11, %r11
    0x7f986d5fe6cb: jnz 0x7f986d5fe88c

It effectively removes the unnecessary spill to call the operation!

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileToNumber):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::branchIfNumber):
(JSC::AssemblyHelpers::branchIfNotNumber):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_to_number):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_to_number):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* parser/Nodes.h:
(JSC::UnaryOpNode::opcodeID):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncIsNaN): Deleted.
(JSC::globalFuncIsFinite): Deleted.
* runtime/JSGlobalObjectFunctions.h:
* runtime/MathCommon.h:
(JSC::maxSafeInteger):
(JSC::minSafeInteger):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):
(JSC::numberConstructorFuncIsFinite): Deleted.
(JSC::numberConstructorFuncIsNaN): Deleted.
* runtime/NumberConstructor.h:
* tests/stress/Number-isNaN-basics.js: Added.
(numberIsNaNOnInteger):
(testNumberIsNaNOnIntegers):
(verifyNumberIsNaNOnIntegerWithOtherTypes):
(numberIsNaNOnDouble):
(testNumberIsNaNOnDoubles):
(verifyNumberIsNaNOnDoublesWithOtherTypes):
(numberIsNaNNoArguments):
(numberIsNaNTooManyArguments):
(testNumberIsNaNOnConstants):
(numberIsNaNStructTransition):
(Number.isNaN):
* tests/stress/global-is-finite.js: Added.
(shouldBe):
* tests/stress/global-is-nan.js: Added.
(shouldBe):
* tests/stress/global-isNaN-basics.js: Added.
(isNaNOnInteger):
(testIsNaNOnIntegers):
(verifyIsNaNOnIntegerWithOtherTypes):
(isNaNOnDouble):
(testIsNaNOnDoubles):
(verifyIsNaNOnDoublesWithOtherTypes):
(verifyIsNaNOnCoercedTypes):
(isNaNNoArguments):
(isNaNTooManyArguments):
(testIsNaNOnConstants):
(isNaNTypeCoercionSideEffects):
(i.value.isNaNTypeCoercionSideEffects.valueOf):
(isNaNStructTransition):
(isNaN):
* tests/stress/number-is-finite.js: Added.
(shouldBe):
(test2):
(test3):
* tests/stress/number-is-nan.js: Added.
(shouldBe):
(test2):
(test3):
* tests/stress/to-number-basics.js: Added.
(shouldBe):
* tests/stress/to-number-convert-identity-without-execution.js: Added.
(shouldBe):
(object.valueOf):
(valueOf):
* tests/stress/to-number-int52.js: Added.
(shouldBe):
(object.valueOf):
* tests/stress/to-number-intrinsic-convert-to-identity-without-execution.js: Added.
(shouldBe):
(object.valueOf):
(valueOf):
* tests/stress/to-number-intrinsic-int52.js: Added.
(shouldBe):
(object.valueOf):
* tests/stress/to-number-intrinsic-object-without-execution.js: Added.
(shouldBe):
(object.valueOf):
* tests/stress/to-number-intrinsic-value-profiling.js: Added.
(shouldBe):
(object.valueOf):
* tests/stress/to-number-object-without-execution.js: Added.
(shouldBe):
(object.valueOf):
* tests/stress/to-number-object.js: Added.
(shouldBe):
(test12):
(object1.valueOf):
(test2):
(test22):
(object2.valueOf):
(test3):
(test32):
(object3.valueOf):
* tests/stress/to-number-value-profiling.js: Added.
(shouldBe):
(object.valueOf):

LayoutTests:

* js/regress/Number-isNaN-expected.txt: Added.
* js/regress/Number-isNaN.html: Added.
* js/regress/global-isNaN-expected.txt: Added.
* js/regress/global-isNaN.html: Added.
* js/regress/script-tests/Number-isNaN.js: Added.
* js/regress/script-tests/global-isNaN.js: Added.
* js/regress/script-tests/many-foreach-calls.js:
(i.4.forEach):
(i.array.forEach): Deleted.
* js/regress/script-tests/to-number-constructor-number-string-number-string.js: Added.
(test):
* js/regress/script-tests/to-number-constructor-only-number.js: Added.
(test):
* js/regress/script-tests/to-number-constructor-only-string.js: Added.
(test):
* js/regress/script-tests/to-number-constructor-string-number-string-number.js: Added.
(test):
* js/regress/script-tests/to-number-number-string-number-string.js: Added.
(test):
* js/regress/script-tests/to-number-only-number.js: Added.
(test):
* js/regress/script-tests/to-number-only-string.js: Added.
(test):
* js/regress/script-tests/to-number-string-number-string-number.js: Added.
(test):
* js/regress/to-number-constructor-number-string-number-string-expected.txt: Added.
* js/regress/to-number-constructor-number-string-number-string.html: Added.
* js/regress/to-number-constructor-only-number-expected.txt: Added.
* js/regress/to-number-constructor-only-number.html: Added.
* js/regress/to-number-constructor-only-string-expected.txt: Added.
* js/regress/to-number-constructor-only-string.html: Added.
* js/regress/to-number-constructor-string-number-string-number-expected.txt: Added.
* js/regress/to-number-constructor-string-number-string-number.html: Added.
* js/regress/to-number-number-string-number-string-expected.txt: Added.
* js/regress/to-number-number-string-number-string.html: Added.
* js/regress/to-number-only-number-expected.txt: Added.
* js/regress/to-number-only-number.html: Added.
* js/regress/to-number-only-string-expected.txt: Added.
* js/regress/to-number-only-string.html: Added.
* js/regress/to-number-string-number-string-number-expected.txt: Added.
* js/regress/to-number-string-number-string-number.html: Added.

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

4 years ago[iOS] Media controls are too cramped with small video
commit-queue@webkit.org [Thu, 30 Jun 2016 15:09:35 +0000 (15:09 +0000)]
[iOS] Media controls are too cramped with small video
https://bugs.webkit.org/show_bug.cgi?id=158815
<rdar://problem/26824238>

Patch by Antoine Quint <graouts@apple.com> on 2016-06-30
Reviewed by Eric Carlson.

Source/WebCore:

In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
for the progress indicator. However, we were not accounting for the width used by
the current and remaining time labels on either side of it, so we would incorrectly
conclude that we were guaranteeing the minimum time and yield incorrect layouts since
we were trying to fit more buttons than we had room for.

In order to correctly compute the available width for the progress indicator, we now
have clones of the current and remaining time labels, hidden from video and VoiceOver,
that we update along with the originals. The same styles apply to both clones and
originals, so we may measure the clones to determine the space used by the time labels.
The reason we need to use clones is that if the time labels had previously been hidden
from view, precisely because there was not enough space to display them along with the
progress indicator, then trying to obtain metrics from them would yield 0 since they had
"display: none" styles applied. In order to avoid extra layouts and possible flashing, we
use the clones so that we never have to toggle the "display" property of the originals
just to obtain their measurements.

As a result of this change, we adjust the constant used to set the minimum required
width available to display the progress indicator after all other essential controls
and labels have been measured. That constant used to account for the width of the
time labels, and this is no longer correct.

Test: media/video-controls-drop-and-restore-timeline.html

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.createTimeClones):
(Controller.prototype.removeTimeClass):
(Controller.prototype.addTimeClass):
(Controller.prototype.updateDuration):
(Controller.prototype.updateLayoutForDisplayedWidth):
(Controller.prototype.updateTime):
(Controller.prototype.updateControlsWhileScrubbing):
* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls-time-remaining-display.clone):
* Modules/mediacontrols/mediaControlsiOS.js:

LayoutTests:

Adjust the output of this test to account for the time label clones and add a new test.

* media/video-controls-drop-and-restore-timeline-expected.txt: Added.
* media/video-controls-drop-and-restore-timeline.html: Added.
* platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt:
* platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt:

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

4 years ago[Mac] Crash registering AVFoundation media engine
eric.carlson@apple.com [Thu, 30 Jun 2016 14:26:14 +0000 (14:26 +0000)]
[Mac] Crash registering AVFoundation media engine
https://bugs.webkit.org/show_bug.cgi?id=159269
<rdar://problem/27017656>

Reviewed by Brent Fulgham.

* platform/graphics/MediaPlayer.cpp:
(WebCore::mediaEngineVectorLock): New, return the static Lock.
(WebCore::haveMediaEnginesVector): Wrap the naked bool.
(WebCore::buildMediaEnginesVector): Assert that the lock is locked.
(WebCore::installedMediaEngines): Hold the lock while checking/rebuilding the vector.
(WebCore::MediaPlayer::resetMediaEngines): Hold the lock while clearing the vector.

Use SOFT_LINK_CLASS_FOR_SOURCE instead of SOFT_LINK_CLASS because the former uses dispatch_once
to ensure that class loading is thread safe.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
(WebCore::assetCacheForPath):
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createOpenGLVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
(-[WebCoreAVFPullDelegate setCallback:]):
(-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
(-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):

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

4 years ago[image-decoders] Use final and override in ImageDecoder subclasses
carlosgc@webkit.org [Thu, 30 Jun 2016 13:37:25 +0000 (13:37 +0000)]
[image-decoders] Use final and override in ImageDecoder subclasses
https://bugs.webkit.org/show_bug.cgi?id=159291

Reviewed by Antonio Gomes.

* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::frameSizeAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.h:
* platform/image-decoders/webp/WEBPImageDecoder.h:

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

4 years agoPurge PassRefPtr in Modules/webdatabase
gyuyoung.kim@webkit.org [Thu, 30 Jun 2016 08:14:35 +0000 (08:14 +0000)]
Purge PassRefPtr in Modules/webdatabase
https://bugs.webkit.org/show_bug.cgi?id=159255

Reviewed by Benjamin Poulain.

As a step to remove PassRefPtr use, this patch cleans it up in Modules/webdatabase.

Additionally unnecessary spaces and tabs are removed too.

* Modules/webdatabase/ChangeVersionWrapper.cpp:
* Modules/webdatabase/DOMWindowWebDatabase.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::~Database):
(WebCore::Database::scheduleTransaction):
(WebCore::Database::runTransaction):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::allowRead):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
(WebCore::DatabaseManager::fullPathForDatabase):
(WebCore::DatabaseManager::detailsForNameAndOrigin):
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseTask.cpp:
(WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::SQLCallbackWrapper):
* Modules/webdatabase/SQLResultSetRowList.h:
* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
(WebCore::SQLStatement::sqlError):
(WebCore::SQLStatement::sqlResultSet):
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::create):
(WebCore::SQLTransactionBackend::SQLTransactionBackend):
(WebCore::SQLTransactionBackend::transactionError):
* Modules/webdatabase/SQLTransactionBackend.h:

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

4 years ago[Coordinated Graphics] Move CompositingCoordinator from platform to WebKit2 layer
carlosgc@webkit.org [Thu, 30 Jun 2016 07:32:32 +0000 (07:32 +0000)]
[Coordinated Graphics] Move CompositingCoordinator from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=159209

Reviewed by Žan Doberšek.

Source/WebCore:

Remove CompositingCoordinator and its helper classes from the platform layer.

* platform/TextureMapper.cmake:

Source/WebKit2:

Move CompositingCoordinator and its helper classes to the WebKit2 layer.

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.cpp.
(WebKit::AreaAllocator::AreaAllocator):
(WebKit::AreaAllocator::~AreaAllocator):
(WebKit::AreaAllocator::expand):
(WebKit::AreaAllocator::expandBy):
(WebKit::AreaAllocator::release):
(WebKit::AreaAllocator::overhead):
(WebKit::AreaAllocator::roundAllocation):
(WebKit::GeneralAreaAllocator::GeneralAreaAllocator):
(WebKit::GeneralAreaAllocator::~GeneralAreaAllocator):
(WebKit::GeneralAreaAllocator::freeNode):
(WebKit::GeneralAreaAllocator::expand):
(WebKit::fitsWithin):
(WebKit::GeneralAreaAllocator::allocate):
(WebKit::GeneralAreaAllocator::allocateFromNode):
(WebKit::GeneralAreaAllocator::splitNode):
(WebKit::GeneralAreaAllocator::updateLargestFree):
(WebKit::GeneralAreaAllocator::release):
(WebKit::GeneralAreaAllocator::overhead):
* WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.h.
(WebKit::nextPowerOfTwo):
(WebKit::AreaAllocator::size):
(WebKit::AreaAllocator::minimumAllocation):
(WebKit::AreaAllocator::setMinimumAllocation):
(WebKit::AreaAllocator::margin):
(WebKit::AreaAllocator::setMargin):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp.
(WebKit::CompositingCoordinator::CompositingCoordinator):
(WebKit::CompositingCoordinator::~CompositingCoordinator):
(WebKit::CompositingCoordinator::setRootCompositingLayer):
(WebKit::CompositingCoordinator::setViewOverlayRootLayer):
(WebKit::CompositingCoordinator::sizeDidChange):
(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::timestamp):
(WebKit::CompositingCoordinator::syncDisplayState):
(WebKit::CompositingCoordinator::nextAnimationServiceTime):
(WebKit::CompositingCoordinator::clearPendingStateChanges):
(WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebKit::CompositingCoordinator::createRootLayer):
(WebKit::CompositingCoordinator::syncLayerState):
(WebKit::CompositingCoordinator::createImageBackingIfNeeded):
(WebKit::CompositingCoordinator::createImageBacking):
(WebKit::CompositingCoordinator::updateImageBacking):
(WebKit::CompositingCoordinator::clearImageBackingContents):
(WebKit::CompositingCoordinator::removeImageBacking):
(WebKit::CompositingCoordinator::flushPendingImageBackingChanges):
(WebKit::CompositingCoordinator::notifyAnimationStarted):
(WebKit::CompositingCoordinator::notifyFlushRequired):
(WebKit::CompositingCoordinator::paintContents):
(WebKit::CompositingCoordinator::createGraphicsLayer):
(WebKit::CompositingCoordinator::deviceScaleFactor):
(WebKit::CompositingCoordinator::pageScaleFactor):
(WebKit::CompositingCoordinator::createUpdateAtlas):
(WebKit::CompositingCoordinator::removeUpdateAtlas):
(WebKit::CompositingCoordinator::visibleContentsRect):
(WebKit::CompositingCoordinator::mainContentsLayer):
(WebKit::CompositingCoordinator::setVisibleContentsRect):
(WebKit::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebKit::CompositingCoordinator::detachLayer):
(WebKit::CompositingCoordinator::commitScrollOffset):
(WebKit::CompositingCoordinator::renderNextFrame):
(WebKit::CompositingCoordinator::purgeBackingStores):
(WebKit::CompositingCoordinator::paintToSurface):
(WebKit::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h.
(WebKit::CompositingCoordinator::clearRootLayer):
(WebKit::CompositingCoordinator::rootLayer):
(WebKit::CompositingCoordinator::state):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.cpp.
(WebKit::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient):
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::~UpdateAtlas):
(WebKit::UpdateAtlas::buildLayoutIfNeeded):
(WebKit::UpdateAtlas::didSwapBuffers):
(WebKit::UpdateAtlas::paintOnAvailableBuffer):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.h.
(WebKit::UpdateAtlas::size):
(WebKit::UpdateAtlas::supportsAlpha):
(WebKit::UpdateAtlas::addTimeInactive):
(WebKit::UpdateAtlas::isInactive):
(WebKit::UpdateAtlas::isInUse):

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

4 years agoPass SecurityOrigin as references in CORS check code
commit-queue@webkit.org [Thu, 30 Jun 2016 06:28:58 +0000 (06:28 +0000)]
Pass SecurityOrigin as references in CORS check code
https://bugs.webkit.org/show_bug.cgi?id=159263

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-29
Reviewed by Alex Christensen.

No change of behavior.

* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
* loader/CrossOriginAccessControl.cpp:
(WebCore::updateRequestForAccessControl):
(WebCore::createAccessControlPreflightRequest):
(WebCore::passesAccessControlCheck):
* loader/CrossOriginAccessControl.h:
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::preflightSuccess):
(WebCore::DocumentThreadableLoader::isAllowedRedirect):
(WebCore::DocumentThreadableLoader::securityOrigin):
* loader/DocumentThreadableLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/LinkLoader.cpp:
(WebCore::preloadIfNeeded):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::checkCrossOriginAccessControl):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::passesAccessControlCheck):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):

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

4 years agoFix the debug build after r202667
benjamin@webkit.org [Thu, 30 Jun 2016 05:57:22 +0000 (05:57 +0000)]
Fix the debug build after r202667

* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):
The putDirect was missing the Accessor flag for the GetterSetter.

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

4 years agoAttempt to fix constructor-length.html
benjamin@webkit.org [Thu, 30 Jun 2016 05:10:01 +0000 (05:10 +0000)]
Attempt to fix constructor-length.html

I did a rebaseline of constructor-length.html.
I should have updated the test instead.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-29

* js/dom/constructor-length.html:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/ios-simulator/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/win/js/dom/constructor-length-expected.txt:

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

4 years agoWebRTC: Implement MediaEndpointPeerConnection::setConfiguration()
adam.bergkvist@ericsson.com [Thu, 30 Jun 2016 04:49:26 +0000 (04:49 +0000)]
WebRTC: Implement MediaEndpointPeerConnection::setConfiguration()
https://bugs.webkit.org/show_bug.cgi?id=159254

Reviewed by Eric Carlson.

Source/WebCore:

Implement MediaEndpointPeerConnection::setConfiguration() which is the
MediaEndpointPeerConnection implementation of RTCPeerConnection.setConfiguration() [1].

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-setconfiguration

Testing: Updated existing test.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::setConfiguration):
Implemented.
* Modules/mediastream/RTCConfiguration.cpp:
(WebCore::RTCConfiguration::initialize):
* Modules/mediastream/RTCConfiguration.h:
Use shared enums.
* Modules/mediastream/RTCConfiguration.idl:
Remove 'None'/'Public' IceTransportPolicy enum value (removed from WebRTC 1.0).
* platform/mediastream/MediaEndpointConfiguration.cpp:
(WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
* platform/mediastream/MediaEndpointConfiguration.h:
Use shared enums.
(WebCore::MediaEndpointConfiguration::create):
* platform/mediastream/PeerConnectionStates.h: Renamed from Source/WebCore/Modules/mediastream/PeerConnectionStates.h.
Make shared enums accessible to platform objects (currently MediaEndpointConfiguration).

LayoutTests:

Test configuring an RTCPeerConnection object via the constructor and setConfiguration() and
check the resulting configuration with getConfiguration().

* fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt:
* fast/mediastream/RTCPeerConnection-getConfiguration.html:
Remove 'requestIdentity' tests (dictionary member removed from WebRTC 1.0). Add tests for
'bundlePolicy'.
* platform/gtk/TestExpectations:
Unskip above test.

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

4 years agoREGRESSION(200114): Netflix app does not see ChromeCast
msaboff@apple.com [Thu, 30 Jun 2016 04:46:51 +0000 (04:46 +0000)]
REGRESSION(200114): Netflix app does not see ChromeCast
https://bugs.webkit.org/show_bug.cgi?id=159287

Reviewed by Benjamin Poulain.

Change set 200114 changed the behavior of how we check for whether or not we
wrap Objective C init methods in JavaScript constructors.  The prior method
checked the version of JavaScriptCore that was linked with the application.
If the application was not directly linked with JavaScriptCore the prior
method indicated that we shouldn't create constructors.  The new method uses
the SDK the application was compiled with.  Using the new method, an
application compiled with iOS SDK 8.0 or greater would create constructors
and not export init methods to JavaScript.  The problem is that an existing
application that hasn't been recompiled will get a different answer using
the new method.  We need to come up with a method that works in a compatible
way with existing programs, but provides a newly compiled program with the
"is built with SDK N or greater" check.

Added back the prior check of the version of JavaScriptCore the program was
directly linked against.  However we only use this check if we directly linked
with JavaScriptCore.  Otherwise we fall through to check against the SDK the
program was built with.  Changed the iOS SDK version we check
against to be the new version of iOS, iOS 10.

This provides compatible behavior for existing programs.  It may be the case
that some of those programs may require changes when they are rebuilt with the
iOS 10 SDK or later.

* API/JSWrapperMap.mm:
(supportsInitMethodConstructors):

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

4 years agoAdd a link to the proposal.
dino@apple.com [Thu, 30 Jun 2016 04:46:45 +0000 (04:46 +0000)]
Add a link to the proposal.

* demos/spring/index.html:

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

4 years agoAdd the UI JavaScript library to make
dino@apple.com [Thu, 30 Jun 2016 04:39:55 +0000 (04:39 +0000)]
Add the UI JavaScript library to make
other browsers happy.

* demos/spring/dat.gui.min.js: Added.
* demos/spring/index.html:

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

4 years ago[JSC] Minor TypedArray fixes
commit-queue@webkit.org [Thu, 30 Jun 2016 04:24:52 +0000 (04:24 +0000)]
[JSC] Minor TypedArray fixes
https://bugs.webkit.org/show_bug.cgi?id=159286

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-29
Reviewed by Keith Miller.

Source/JavaScriptCore:

* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
See https://tc39.github.io/ecma262/#sec-%typedarray%

* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncLength):
See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype.length

(JSC::typedArrayViewProtoGetterFuncToStringTag):
Yep, that's odd.
See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag

(JSC::JSTypedArrayViewPrototype::finishCreation):
See the last paragraph of https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects

LayoutTests:

* js/script-tests/typedarray-constructors.js:
* js/script-tests/typedarray-prototype.js:
* js/typedarray-constructors-expected.txt:
* js/typedarray-prototype-expected.txt:

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

4 years agoWeb Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters)
joepeck@webkit.org [Thu, 30 Jun 2016 04:19:42 +0000 (04:19 +0000)]
Web Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters)
https://bugs.webkit.org/show_bug.cgi?id=158334
<rdar://problem/26615366>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype._getProperties):
(InjectedScript.prototype._propertyDescriptors):
Do not create fake value property descriptors for native accessors
unless requested. This means, getProperties for a native prototype
should return  accessors for native accessors just like it does
for normal non-native accessors (getters/setters).

(InjectedScript.prototype.getProperties):
Do not produce fake value accessors for native accessors.

(InjectedScript.prototype.getDisplayableProperties):
(InjectedScript.RemoteObject.prototype._generatePreview):
Do produce fake value accessors for native accessors.

LayoutTests:

* inspector/runtime/getProperties-expected.txt:
* inspector/runtime/getProperties.html:
Improve output for accessors now that getProperties
returns real accessor descriptors for native accessors
instead of fake value descriptors.

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

4 years agoDemo and JS implementation of our spring() animation
dino@apple.com [Thu, 30 Jun 2016 04:17:33 +0000 (04:17 +0000)]
Demo and JS implementation of our spring() animation
timing function.

* demos/spring/index.html: Added.
* demos/spring/spring.js: Added.
(SpringSolver):
(SpringSolver.prototype.solve):

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

4 years agoJSGlobalLexicalEnvironment needs a toThis implementation
sbarati@apple.com [Thu, 30 Jun 2016 03:55:34 +0000 (03:55 +0000)]
JSGlobalLexicalEnvironment needs a toThis implementation
https://bugs.webkit.org/show_bug.cgi?id=159285

Reviewed by Mark Lam.

This was a huge oversight of my original implementation. It gave users
of the language direct access to the JSGlobalLexicalEnvironment object.

* runtime/JSGlobalLexicalEnvironment.cpp:
(JSC::JSGlobalLexicalEnvironment::isConstVariable):
(JSC::JSGlobalLexicalEnvironment::toThis):
* runtime/JSGlobalLexicalEnvironment.h:
(JSC::JSGlobalLexicalEnvironment::isEmpty):
* tests/stress/global-lexical-environment-to-this.js: Added.
(assert):
(let.f):
(let.fStrict):

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

4 years agoSmall change to wording, and link to the interactive version.
dino@apple.com [Thu, 30 Jun 2016 02:34:22 +0000 (02:34 +0000)]
Small change to wording, and link to the interactive version.

* blog-files/color-gamut/index.html:

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

4 years agoUnreviewed, CMake build fix - 2.
hs85.jeong@samsung.com [Thu, 30 Jun 2016 02:09:16 +0000 (02:09 +0000)]
Unreviewed, CMake build fix - 2.

* PlatformMac.cmake:

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

4 years agoSource/WebCore:
hs85.jeong@samsung.com [Thu, 30 Jun 2016 01:03:27 +0000 (01:03 +0000)]
Source/WebCore:
Unreviewed, CMake build fix.

* PlatformMac.cmake:

Source/WebKit2:
Unreviewed, CMake build fix.

* PlatformMac.cmake:

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

4 years agoUnprefix webkit-playsinline.
jer.noble@apple.com [Thu, 30 Jun 2016 00:12:07 +0000 (00:12 +0000)]
Unprefix webkit-playsinline.
https://bugs.webkit.org/show_bug.cgi?id=159283

Reviewed by Eric Carlson.

Tests: media/video-playsinline.html
       media/video-webkit-playsinline.html

Unprefix the webkit-playsinline content attribute, as an unprefixed version
was added to the HTML spec by <https://github.com/whatwg/html/pull/1444>.
The new 'playsinline' content attribute reflects to a new DOM property of
the same name.

* html/HTMLAttributeNames.in:
* html/HTMLVideoElement.idl:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):

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

4 years agoWeb Inspector: Wrong function name next to scope
joepeck@webkit.org [Wed, 29 Jun 2016 23:59:35 +0000 (23:59 +0000)]
Web Inspector: Wrong function name next to scope
https://bugs.webkit.org/show_bug.cgi?id=158210
<rdar://problem/26543093>

Reviewed by Brian Burg.

Source/JavaScriptCore:

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add DebuggerLocation. A helper for describing a unique location.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setConstantRegisters):
When compiled with debug info, add a SymbolTable rare data pointer
back to the CodeBlock. This will be used later to get JSScope debug
info if Web Inspector pauses.

* runtime/SymbolTable.h:
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::cloneScopePart):
(JSC::SymbolTable::prepareForTypeProfiling):
(JSC::SymbolTable::uniqueIDForVariable):
(JSC::SymbolTable::uniqueIDForOffset):
(JSC::SymbolTable::globalTypeSetForOffset):
(JSC::SymbolTable::globalTypeSetForVariable):
Rename rareData and include a CodeBlock pointer.

(JSC::SymbolTable::rareDataCodeBlock):
(JSC::SymbolTable::setRareDataCodeBlock):
Setter and getter for the rare data. It should only be set once.

(JSC::SymbolTable::visitChildren):
Visit the rare data code block if we have one.

* debugger/DebuggerLocation.cpp: Added.
(JSC::DebuggerLocation::DebuggerLocation):
* debugger/DebuggerLocation.h: Added.
(JSC::DebuggerLocation::DebuggerLocation):
Construction from a ScriptExecutable.

* runtime/JSScope.cpp:
(JSC::JSScope::symbolTable):
* runtime/JSScope.h:
* debugger/DebuggerScope.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::name):
(JSC::DebuggerScope::location):
Name and location for a scope. This uses:
JSScope -> SymbolTable -> CodeBlock -> Executable

* inspector/protocol/Debugger.json:
* inspector/InjectedScriptSource.js:
(InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
(InjectedScript.CallFrameProxy._createScopeJson):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::valueForScopeType):
(Inspector::valueForScopeLocation):
(Inspector::JSJavaScriptCallFrame::scopeDescriptions):
(Inspector::JSJavaScriptCallFrame::scopeType): Deleted.
* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFramePrototype.cpp:
(Inspector::JSJavaScriptCallFramePrototype::finishCreation):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeDescriptions):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeType): Deleted.
Simplify this code to build the objects we will send across the protocol
to descript a Scope.

Source/WebInspectorUI:

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Include new payload data in the construction call.
All the new data is optional, so we gracefully handle
legacy backends.

* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get type):
(WebInspector.ScopeChainNode.prototype.get objects):
(WebInspector.ScopeChainNode.prototype.get name):
(WebInspector.ScopeChainNode.prototype.get location):
(WebInspector.ScopeChainNode.prototype.get hash):
Hash is a rough (name:sourceId:line:column) string for quick comparisons.

(WebInspector.ScopeChainNode.prototype.makeLocalScope):
Make this an action you take on a scope, to avoid having to
do it at construction time, or making it a generic setting.

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
This was wrong before. Move the work to CallFrame
and change it to be correct.

* UserInterface/CallFrame.js:
(WebInspector.CallFrame.prototype.mergedScopeChain):

This transforms the scope chain for a call frame from:

     scope1  scope2  scope3  scope4  scope5  scope6  scope7
      foo     foo     foo     bar     bar      -       -
     Block  Closure Closure Closure Closure   GLE     GBL

To:
     scope1  scope2&3   scope4&5  scope6  scope7
      foo      foo*       bar*      -       -
     Block    Local     Closure    GLE     GBL

Doing a few things:

    - Merge the first two Closure scopes sharing a location.
      These are the "var" and "let" Closure scopes in a function,
      and it is better to present these together in the UI.

    - Mark the first Closure scope within a function (*). When
      this is displayed in the UI, we can provide the name of
      the function: "Closure Scope (name)", and we even have
      location information that we can use to display a goto
      arrow if needed.

    - Make the first Closure scope the Local scope if it
      matches the Call Frame's function name. This lets us
      display the section as "Local Variables".

LayoutTests:

* inspector/debugger/paused-scopes-expected.txt: Added.
* inspector/debugger/paused-scopes.html: Added.
* inspector/debugger/resources/paused-scopes.js: Added.
Test dumps the call frames and scope chains for each call frame
when pausing at different locations in a program. Outputting
the hashes we can see even identically named functions have
different hashes because their location is different.

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

4 years agoFix null dereferencing after r201441
achristensen@apple.com [Wed, 29 Jun 2016 23:28:16 +0000 (23:28 +0000)]
Fix null dereferencing after r201441
https://bugs.webkit.org/show_bug.cgi?id=159282
rdar://problem/27082559

Reviewed by Andreas Kling.

No new tests.  This is reproducible when dragging from regular to high-DPI displays,
and we don't have testing infrastructure for simulating that.

* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::styleResolverChanged):
MediaQueryListListener::queryChanged can mutate the Vector of listeners while we are iterating it.
Copy the Vector of listeners and iterate the copy so we don't go out of bounds.

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

4 years agoWeb Inspector: Uncaught Exception page never shows if exception is thrown while proce...
bburg@apple.com [Wed, 29 Jun 2016 23:05:55 +0000 (23:05 +0000)]
Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
https://bugs.webkit.org/show_bug.cgi?id=159182

Reviewed by Joseph Pecoraro.

Since we catch exceptions raised during the handling of protocol responses and events, there
is no way for these exceptions to trigger the global exception handler that shows the Uncaught
Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.

Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
a free-form map of strings to strings for storing additional information such as message data.
Pass the error and any other relevant details to this entry point, which decides whether to
show the uncaught exception reporter or quietly log the error to Inspector^2 console.

In future patches, I would like to do the following once the common errors are fixed:
 - enable reporting via Uncaught Exception Reporter for all engineering builds
 - move internal console.error call sites to use WebInspector.reportInternalError

* UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
exception reporter sheet or does console.error. It also adds a console.assert that could
cause the debugger to pause if desired.

* UserInterface/Debug/UncaughtExceptionReporter.css:
(.sheet-container): Make the report scrollable now that we could potentially show a lot of text.

* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleError): Also pass along the 'details' poperty.
(formattedEntry): Refactor the code so it additionally prints out the keys and values of
the 'details' property. It does not do any coercions, so callers must convert values to strings.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
(InspectorBackendClass.prototype._dispatchResponseToCallback):
(InspectorBackendClass.prototype._dispatchEvent):
Report uncaught exceptions via WebInspector.reportInternalError.

(InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.

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

4 years agoFactor pending CSS resources into a struct
antti@apple.com [Wed, 29 Jun 2016 23:01:42 +0000 (23:01 +0000)]
Factor pending CSS resources into a struct
https://bugs.webkit.org/show_bug.cgi?id=159268

Reviewed by Andreas Kling.

To fix resource loading related re-entrancy issues in StyleResolver we should move the triggering of
resource loads outside the style resolver. The first step for that is to capture pending resources to a struct.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
* css/CSSCursorImageValue.h:
* css/CSSGradientValue.cpp:
(WebCore::GradientStop::GradientStop):
(WebCore::CSSGradientValue::gradientWithStylesResolved):
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::loadSubimages):
(WebCore::CSSGradientValue::CSSGradientValue):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
(WebCore::CSSImageSetValue::cachedOrPendingImageSet):
* css/CSSImageSetValue.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::State::setParentStyle):
(WebCore::StyleResolver::State::ensurePendingResources):
(WebCore::isAtShadowBoundary):
(WebCore::StyleResolver::cachedOrPendingFromValue):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::setOrPendingFromValue):
(WebCore::StyleResolver::cursorOrPendingFromValue):
(WebCore::filterOperationForType):
(WebCore::StyleResolver::createFilterOperations):
(WebCore::StyleResolver::loadPendingResources):
(WebCore::StyleResolver::MatchedProperties::MatchedProperties):
(WebCore::StyleResolver::loadPendingSVGDocuments): Deleted.
(WebCore::StyleResolver::loadPendingImage): Deleted.
(WebCore::StyleResolver::loadPendingShapeImage): Deleted.
(WebCore::StyleResolver::loadPendingImages): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::rootElementStyle):
(WebCore::StyleResolver::element):
(WebCore::StyleResolver::document):
(WebCore::StyleResolver::documentSettings):
(WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::State::applyPropertyToRegularStyle):
(WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::State::setFontDirty):
(WebCore::StyleResolver::State::fontDirty):
(WebCore::StyleResolver::State::useSVGZoomRules):
(WebCore::StyleResolver::State::takePendingResources):
(WebCore::StyleResolver::State::cssToLengthConversionData):
(WebCore::StyleResolver::State::cascadeLevel):
(WebCore::StyleResolver::State::setCascadeLevel):
(WebCore::StyleResolver::state):
(WebCore::StyleResolver::State::pendingImageProperties): Deleted.
(WebCore::StyleResolver::State::filtersWithPendingSVGDocuments): Deleted.
* style/StylePendingResources.cpp: Added.
(WebCore::Style::loadPendingImage):
(WebCore::Style::loadPendingImages):
(WebCore::Style::loadPendingSVGFilters):
(WebCore::Style::loadPendingResources):

    Move the functions for triggering the resource loads from StyleResolver.

* style/StylePendingResources.h: Added.

    Add struct for pending resources.

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

4 years agoAdd "type" and "paymentPass" properties in PaymentMethod
andersca@apple.com [Wed, 29 Jun 2016 22:41:15 +0000 (22:41 +0000)]
Add "type" and "paymentPass" properties in PaymentMethod
https://bugs.webkit.org/show_bug.cgi?id=159278
rdar://problem/26999112

Reviewed by Dean Jackson.

* Modules/applepay/cocoa/PaymentMethodCocoa.mm:
(WebCore::toString):
(WebCore::toDictionary):

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

4 years agoWe don't emit TDZ checks for call_eval
sbarati@apple.com [Wed, 29 Jun 2016 22:34:03 +0000 (22:34 +0000)]
We don't emit TDZ checks for call_eval
https://bugs.webkit.org/show_bug.cgi?id=159277
<rdar://problem/27018801>

Reviewed by Benjamin Poulain.

This is a problem if you're trying to call a TDZ variable
that is named 'eval'.

* bytecompiler/NodesCodegen.cpp:
(JSC::EvalFunctionCallNode::emitBytecode):
* tests/stress/variable-named-eval-under-tdz.js: Added.
(shouldThrowTDZ):
(test):
(test.foo):
(throw.new.Error):

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

4 years agoAdd media_icon to WebKit2
bdakin@apple.com [Wed, 29 Jun 2016 22:18:38 +0000 (22:18 +0000)]
Add media_icon to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=159273
-and corresponding-
rdar://problem/27087714

Reviewed by Dean Jackson.

* Resources/mediaIcon.pdf: Added.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoAdd support for collecting cumulative LLINT stats via a JSC_llintStatsFile option.
mark.lam@apple.com [Wed, 29 Jun 2016 22:00:02 +0000 (22:00 +0000)]
Add support for collecting cumulative LLINT stats via a JSC_llintStatsFile option.
https://bugs.webkit.org/show_bug.cgi?id=159274

Reviewed by Keith Miller.

Source/JavaScriptCore:

* jsc.cpp:
(main):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
(JSC::LLInt::Data::finalizeStats):
(JSC::LLInt::compareStats):
(JSC::LLInt::Data::dumpStats):
(JSC::LLInt::Data::ensureStats):
(JSC::LLInt::Data::loadStats):
(JSC::LLInt::Data::resetStats):
(JSC::LLInt::Data::saveStats):
* llint/LLIntData.h:
(JSC::LLInt::Data::opcodeStats):
* runtime/Options.cpp:
(JSC::Options::isAvailable):
(JSC::recomputeDependentOptions):
(JSC::Options::initialize):
* runtime/Options.h:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain):

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

4 years agoMarking perf/rel-list-remove.html as flaky on ios-simulator
ryanhaddad@apple.com [Wed, 29 Jun 2016 21:54:50 +0000 (21:54 +0000)]
Marking perf/rel-list-remove.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=156561

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoDestructuring variable declaration is missing a validation of the syntax of a sub...
sbarati@apple.com [Wed, 29 Jun 2016 21:48:17 +0000 (21:48 +0000)]
Destructuring variable declaration is missing a validation of the syntax of a sub production when there is a rhs
https://bugs.webkit.org/show_bug.cgi?id=159267

Reviewed by Mark Lam.

Source/JavaScriptCore:

We were parsing something without checking if it had a syntax error.
This is wrong for many reasons, but it could actually cause a crash
in a debug build if you parsed particular programs.

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

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

4 years agoAX: Crash in WebCore::Document::focusNavigationStartingNode(WebCore::FocusDirection...
n_wang@apple.com [Wed, 29 Jun 2016 21:23:29 +0000 (21:23 +0000)]
AX: Crash in WebCore::Document::focusNavigationStartingNode(WebCore::FocusDirection) const + 128
https://bugs.webkit.org/show_bug.cgi?id=159240

Reviewed by Ryosuke Niwa.

Source/WebCore:

This crash is caused by passing an empty node to ElementTraversal::previous(Node&). When the
focusNavigationStartingNode has been removed and it has no next sibling, we should fallback
to itself for calculating the next focused element.

Test: fast/events/remove-focus-navigation-starting-point-crash.html

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

LayoutTests:

* fast/events/remove-focus-navigation-starting-point-crash-expected.txt: Added.
* fast/events/remove-focus-navigation-starting-point-crash.html: Added.
* platform/ios-simulator/TestExpectations:

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

4 years agoMarking animations/multiple-backgrounds.html as flaky on ios-simulator.
ryanhaddad@apple.com [Wed, 29 Jun 2016 20:59:04 +0000 (20:59 +0000)]
Marking animations/multiple-backgrounds.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=150942

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoUnreviewed, rolling out r202617.
ryanhaddad@apple.com [Wed, 29 Jun 2016 20:17:44 +0000 (20:17 +0000)]
Unreviewed, rolling out r202617.

The LayoutTest from this change crashes under GuardMalloc

Reverted changeset:

"Throw exceptions for invalid number of channels for
ConvolverNode"
https://bugs.webkit.org/show_bug.cgi?id=159238
http://trac.webkit.org/changeset/202617

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

4 years agoRename addressFields to contactFields
andersca@apple.com [Wed, 29 Jun 2016 20:14:30 +0000 (20:14 +0000)]
Rename addressFields to contactFields
https://bugs.webkit.org/show_bug.cgi?id=159271
rdar://problem/27086955

Reviewed by Beth Dakin.

Source/WebCore:

* Modules/applepay/ApplePaySession.cpp:
(WebCore::createContactFields):
(WebCore::isValidPaymentRequestPropertyName):
(WebCore::createPaymentRequest):
(WebCore::createAddressFields): Deleted.
* Modules/applepay/PaymentRequest.h:
(WebCore::PaymentRequest::requiredBillingContactFields):
(WebCore::PaymentRequest::setRequiredBillingContactFields):
(WebCore::PaymentRequest::requiredShippingContactFields):
(WebCore::PaymentRequest::setRequiredShippingContactFields):
(WebCore::PaymentRequest::requiredBillingAddressFields): Deleted.
(WebCore::PaymentRequest::setRequiredBillingAddressFields): Deleted.
(WebCore::PaymentRequest::requiredShippingAddressFields): Deleted.
(WebCore::PaymentRequest::setRequiredShippingAddressFields): Deleted.

Source/WebKit2:

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<PaymentRequest>::encode):
(IPC::ArgumentCoder<PaymentRequest>::decode):
(IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode):
(IPC::ArgumentCoder<PaymentRequest::ContactFields>::decode):
(IPC::ArgumentCoder<PaymentRequest::AddressFields>::encode): Deleted.
(IPC::ArgumentCoder<PaymentRequest::AddressFields>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toPKAddressField):
(WebKit::toPKPaymentRequest):

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

4 years agoUnreviewed, third attempt to fix ASAN build for r202599
jiewen_tan@apple.com [Wed, 29 Jun 2016 19:54:23 +0000 (19:54 +0000)]
Unreviewed, third attempt to fix ASAN build for r202599

* platform/text/TextCodecReplacement.cpp:
(WebCore::TextCodecReplacement::decode):

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

4 years agoAdopt MediaRemote.
jer.noble@apple.com [Wed, 29 Jun 2016 19:29:07 +0000 (19:29 +0000)]
Adopt MediaRemote.
https://bugs.webkit.org/show_bug.cgi?id=159250

Reviewed by Eric Carlson.

Source/WebCore:

Adopt MediaRemote and use the framework to implement MediaSessionManageMac
and RemoteCommandListenerMac.

* WebCore.xcodeproj/project.pbxproj:
* platform/RemoteCommandListener.cpp:
* platform/audio/PlatformMediaSessionManager.cpp:
* platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.cpp.
(PlatformMediaSessionManager::updateSessionState):
* platform/audio/mac/MediaSessionManagerMac.h: Added.
* platform/audio/mac/MediaSessionManagerMac.mm: Added.
(WebCore::PlatformMediaSessionManager::sharedManager):
(WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
(WebCore::MediaSessionManagerMac::MediaSessionManagerMac):
(WebCore::MediaSessionManagerMac::~MediaSessionManagerMac):
(WebCore::MediaSessionManagerMac::sessionWillBeginPlayback):
(WebCore::MediaSessionManagerMac::removeSession):
(WebCore::MediaSessionManagerMac::sessionWillEndPlayback):
(WebCore::MediaSessionManagerMac::clientCharacteristicsChanged):
(WebCore::MediaSessionManagerMac::nowPlayingEligibleSession):
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
* platform/cocoa/SoftLinking.h:
* platform/mac/MediaRemoteSoftLink.cpp: Added.
* platform/mac/MediaRemoteSoftLink.h: Added.
* platform/mac/RemoteCommandListenerMac.h: Added.
(WebCore::RemoteCommandListenerMac::createWeakPtr):
* platform/mac/RemoteCommandListenerMac.mm: Added.
(WebCore::RemoteCommandListener::create):
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):
(WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac):
* platform/spi/mac/MediaRemoteSPI.h: Added.

Source/WebKit2:

Add a sandbox exception allowing access to the mediaremoted XPC service.

* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

Add USE_MEDIAREMOTE.

* wtf/Platform.h:

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

4 years agoCannot clear a MediaSource SourceBuffer in Safari 9 and WebKit nightly
jer.noble@apple.com [Wed, 29 Jun 2016 19:22:59 +0000 (19:22 +0000)]
Cannot clear a MediaSource SourceBuffer in Safari 9 and WebKit nightly
https://bugs.webkit.org/show_bug.cgi?id=159230

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-remove.html (modified)

Move to using a MediaTime directly (rather than as a double) to add
and removed buffered ranges. Also, drop the use of the "microsecond"
fudge factor when adding buffered ranges.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

LayoutTests:

* media/media-source/media-source-remove.html:
* media/media-source/media-source-remove-expected.txt:

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

4 years agoWKWebView should ask WKNavigationDelegate about bad ssl certificates
commit-queue@webkit.org [Wed, 29 Jun 2016 19:19:24 +0000 (19:19 +0000)]
WKWebView should ask WKNavigationDelegate about bad ssl certificates
https://bugs.webkit.org/show_bug.cgi?id=159176
Source/WebKit2:

rdar://problem/26864882

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-29
Reviewed by Sam Weinig.

This can be tested manually by visiting a site in MiniBrowser that has invalid ssl certificates, but we don't have proper ssl testing yet.
Before this change, we would just open the site as if nothing were invalid, now we call the WKNavigationDelegate's didReceiveAuthenticationChallenge
like we did before using NSURLSession, and we do not open the page, also like we did before using NSURLSession.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
When using NSURLConnection and responding to canAuthenticateAgainstProtectionSpace with YES,
we get an NSURLAuthenticationChallenge when a bad ssl certificate is encountered in the handshake.
When using NSURLSession, we want to call webView:didReceiveAuthenticationChallenge:completionHandler: in this case.
The default implementation of NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace returns true
if there is an implementation of webView:didReceiveAuthenticationChallenge:completionHandler: in its WKNavigationDelegate.
Internal clients can implement _webView:canAuthenticateAgainstProtectionSpace:
and Safari uses canHandleHTTPSServerTrustEvaluation, so it will be unaffected.

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-29
Reviewed by Sam Weinig.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:didFinishLoadingNavigation:]):
(-[WK2BrowserWindowController webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[WK2BrowserWindowController webView:didFailNavigation:withError:]):

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

4 years agoDelete WKElementInfo since it's not used
bdakin@apple.com [Wed, 29 Jun 2016 18:48:06 +0000 (18:48 +0000)]
Delete WKElementInfo since it's not used
https://bugs.webkit.org/show_bug.cgi?id=159265

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WebKit.h:
* UIProcess/API/Cocoa/WKElementInfo.h: Removed.
* UIProcess/API/Cocoa/WKElementInfo.mm: Removed.
* UIProcess/API/Cocoa/WKElementInfoInternal.h: Removed.
* UIProcess/API/Cocoa/WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/WKPreviewElementInfo.mm:
(-[WKPreviewElementInfo _initWithLinkURL:]):
(-[WKPreviewElementInfo copyWithZone:]):
(-[WKPreviewElementInfo linkURL]):
* UIProcess/API/Cocoa/WKPreviewElementInfoInternal.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm:
(-[_WKContextMenuElementInfo copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoUnreviewed, second attempt to fix ASAN build for r202599
jiewen_tan@apple.com [Wed, 29 Jun 2016 18:43:25 +0000 (18:43 +0000)]
Unreviewed, second attempt to fix ASAN build for r202599

* platform/text/TextCodecReplacement.cpp:

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

4 years agoUnreviewed, first attempt to fix ASAN build for r202599
jiewen_tan@apple.com [Wed, 29 Jun 2016 18:40:35 +0000 (18:40 +0000)]
Unreviewed, first attempt to fix ASAN build for r202599

* platform/text/TextCodecReplacement.cpp:

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

4 years agoWeb Inspector: Show Shadow Root type in DOM Tree
commit-queue@webkit.org [Wed, 29 Jun 2016 18:36:29 +0000 (18:36 +0000)]
Web Inspector: Show Shadow Root type in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=159236
<rdar://problem/27068521>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-29
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:
Include optional shadowRootType property for DOMNodes.

Source/WebCore:

Test: inspector/dom/shadowRootType.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::shadowRootType):
(WebCore::InspectorDOMAgent::buildObjectForNode):
Set the shadowRootType property when a node is a ShadowRoot.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
"Shadow Content (type)" string.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.shadowRoots):
(WebInspector.DOMNode.prototype.shadowRootType):
Initialize state and add accessors.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
Better string when an element is a Shadow Root.

* UserInterface/Views/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent):
Better to check the Shadow Root type.

* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom .html-fragment.shadow):
Opacity looks poor when there is a selection. Switch to gray.

LayoutTests:

* inspector/dom/shadowRootType-expected.txt: Added.
* inspector/dom/shadowRootType.html: Added.

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

4 years agoUnreviewed, rolling out r202627.
commit-queue@webkit.org [Wed, 29 Jun 2016 18:25:40 +0000 (18:25 +0000)]
Unreviewed, rolling out r202627.
https://bugs.webkit.org/show_bug.cgi?id=159266

patch is broken on arm (Requested by keith_miller on #webkit).

Reverted changeset:

"LLInt should support other types of prototype GetById
caching."
https://bugs.webkit.org/show_bug.cgi?id=158083
http://trac.webkit.org/changeset/202627

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 29 Jun 2016 18:17:26 +0000 (18:17 +0000)]
Versioning.

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

4 years ago[JSC] Fix small issues of TypedArray prototype
commit-queue@webkit.org [Wed, 29 Jun 2016 18:16:33 +0000 (18:16 +0000)]
[JSC] Fix small issues of TypedArray prototype
https://bugs.webkit.org/show_bug.cgi?id=159248

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-29
Reviewed by Saam Barati.

Source/JavaScriptCore:

First, TypedArray's toString and Array's toString
should be the same function.
I moved the function to GlobalObject and each array type
gets it as needed.

Then TypedArray length was supposed to be configurable.
I removed the "DontDelete" flag accordingly.

* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::arrayProtoToStringFunction):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):

LayoutTests:

* js/script-tests/typedarray-prototype.js: Added.
* js/typedarray-prototype-expected.txt: Added.
* js/typedarray-prototype.html: Added.

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

4 years agoReplace MPAudioVideoRoutingActionSheet with MPAVRoutingSheet.
commit-queue@webkit.org [Wed, 29 Jun 2016 17:42:01 +0000 (17:42 +0000)]
Replace MPAudioVideoRoutingActionSheet with MPAVRoutingSheet.
https://bugs.webkit.org/show_bug.cgi?id=159161
<rdar://problem/26017691>

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-06-29
Reviewed by Sam Weinig.

Source/WebCore:

Replace MPAudioVideoRoutingActionSheet SPI with MPAVRoutingSheet SPI.

* platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit2:

MPAudioVideoRoutingActionSheet is being replaced by MPAVRoutingSheet,
with only minor changes to the interface.

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):

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

4 years agoWebRTC: ice-char can not contain '=' characters for credentials
commit-queue@webkit.org [Wed, 29 Jun 2016 17:36:33 +0000 (17:36 +0000)]
WebRTC: ice-char can not contain '=' characters for credentials
https://bugs.webkit.org/show_bug.cgi?id=159207

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-06-29
Reviewed by Eric Carlson.

Source/WebCore:

Avoid a general calculation to get a base64 without padding which
was wrong in the randomString function. Because each parameter
using the function requires a different setup depending of the
specification and this is not a general API, it is a better
solution to calculate and store the sizes we want to use, comment
them and test them, considering we use base64 to generate the
strings we just need to avoid padding.

Existing test modified to match the correct behavior.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::randomString): Now the size is the one passed.
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
Used different valid values following the sdp parser in each case.

LayoutTests:

Modified the parser to make the regexp similar to the one we have
in WebCore.

* fast/mediastream/resources/sdp-utils.js:
(printComparableSessionDescription):

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

4 years agoLLInt should support other types of prototype GetById caching.
commit-queue@webkit.org [Wed, 29 Jun 2016 16:53:25 +0000 (16:53 +0000)]
LLInt should support other types of prototype GetById caching.
https://bugs.webkit.org/show_bug.cgi?id=158083

Recently, we started supporting prototype load caching for get_by_id
in the LLInt. This patch is expading the caching strategy to enable
cache the prototype accessor and custom acessors.

Similarly to the get_by_id_proto_load bytecode, we are adding new
bytecodes called get_by_id_proto_accessor that uses the calculated
offset of a object to call a getter function and get_by_id_proto_custom
that stores the pointer to the custom function and call them directly
from LowLevelInterpreter.

Patch by Caio Lima <ticaiolima@gmail.com> on 2016-06-29
Reviewed by Keith Miller

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

4 years agoCrash when 'input' event handler for input[type=color] changes the input type
ddkilzer@apple.com [Wed, 29 Jun 2016 16:50:21 +0000 (16:50 +0000)]
Crash when 'input' event handler for input[type=color] changes the input type
<https://webkit.org/b/159262>
<rdar://problem/27020404>

Reviewed by Daniel Bates.

Source/WebCore:

Fix based on a Blink change (patch by <tkent@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/a17cb3ecef49a078657524cdeaba33ad2083646c>

Test: fast/forms/color/color-type-change-on-input-crash.html

* html/ColorInputType.cpp:
(WebCore::ColorInputType::didChooseColor): Add EventQueueScope
before setValueFromRenderer() to fix the bug.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::setValueFromRenderer): Add comment
about how to use this method.

LayoutTests:

Test based on a Blink change (patch by <tkent@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/a17cb3ecef49a078657524cdeaba33ad2083646c>

* fast/forms/color/color-type-change-on-input-crash-expected.txt: Added.
* fast/forms/color/color-type-change-on-input-crash.html: Added.

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

4 years agoWebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
adam.bergkvist@ericsson.com [Wed, 29 Jun 2016 16:18:38 +0000 (16:18 +0000)]
WebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
https://bugs.webkit.org/show_bug.cgi?id=159132

Reviewed by Eric Carlson.

Source/WebCore:

Use the WEB_RTC build flag instead of MEDIA_STREAM since this event is related to
RTCPeerConnection. Also remove PassRefPtr usage.

Updated existing expected results.

* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::create):
(WebCore::MediaStreamEvent::MediaStreamEvent):
* Modules/mediastream/MediaStreamEvent.h:
* Modules/mediastream/MediaStreamEvent.idl:
* dom/EventNames.in:

LayoutTests:

Update skip lists and expected results to not expect the MediaStreamEvent constructor in
the global scope (it's under the WEB_RTC build flag).

* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
(all above) Remove expected results associated with MediaStreamEvent constructor.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
Skip MediaStreamEvent constructor test on ports that dont't build with WEB_RTC yet.

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

4 years agoREGRESSION(r202337) [WebRTC] Crash when loading html5test.com
adam.bergkvist@ericsson.com [Wed, 29 Jun 2016 16:10:44 +0000 (16:10 +0000)]
REGRESSION(r202337) [WebRTC] Crash when loading html5test.com
https://bugs.webkit.org/show_bug.cgi?id=159145

Reviewed by Eric Carlson.

MediaEndpointPeerConnection uses an implementation of the MediaEndpoint interface to
interact with the port's WebRTC backend. A mock (MockMediaEndpoint) is used for testing.
This change adds an "empty" MediaEndpoint implementation that simplifies the case when a
port builds and tests with MediaEndpointPeerConnection/MockMediaEndpoint, but doesn't have
a "real" MediaEndpoint implementation yet (to use with MiniBrowser).

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
* platform/mediastream/MediaEndpoint.cpp:
(WebCore::EmptyRealtimeMediaSource::create):
(WebCore::EmptyRealtimeMediaSource::EmptyRealtimeMediaSource):
(WebCore::EmptyMediaEndpoint::EmptyMediaEndpoint):
(WebCore::createMediaEndpoint):

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

4 years ago[GTK] Fix the expectations for crypto/subtle tests after r202535.
clopez@igalia.com [Wed, 29 Jun 2016 13:14:49 +0000 (13:14 +0000)]
[GTK] Fix the expectations for crypto/subtle tests after r202535.
https://bugs.webkit.org/show_bug.cgi?id=159260

Unreviewed.

* platform/gtk/TestExpectations: Skip properly the crypto/subtle tests.

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

4 years ago[GTK] Add missing install dependency after r202619
clopez@igalia.com [Wed, 29 Jun 2016 12:21:21 +0000 (12:21 +0000)]
[GTK] Add missing install dependency after r202619
https://bugs.webkit.org/show_bug.cgi?id=156716

Unreviewed.

* gtk/install-dependencies: Missed to add the GLES headers that are needed for building mesa on Debian.

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

4 years agoToo much duplicated code in LayerTreeHosts implementations
carlosgc@webkit.org [Wed, 29 Jun 2016 12:16:41 +0000 (12:16 +0000)]
Too much duplicated code in LayerTreeHosts implementations
https://bugs.webkit.org/show_bug.cgi?id=159144

Reviewed by Žan Doberšek.

There's some code common and duplicated in all current LayerTreeHosts implementations (Gtk, Coordinated, and
ThreadedCoordinated). The thing is even worse in the case of ThreadedCoordinated and Coordinated, where the
former is actually a special case of the later, and it seems like code was copy pasted and then modified to add
ThreadedCoordinated specific code. The problem of that approach, apart from the code duplication, is that common
parts end up diverging too. This patch moves the common parts to the base class LayerTreeHost and makes
ThreadedCoordinatedLayerTreeHost inherit from CoordinatedLayerTreeHost, to share the common code and simply add
the specific one.

* PlatformGTK.cmake:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
(WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
(WebKit::CoordinatedLayerTreeHost::invalidate):
(WebKit::CoordinatedLayerTreeHost::sizeDidChange):
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
(WebKit::CoordinatedLayerTreeHost::commitSceneState):
(WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
(WebKit::CoordinatedLayerTreeHost::cancelPendingLayerFlush): Deleted.
(WebKit::CoordinatedLayerTreeHost::forceRepaint): Deleted.
(WebKit::CoordinatedLayerTreeHost::forceRepaintAsync): Deleted.
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer): Deleted.
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Deleted.
(WebKit::CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Deleted.
(WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
(WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
(WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect):
(WebKit::ThreadedCoordinatedLayerTreeHost::commitSceneState):
(WebKit::ThreadedCoordinatedLayerTreeHost::create): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::didScaleFactorChanged): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::layerHostDidFlushLayers):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::~LayerTreeHost):
(WebKit::LayerTreeHost::setLayerFlushSchedulingEnabled):
(WebKit::LayerTreeHost::pauseRendering):
(WebKit::LayerTreeHost::resumeRendering):
(WebKit::LayerTreeHost::invalidate):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::layerTreeContext):
(WebKit::LayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush):
(WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHost::scrollNonCompositedContents):
(WebKit::LayerTreeHost::graphicsLayerFactory):
(WebKit::LayerTreeHost::contentsSizeChanged):
(WebKit::LayerTreeHost::didChangeViewportProperties):
(WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing):
(WebKit::LayerTreeHost::setViewOverlayRootLayer):
(WebKit::LayerTreeHost::forceRepaintAsync): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::invalidate):
(WebKit::LayerTreeHostGtk::setViewOverlayRootLayer):
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Deleted.
(WebKit::LayerTreeHostGtk::setRootCompositingLayer): Deleted.
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay): Deleted.
(WebKit::LayerTreeHostGtk::scrollNonCompositedContents): Deleted.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

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

4 years agoFix assertion in debug build when creating the SocketStreamHandle object.
alex@webkit.org [Wed, 29 Jun 2016 11:52:32 +0000 (11:52 +0000)]
Fix assertion in debug build when creating the SocketStreamHandle object.

We have to call relaxAdoptionRequirement to avoid the assertion
when protecting the non-adopted SocketStreamHandle we are
creating. Update to r202370.

Rubber-stamped by Carlos Garcia Campos.

* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):

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

4 years ago[GTK][Wayland] Implement support for running the layout tests under a (virtualized...
clopez@igalia.com [Wed, 29 Jun 2016 10:31:40 +0000 (10:31 +0000)]
[GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
https://bugs.webkit.org/show_bug.cgi?id=156716

Reviewed by Carlos Garcia Campos and Michael Catanzaro.

Tools:

* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland
(parse_args):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.__init__):
(GtkPort._driver_class):
(GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests.
(GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional
platform directory for storing the wayland specific layout test results and expectations for ${port}.
For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific
test expectations file on the GTK port when running the tests with the --wayland command line switch.
Baseline search path: gtk-wayland -> gtk -> wk2 -> generic.
* Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb.
(WestonDriver.check_driver):
(WestonDriver.__init__):
(WestonDriver._start):
* Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver.
(WestonXvfbDriverDisplayTest):
(WestonXvfbDriverDisplayTest.__init__):
(WestonXvfbDriverDisplayTest._xvfb_run):
(WestonDriverTest.make_driver):
(WestonDriverTest.test_start):
* gtk/install-dependencies: Add the new dependencies that are required for either building weston,
or to satisfy the pkg-config check of the new added modules in JHBuild.
* gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland
and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones
provided by the system are already new enough.
Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one.
It was the only way to get the software EGL rasterizer working without depending on user drivers.
Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config
feature to avoid building libdrm when the one provided by the system is new enough.
* gtk/jhbuildrc:
* gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added.
Xorg had no support for searching the DRI drivers on a custom path at runtime.
This patch implements support for that reusing the same variable that we use with Mesa to set the
custom path for the DRI drivers path.

LayoutTests:

* platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations.

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

4 years ago[WebRTC][OWR] Bump gst-plugins-openwebrtc jhbuild version to get scream fixes
commit-queue@webkit.org [Wed, 29 Jun 2016 10:28:27 +0000 (10:28 +0000)]
[WebRTC][OWR] Bump gst-plugins-openwebrtc jhbuild version to get scream fixes
https://bugs.webkit.org/show_bug.cgi?id=159256

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-06-29
Reviewed by Philippe Normand.

We need the last fixes in the repository to make the scream queue
work with apprtc.

* gtk/jhbuild.modules:

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

4 years agoThrow exceptions for invalid number of channels for ConvolverNode
ddkilzer@apple.com [Wed, 29 Jun 2016 10:19:36 +0000 (10:19 +0000)]
Throw exceptions for invalid number of channels for ConvolverNode
<https://webkit.org/b/159238>
<rdar://problem/27020410>

Reviewed by Brent Fulgham.

Source/WebCore:

Fix based on a Blink change (patch by <rtoy@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/0cc26bbb7175aec77910d0b47faf9f8c8a640fe5>

Test: webaudio/convolver-channels.html

* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::setBuffer): Throw an exception for
anything but 1, 2 or 4 channels.

LayoutTests:

Test based on a Blink change (patch by <rtoy@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/0cc26bbb7175aec77910d0b47faf9f8c8a640fe5>

compatibility.js based on a Blink change (patch by <rtoy@google.com>):
<https://chromium.googlesource.com/chromium/src.git/+/f846f5a461d1fcdbe5152898576c125058079ed1>

* webaudio/convolver-channels-expected.txt: Added.
* webaudio/convolver-channels.html: Added.
* webaudio/resources/compatibility.js: Added.

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

4 years agoREGRESSION(r198782, r201043): [image-decoders] Flickering with some animated gif
carlosgc@webkit.org [Wed, 29 Jun 2016 07:23:51 +0000 (07:23 +0000)]
REGRESSION(r198782, r201043): [image-decoders] Flickering with some animated gif
https://bugs.webkit.org/show_bug.cgi?id=159089

Reviewed by Antonio Gomes.

There's some flickering when loading big enough animated gifs running the animation in a loop. The first time it
loads everything is fine, but after the first loop iteration there are several flickering effects, once every
time the animation finishes and some others happening in the middle of the animation loop. The flickering
happens because we fail to render some of the frames, and it has two diferent causes:

 - In r198782, ImageDecoder::createFrameImageAtIndex(), was modified to check first if the image is empty to
return early, and then try to get the frame image from the decoder. This is the aone causing the flickering
always on the first frame after one iteration. It happens because ImageDecoder::size() is always empty at that
point. The first time doesn't happen because the gif is loaded and BitmapImage calls isSizeAvailable() from
BitmapImage::dataChanged(). The isSizeAvailable call makes the gif decoder calculate the size. But for the next
iterations, frames are cached and BitmapImage already has the decoded data so isSizeAvailable is not called
again. When createFrameImageAtIndex() is called again for the first frame, size is empty until the gif decoder
creates the reader again, which happens when frameBufferAtIndex() is called, so after that the size is
available. So, we could call isSizeAvailable before checking the size, or simply do the check after the
frameBufferAtIndex() call as we used to do.

 - In r201043 BitmapImage::destroyDecodedDataIfNecessary() was fixed to use the actual bytes used by the frame
in order to decide whether to destroy decoded data or not. This actually revealed a bug, it didn't happen before
because we were never destroying frames before. The bug is in the gif decoder that doesn't correctly handle the
case of destroying only some of the frames from the buffer cache. The gif decoder is designed to always process the
frames in order, the reader keeps an index of the currently processed frame, so when some frames are read from the
cache, and then we ask the decoder for a not cached frame, the currently processed frame is not in sync with the
actual frame we are asking for, and we end do not processing any frame at all.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::createFrameImageAtIndex): Check the size after calling frameBufferAtIndex().
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::clearFrameBufferCache): Delete the reader when clearing the cache since it's out of sync.

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

4 years ago[GStreamer] Adaptive streaming issues
carlosgc@webkit.org [Wed, 29 Jun 2016 06:33:57 +0000 (06:33 +0000)]
[GStreamer] Adaptive streaming issues
https://bugs.webkit.org/show_bug.cgi?id=144040

Reviewed by Philippe Normand.

There are multiple deadlocks in the web process when HLS content is loaded by GStreamer. It happens because gst
is using several threads to download manifest, fragments, monitor the downloads, etc. To download the fragments
and manifest it always creates the source element in a separate thread, something that is not actually expected
to happen in WebKit source element. Our source element is always scheduling tasks (start, stop, need-data,
enough-data and seek) to the main thread, and those downloads that use the ResourceHandleStreamingClient
(there's no player associated) also happen in the main thread, because libsoup calls all its async callbacks in
the main thread. So, the result is that it can happen that we end up blocking the main thread in a lock until
the download finishes, but the download never finishes because tasks are scheduled in the main thread that is
blocked in a lock. This can be prevented by always using a secondary thread for downloads made by
ResourceHandleStreamingClient, using its own run loop with a different GMainContext so that libsoup sends
callbacks to the right thread. We also had to refactor the tasks a bit, leaving the thread safe parts to be run
in the calling thread always, and only scheduling to the main thread in case of not using
ResourceHandleStreamingClient and only for the non thread safe parts.
This patch also includes r200455 that was rolled out, but it was a perfectly valid workaround for GST bug.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::ensureGRef): Consume the floating ref if needed.
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init): Check if object is being created in the main thread.
(webKitWebSrcStop): Stop the media resource loader in the main thread and the resource handle streaming in the
current thread.
(webKitWebSrcStart): Start the media resource loader in the main thread and the resource handle streaming in
the current thread.
(webKitWebSrcChangeState): Call webKitWebSrcStart and webKitWebSrcStop in the current thread.
(webKitWebSrcNeedData): Update status in the current thread and notify the media resource loader in the main thread.
(webKitWebSrcEnoughData): Ditto.
(webKitWebSrcSeek): Ditto.
(webKitWebSrcSetMediaPlayer): Add an assert to ensure that source elements used by WebKit are always created in
the main thread.
(ResourceHandleStreamingClient::ResourceHandleStreamingClient): Use a secondary thread to do the download.
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Stop the secondary thread.
(ResourceHandleStreamingClient::setDefersLoading): Notify the secondary thread.

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

4 years agoRemove ThreadableLoaderOptions origin
commit-queue@webkit.org [Wed, 29 Jun 2016 06:25:59 +0000 (06:25 +0000)]
Remove ThreadableLoaderOptions origin
https://bugs.webkit.org/show_bug.cgi?id=159221

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-28
Reviewed by Sam Weinig.

No change of behavior.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadResourceSynchronously): Adding origing parameter.
(WebCore::DocumentThreadableLoader::create): Ditto.
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
(WebCore::DocumentThreadableLoader::redirectReceived): Setting m_origin.
(WebCore::DocumentThreadableLoader::securityOrigin): Checking m_origin.
* loader/DocumentThreadableLoader.h: Adding m_origin member.
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Removing origin.
(WebCore::ThreadableLoaderOption::isolatedCopy): Deleted.
* loader/ThreadableLoader.h: Removing origin parameter and isolatedCopy function.
* loader/WorkerThreadableLoader.cpp:
(WebCore::LoaderTaskOptions::LoaderTaskOptions): Structure to pass loader task options from one thread to another.
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* page/EventSource.cpp:
(WebCore::EventSource::connect): Removing setting of the origin.
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
(WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest): Ditto.

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

4 years agoES6SampleBench should have a harness
fpizlo@apple.com [Wed, 29 Jun 2016 05:55:37 +0000 (05:55 +0000)]
ES6SampleBench should have a harness
https://bugs.webkit.org/show_bug.cgi?id=159246

Reviewed by Saam Barati.

This adds a simple web harness for ES6SampleBench. It runs Air and Basic 10 times for 200
iterations each and reports three metrics:

First iteration: the time it takes for the first iteration to run. This is the first
iteration after the benchmark is loaded into the iframe, so it's representative of what
would happen if one of these workloads only ran for a short time.

Worst 2%: of the last 199 iterations, the average of the worst 2% iterations. If code like
any of these workloads was used in an important event handler, you'd want that code to run
well in the worst case in addition to having great throughput.

Steady state: the total of the last 199 iterations. This is representative of what would
happen if you ran code like this for a long time.

The total score is the geomean of the firstIteration/worstCase/steadyState numbers of the
two benchmarks.

The harness does statistics using Student's T-distribution confidence intervals.

* ES6SampleBench/Basic/benchmark.js:
(Benchmark):
* ES6SampleBench/air_benchmark.js: Added.
* ES6SampleBench/basic_benchmark.js: Added.
* ES6SampleBench/driver.js: Added.
(Driver):
(Driver.prototype.addBenchmark):
(Driver.prototype.start):
(Driver.prototype.reportResult):
(Driver.prototype.reportError):
(Driver.prototype._recomputeSummary.Geomean):
(Driver.prototype._recomputeSummary.Geomean.prototype.add):
(Driver.prototype._recomputeSummary.Geomean.prototype.get result):
(Driver.prototype._recomputeSummary):
(Driver.prototype._iterate):
(Driver.prototype._updateIterations):
* ES6SampleBench/glue.js: Added.
* ES6SampleBench/index.html: Added.
* ES6SampleBench/results.js: Added.
(Results):
(Results.prototype.get benchmark):
(Results.prototype.reset):
(Results.prototype.reportRunning):
(Results.prototype.reportDone):
(Results.prototype.reportResult.averageAbovePercentile):
(Results.prototype.reportResult):
(Results.prototype.reportError):
* ES6SampleBench/stats.js: Added.
(Stats):
(Stats.prototype.reset):
(Stats.prototype.add):
(Stats.prototype.get numIterations):
(Stats.prototype.valueForIteration):
(Stats.get result.tDist):
(Stats.prototype.get result):
(Stats.prototype.toString):
(Stats.prototype._update):
* ES6SampleBench/style.css: Added.
(body):
(body, th, tr):
(h1, h2, h3, h4):
(h1):
(h2):
(h3):
(hr):
(address):
(img):
(.underline):
(ol.loweralpha):
(ol.upperalpha):
(ol.lowerroman):
(ol.upperroman):
(ol.arabic):
(.banner-link:link, .banner-link:visited):
(:link, :visited):
(h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited):
(.anchor:link, .anchor:visited):
(* > .anchor:link, * > .anchor:visited):
(span:hover .anchor):
(a.forbidden, span.forbidden):
(a.missing:hover):
(a.closed:link, a.closed:visited, span.closed):
(pre):
(div.code):
(div.code pre):
(dt):
(dd):
(dd:last-child):
(.site-logo):
(.site-logo .tagline):
(table):
(#contents):
(p):
(p:last-child):
(th):
(td):

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

4 years agoUnreviewed, rolling out r202586 and r202595.
ryanhaddad@apple.com [Wed, 29 Jun 2016 05:04:28 +0000 (05:04 +0000)]
Unreviewed, rolling out r202586 and r202595.
https://bugs.webkit.org/show_bug.cgi?id=159247

These changes broke the iOS build (Requested by ryanhaddad on
#webkit).

Reverted changesets:

"Keep track of when a WKWebView is blank before the initial
non-empty layout"
https://bugs.webkit.org/show_bug.cgi?id=159217
http://trac.webkit.org/changeset/202586

"Try to fix the build."
http://trac.webkit.org/changeset/202595

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-28

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

4 years agoUnreviewed, rolling out r202580.
commit-queue@webkit.org [Wed, 29 Jun 2016 04:49:27 +0000 (04:49 +0000)]
Unreviewed, rolling out r202580.
https://bugs.webkit.org/show_bug.cgi?id=159245

Caused all WKTR tests to fail on GuardMalloc and Production
only for unknown reasons, investigating offline. (Requested by
brrian on #webkit).

Reverted changeset:

"RunLoop::Timer should use constructor templates instead of
class templates"
https://bugs.webkit.org/show_bug.cgi?id=159153
http://trac.webkit.org/changeset/202580

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

4 years agoAX: Add accessibility tests for MathML operators
fred.wang@free.fr [Wed, 29 Jun 2016 04:31:41 +0000 (04:31 +0000)]
AX: Add accessibility tests for MathML operators
https://bugs.webkit.org/show_bug.cgi?id=124836

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Joanmarie Diggs.

We add one test to verify the (sub)roles of MathML operators with various fence and separator
properties. These properties can be set via an explicit attribute or read from the operator
dictionary.

* accessibility/math-mo-fences-and-separators.html: Added.
* platform/gtk/accessibility/math-mo-fences-and-separators-expected.txt: Added.
* platform/mac/accessibility/math-mo-fences-and-separators-expected.txt: Added.

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

4 years agoEnhance shouldNotThrow()/shouldThrow() to accept functions and a descriptive message
ddkilzer@apple.com [Wed, 29 Jun 2016 04:17:36 +0000 (04:17 +0000)]
Enhance shouldNotThrow()/shouldThrow() to accept functions and a descriptive message
<https://webkit.org/b/159232>

Reviewed by Brent Fulgham.

Based on a Blink change (patch by <hongchan@chromium.org>):
<https://src.chromium.org/viewvc/blink?view=revision&revision=192204>

Currently, shouldNotThrow() and shouldThrow() take the following
arguments:

    shouldNotThrow(evalString)
    shouldThrow(evalString, expectedExceptionString)

The challenges with this design are:

    1) The 'evalString' must capture every variable that it
       needs, which means the code can be long, and concatenated
       into a single line.  It would be really nice to be able
       to use an (anonymous) function to capture variables
       instead.
    2) The 'evalString' is literally printed out in the test
       results, which isn't always the most descriptive.  A
       descriptive message would make it clearer what failed.
    3) When changing a shouldThrow() into a shouldNotThrow()
       or copying/pasting code, it's possible to forget to
       remove 'expectedExceptionString' from the function call.

This patch changes the methods to take the following arguments:

    shouldNotThrow(evalString|function [, message])
    shouldThrow(evalString|function, expectedExceptionString [, message])

If 'function' is passed in, then it is invoked instead of
evaluated, and 'message' replaces the literal code in the
pass/fail output.

This patch also adds the global 'didFailSomeTests' variable to
js-test.js, which already exists in js-test-pre.js.  This was
added to js-test-pre.js in r153203 by Oliver Hunt to
LayoutTests/fast/js/resources/js-test-pre.js.

* fast/canvas/webgl/canvas-supports-context-expected.txt:
* fast/canvas/webgl/gl-bind-attrib-location-before-compile-test-expected.txt:
* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
* fast/dom/getElementsByClassName/ASCII-case-insensitive-expected.txt:
* storage/indexeddb/cursor-basics-expected.txt:
* storage/indexeddb/cursor-basics-private-expected.txt:
- Update expected results to include "Some tests fail." since
  some subtests actually do fail during these tests.

* fast/css/parsing-css-lang.html:
* fast/css/parsing-css-matches-1.html:
* fast/css/parsing-css-matches-2.html:
* fast/css/parsing-css-matches-3.html:
* fast/css/parsing-css-matches-4.html:
* fast/css/parsing-css-not-1.html:
* fast/css/parsing-css-not-2.html:
* fast/css/parsing-css-not-3.html:
* fast/css/parsing-css-not-4.html:
* fast/css/parsing-css-nth-child-of-1.html:
* fast/css/parsing-css-nth-child-of-2.html:
* fast/css/parsing-css-nth-last-child-of-1.html:
* fast/css/parsing-css-nth-last-child-of-2.html:
* js/script-tests/arrowfunction-supercall.js:
- Remove expectedExceptionString from shouldNotThrow() calls
  after they were changed from shouldThrow() calls.

* resources/js-test-pre.js:
(shouldNotThrow): Change to invoke first argument if it is a
function, else use eval() as before.  Use second argurment in
place of first argument (if set) when printing results.  NOTE:
Care was taken not to add any lines of code to prevent changes
to test results.
(shouldThrow): Ditto.  Reformat code.
* resources/js-test.js: Declare 'didFailSomeTests'.
(testFailed): Set 'didFailSomeTests' to true when a test fails.
(shouldNotThrow): Same changes as js-test-pre.js.
(shouldThrow): Ditto.
(isSuccessfullyParsed): Output a message if 'didFailSomeTests'
is true.

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

4 years agoWe should not crash there is a finally inside a for-in loop
keith_miller@apple.com [Wed, 29 Jun 2016 04:06:31 +0000 (04:06 +0000)]
We should not crash there is a finally inside a for-in loop
https://bugs.webkit.org/show_bug.cgi?id=159243
<rdar://problem/27018910>

Reviewed by Benjamin Poulain.

Previously we would swap the m_forInContext with an empty vector
then attempt to shrink the size of m_forInContext by the amount
we expected. This meant that if there was more than one ForInContext
on the stack and we wanted to pop exactly one off we would crash.
This patch makes ForInContexts RefCounted so they can be duplicated
into other vectors. It also has ForInContexts copy the entire stack
rather than do the swap that we did before. This makes ForInContexts
work the same as the other contexts.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::pushIndexedForInScope):
(JSC::BytecodeGenerator::pushStructureForInScope):
* bytecompiler/BytecodeGenerator.h:
* tests/stress/finally-for-in.js: Added.
(repeat):
(createSimple):

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

4 years agoRename ChildrenAffectedByActive to StyleAffectedByActive
benjamin@webkit.org [Wed, 29 Jun 2016 04:03:43 +0000 (04:03 +0000)]
Rename ChildrenAffectedByActive to StyleAffectedByActive
https://bugs.webkit.org/show_bug.cgi?id=159187

Reviewed by Antti Koivisto.

Flags named "ChildrenAffectedBy" are used when the invalidation
of children is so crazy that we invalidate the whole parent subtree instead.

That's not the case for :active. It is a straightforward element invalidation.
Consequently, the property is renamed to StyleAffectedByActive.

* dom/Element.cpp:
(WebCore::Element::setActive):
(WebCore::Element::setStyleAffectedByActive):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren):
(WebCore::Element::rareDataStyleAffectedByActive):
(WebCore::Element::setChildrenAffectedByActive): Deleted.
(WebCore::Element::rareDataChildrenAffectedByActive): Deleted.
* dom/Element.h:
(WebCore::Element::styleAffectedByActive):
(WebCore::Element::childrenAffectedByActive): Deleted.
* dom/ElementRareData.h:
(WebCore::ElementRareData::styleAffectedByActive):
(WebCore::ElementRareData::setStyleAffectedByActive):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetDynamicRestyleObservations):
(WebCore::ElementRareData::childrenAffectedByActive): Deleted.
(WebCore::ElementRareData::setChildrenAffectedByActive): Deleted.
* style/StyleRelations.cpp:
(WebCore::Style::commitRelations):

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

4 years agoUse a regex to check if a test step is for JavaScriptCore
commit-queue@webkit.org [Wed, 29 Jun 2016 03:56:18 +0000 (03:56 +0000)]
Use a regex to check if a test step is for JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=159224

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2016-06-28
Reviewed by Geoffrey Garen.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView.prototype.update): Replace array membership test with regex test.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype._parseData): Replace array membership test with regex test.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.appendBuilderQueueStatus): Replace array membership test with regex test.

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

4 years agoUnreviewed, rolling out r202598.
commit-queue@webkit.org [Wed, 29 Jun 2016 03:53:16 +0000 (03:53 +0000)]
Unreviewed, rolling out r202598.
https://bugs.webkit.org/show_bug.cgi?id=159244

broke the build. (Requested by keith_miller on #webkit).

Reverted changeset:

"Try to fix the build."
http://trac.webkit.org/changeset/202598

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

4 years agobtjs no longer accepts optional frame count argument
msaboff@apple.com [Wed, 29 Jun 2016 02:26:54 +0000 (02:26 +0000)]
btjs no longer accepts optional frame count argument
https://bugs.webkit.org/show_bug.cgi?id=159235

Reviewed by Saam Barati.

Fix the detection of optional backtrace-depth parameter to use the length
of the command.

* lldb/lldb_webkit.py:
(btjs):

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

4 years agoUpdate animometer.plan
jonlee@apple.com [Wed, 29 Jun 2016 02:07:15 +0000 (02:07 +0000)]
Update animometer.plan

Rubber-stamped by Said Abou-Hallawa.

* Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan: Update to r202601.

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

4 years agoAssertion failure or crash when accessing let-variable in TDZ with eval with a functi...
sbarati@apple.com [Wed, 29 Jun 2016 02:06:22 +0000 (02:06 +0000)]
Assertion failure or crash when accessing let-variable in TDZ with eval with a function in it that returns let variable
https://bugs.webkit.org/show_bug.cgi?id=158796
<rdar://problem/26984659>

Reviewed by Michael Saboff.

There was a bug where some functions inside of an eval were
omitting a necessary TDZ check. This obviously leads to bad
things because a variable under TDZ is the null pointer.
The eval's bytecode was generated with the correct TDZ set, but
it created all its functions before pushing that TDZ set onto
the stack. That's a mistake. Those functions need to be created with
that TDZ set. The solution is simple, the TDZ set that the eval
is created with needs to be pushed onto the TDZ stack before
the eval creates any functions.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* tests/stress/variable-under-tdz-eval-tricky.js: Added.
(assert):
(throw.new.Error):
(assert.try.underTDZ):

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

4 years agoUpdate focus test
jonlee@apple.com [Wed, 29 Jun 2016 01:52:14 +0000 (01:52 +0000)]
Update focus test
https://bugs.webkit.org/show_bug.cgi?id=159242
rdar://problem/27070007

Reviewed by Dean Jackson.
Provisionally reviewed by Said Abou-Hallawa.

Move previous test to dom suite, and update the test for better reporting of frame rate, although
it uses a different rendering path.

* Animometer/resources/debug-runner/tests.js: Add to dom suite.
* Animometer/tests/dom/focus.html: Copied from PerformanceTests/Animometer/tests/master/focus.html.
* Animometer/tests/dom/resources/focus.js: Copied from PerformanceTests/Animometer/tests/master/resources/focus.js.
* Animometer/tests/master/focus.html: Remove center element.
* Animometer/tests/master/resources/focus.js: Use narrower size range with smaller particles. Remove the
container elements. Inline getBlurValue and getOpacityValue since they are only called once.

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