Commit Graph

1447 Commits

Author SHA1 Message Date
Aakash Jain 0a387a975c BuildbotBuildEntry for buildbot 0.9 uses incorrect buildrequestid
https://bugs.webkit.org/show_bug.cgi?id=183194

Reviewed by Ryosuke Niwa.

* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize): Updated _buildRequestId to use correct build-request-id, as set in syncer._buildRequestPropertyName.
(BuildbotSyncer.prototype.pathForPendingBuilds): Updated url to fetch properties for build-requests.
* unit-tests/buildbot-syncer-tests.js:
(sampleBuildData): Updated sampleBuildData with correct build-request-id in properties. Added
properties to samplePendingBuildRequestData.



Canonical link: https://commits.webkit.org/199191@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-09 23:45:11 +00:00
Aakash Jain 56886825e8 Rename samplePendingBuild to samplePendingBuildRequest
https://bugs.webkit.org/show_bug.cgi?id=183171

Reviewed by Ryosuke Niwa.

* unit-tests/buildbot-syncer-tests.js:
(samplePendingBuildRequests): Renamed from samplePendingBuild.
(samplePendingBuildRequestDeprecated): Renamed from samplePendingBuildDeprecated.
(samplePendingBuild): Deleted.
(samplePendingBuildDeprecated): Deleted.


Canonical link: https://commits.webkit.org/198904@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-28 21:54:56 +00:00
Jonathan Davis 1ce360e58d Add widescreen layout class for the Downloads page
https://bugs.webkit.org/show_bug.cgi?id=182948

Reviewed by Alexey Proskuryakov.

* wp-content/themes/webkit/downloads.php: Added .widescreen for full-width layout.


Canonical link: https://commits.webkit.org/198718@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-20 16:37:21 +00:00
Ling Ho e23ffdda97 Apply Bugzilla patches for CVE-2018-5123
https://bugs.webkit.org/show_bug.cgi?id=182884

Patch by Ling Ho <lingho@apple.com> on 2018-02-16
Reviewed by Alexey Proskuryakov.

* Bugzilla/CGI.pm:
(_prevent_unsafe_response):
(header):
* attachment.cgi:

Canonical link: https://commits.webkit.org/198646@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-16 23:12:13 +00:00
Jonathan Davis b5e8d45a5e Added a redirect for /nightly to /downloads/.
https://bugs.webkit.org/show_bug.cgi?id=182743
<rdar://problem/35126697>

Reviewed by Lucas Forschler.

* .htaccess:


Canonical link: https://commits.webkit.org/198529@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-13 22:17:29 +00:00
Aakash Jain 37934a172d Add support for submitting build request to Buildbot 0.9 server in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=182218

Reviewed by Ryosuke Niwa.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype.scheduleRequest): Added assert to ensure forcescheduler property is always defined. Builds can not
be scheduled on Buildbot without this property. Updated unit-tests and server-tests accordingly.
(BuildbotSyncer.prototype.scheduleBuildOnBuildbotDeprecated): Method to schedule build request on Buildbot 0.8 server.
(BuildbotSyncer.prototype.scheduleBuildOnBuildbot): Method to schedule build request on Buildbot 0.9 server.
(BuildbotSyncer.prototype.pathForForceBuildDeprecated): Path for scheudling build on Buildbot 0.8 server.
(BuildbotSyncer.prototype.pathForForceBuild): Path for scheudling build on Buildbot 0.9 server.
* unit-tests/buildbot-syncer-tests.js:
(smallConfiguration): Added test-case for scheduleBuildOnBuildbot. Also added forcescheduler property in sample data.
* server-tests/resources/mock-data.js: Added forcescheduler property in sample data.
* server-tests/tools-buildbot-triggerable-tests.js: Updated server-tests to take care of added forcescheduler property.



Canonical link: https://commits.webkit.org/198280@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-05 17:14:13 +00:00
Aakash Jain 82a8c41859 Add support for fetching recent builds in Buildbot 0.9 format in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=179743

Reviewed by Ryosuke Niwa.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._pullRecentBuildsDeprecated): Renamed from _pullRecentBuilds. This method fetch
from Buildbot 0.8 server.
(BuildbotSyncer.prototype._pullRecentBuilds): Method to fetch recent builds from Buildbot 0.9 server.
(BuildbotSyncer.prototype.pathForRecentBuilds): URL for fetching recent builds from Buildbot 0.9 server.
(BuildbotSyncer.prototype.pathForBuildJSONDeprecated): Renamed from pathForBuildJSON.
* unit-tests/buildbot-syncer-tests.js:
(_pullRecentBuilds.it): unit-test - should not fetch recent builds when count is zero.
(_pullRecentBuilds.it): unit-test - should pull the right number of recent builds.
(_pullRecentBuilds.it): unit-test - should handle unexpected error while fetching recent builds.
(_pullRecentBuilds.it): unit-test - should create BuildbotBuildEntry after fetching recent builds.



Canonical link: https://commits.webkit.org/198279@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-05 16:53:22 +00:00
Aakash Jain a27dd2a272 Create BuildbotBuildEntry in Buildbot syncer in Buildbot 0.9 format
https://bugs.webkit.org/show_bug.cgi?id=182036

Reviewed by Ryosuke Niwa.

* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry): Class for Buildbot entry in Buildbot 0.9 data format.
(BuildbotBuildEntryDeprecated): Renamed from BuildbotBuildEntry, sub-classed from BuildBotEntry. Handles Buildbot 0.8 data format.
(BuildbotBuildEntryDeprecated.prototype.url): URL in buildbot 0.8 format.
(BuildbotSyncer.prototype.builderID): Added.
(BuildbotSyncer.prototype.pathForPendingBuildsJSONDeprecated): Renamed from BuildbotSyncer.prototype.pathForPendingBuildsJSON.
(BuildbotSyncer.prototype.pathForPendingBuilds): Path for pending builds in Buildbot 0.9 format.
(BuildbotSyncer.prototype.urlForBuildNumberDeprecated): Deprecated. Renamed from urlForBuildNumber.
(BuildbotSyncer.prototype.urlForBuildNumber): Updated in Buildbot 0.9 format.
(BuildbotSyncer.prototype.urlForPendingBuild): Buildbot 0.9 has individual webpage for pending buildrequests as well. URL to that page.
* unit-tests/buildbot-syncer-tests.js: Renamed BuildbotBuildEntry to BuildbotBuildEntryDeprecated.
(sampleBuildData): Sample build data. Common method for in-progress and finished build data.
(samplePendingBuildData): Sample data for a pending build. Separate method so that we can easily create sample data with multiple builds.
(sampleInProgressBuildData): Ditto for in-progress build.
(sampleFinishedBuildData): Ditto for finished build.
(samplePendingBuild): Sample data for single pending build.
(sampleInProgressBuild): Ditto for in-progress build.
(sampleFinishedBuild): Ditto for finished build.
(samplePendingBuildDeprecated): Renamed from samplePendingBuild.
(sampleInProgressBuildDeprecated): Renamed from sampleInProgressBuild.
(sampleFinishedBuildDeprecated): Renamed from sampleFinishedBuild.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for pending build.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for in-progress build.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for finished build.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for mix of in-progress and finished build.


Canonical link: https://commits.webkit.org/198214@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-02-02 07:06:19 +00:00
Dewei Zhu a37a1709c2 Should chose the best match during 'route' if there are multiple matches.
https://bugs.webkit.org/show_bug.cgi?id=182326

Reviewed by Ryosuke Niwa.

r227749 made a change that 'analysisCategoryPage' will be added before 'analysisTaskPage'.
As route names for both pages starts with 'analysis', whichever added first will be chosen.
For a route like 'analysis/task/1'. As a result, 'analysisCategoryPage' will be chosen and
this is not expected behavior. Adding the logic on the cases when route name does not extact
match the route name, always choose the longest mathcing route name.

Also modernized the code of 'page-router.js' to use const & let instead of var.

Added a browser test to guard against this bug.

* browser-tests/index.html: Import 'page-router-tests.js'.
* browser-tests/page-router-tests.js: Added unit test to guard against this bug.
* public/v3/pages/page-router.js:
(PageRouter.prototype.route): Added logic to find best matching in the case of inexact match.
(PageRouter.prototype.pageDidOpen):
(PageRouter.prototype._updateURLState):
(PageRouter.prototype._serializeToHash):
(PageRouter.prototype._deserializeFromHash):
(PageRouter.prototype._serializeHashQueryValue):
(PageRouter.prototype._deserializeHashQueryValue):
(PageRouter.prototype._countOccurrences):
(PageRouter):

Canonical link: https://commits.webkit.org/198160@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-31 23:41:37 +00:00
Dewei Zhu 3f2ccc8f37 Should fetch owner commits in build-requests-fetcher.
https://bugs.webkit.org/show_bug.cgi?id=182266

Reviewed by Ryosuke Niwa.

In a build request, owner commit of a commit is not always one of a commit in the commit set.
Build request api should contain owner commits in the 'commits' field of the return value.

* public/include/build-requests-fetcher.php: Added logic to fetch owner commits and added them into 'commits'.
* server-tests/api-build-requests-tests.js: Added a unit test.
* server-tests/resources/mock-data.js:
(MockData.set addTestGroupWithOwnerCommitNotInCommitSet): Added a test group with a build request, the commit set of which does
not contain owner commit of one commit.

Canonical link: https://commits.webkit.org/198083@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-30 10:07:04 +00:00
Ryosuke Niwa e291a52547 Add the support for reporting Speedometer 2.0 results to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=182089
<rdar://problem/36172346>

Rubber-stamped by Chris Dumez.

Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
The relevant code is at the line 313 of report-processor.php now.

Added regression tests for this feature since we didn't have any tests four years ago.

* server-tests/api-report-tests.js:


Canonical link: https://commits.webkit.org/198057@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-29 20:38:37 +00:00
Ryosuke Niwa 34475f1868 REGRESSION(r225898): The perf dashboard fails to open when there are no summary pages
https://bugs.webkit.org/show_bug.cgi?id=182210

Rubber-stamped by Chris Dumez.

The bug was caused by TestFreshnessPage unconditionally assuming that summaryPageConfiguration is set.
Fixed it by not creating TestFreshnessPage when there are no summary pages specified.

Also modernized the code to use const & let instead of var.

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


Canonical link: https://commits.webkit.org/198056@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-29 20:35:11 +00:00
Ryosuke Niwa 1f28a07a49 Perf dashboard's page title can be set to a previously visited page
https://bugs.webkit.org/show_bug.cgi?id=182209

Rubber-stamped by Chris Dumez.

Before this patch, opening a page and navigating away from it could result in the page title
getting set to that of the previously visited page after the new page had been opened.

This bug was caused by Page.render keep setting document.title even though the page is no longer
the currently open page of the router. Fixed it by exiting early in Page.enqueueToRender when
this page is not the currently open page of the router.

Also added basic tests for Page.

* browser-tests/index.html:
* browser-tests/page-tests.js: Added.
* public/v3/pages/page.js:
(Page): Removed the unused second constructor argument.
(Page.prototype.enqueueToRender): Fixed the bug.
(Page.prototype.render): Use const instead of var.


Canonical link: https://commits.webkit.org/198054@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-29 20:31:06 +00:00
Ryosuke Niwa 7906f2e53e CommitLogViewer should not fetch commits in serial
https://bugs.webkit.org/show_bug.cgi?id=182207

Rubber-stamped by Chris Dumez.

Fetch both the commits in the range as well as the preceding commit at once instead of
fetching the preceding commit only after the commits in the range had been fetched.

* browser-tests/commit-log-viewer-tests.js: Fixed the tcoest case after r224227.
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._fetchCommitLogs): Fetch commits in parallel.


Canonical link: https://commits.webkit.org/198053@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-29 20:27:56 +00:00
Aakash Jain 80c2803f0d Update code style guidelines for Python
https://bugs.webkit.org/show_bug.cgi?id=179387

Rubber-stamped by Alexey Proskuryakov.

* code-style.md:



Canonical link: https://commits.webkit.org/197915@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-24 22:47:42 +00:00
Dewei Zhu cbaa0697b6 Check existence of 'node_modules_dir' before creating it.
https://bugs.webkit.org/show_bug.cgi?id=182040

Reviewed by Aakash Jain.

Fix the bug introduced in r227395.

* tools/run-tests.py: Added directory existence check.

Canonical link: https://commits.webkit.org/197912@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-24 22:35:39 +00:00
Dewei Zhu 070d324a37 Fix the bug that 'TestGroupResultsViewer' creates unnecessary rows.
https://bugs.webkit.org/show_bug.cgi?id=181967

Reviewed by Ryosuke Niwa.

Fixed a bug caused by a typo in CommitSet.equals, which makes it returns incorrect results for most
comparison between a CommitSet and a MeasurementCommitSet.

MeasurementCommitSet does not have full information for the commits, thus, it cannot build mappings
between root/patch/owner commit/requires build to repository. When querying whether a given repository
needs to be built, MeasurementCommitSet will return undefined. Due to 'undefined != false', this
equality check will fail. Making 'CommitSet.requiresBuildForRepository' defaults to 'false' would fix
this bug.

* public/v3/models/commit-set.js:
(CommitSet.prototype.requiresBuildForRepository): Make it return false when key does not exist
instead of 'undefined'.
(CommitSet.prototype.equals): Fixed the typo that causes the bug.
Use wrapped functions instead of querying the mapping directly.
* unit-tests/commit-set-tests.js: Added unit tests.

Canonical link: https://commits.webkit.org/197908@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-24 22:17:33 +00:00
Dewei Zhu 8cc4faf408 'run-test.py' script should make sure 'node_modules' directory exists before installing node packages.
https://bugs.webkit.org/show_bug.cgi?id=181808

Reviewed by Ryosuke Niwa.

'run-test.py' will fail if 'node_modules' does not exist before running this script.
Instead of calling 'os.chdir' to change directory, use 'cwd' in subprocess instead.

* tools/run-tests.py: Added the logic to ensure 'node_modules' exists.
Also use 'cwd' in subprocess.call instead of calling 'os.chdir' ahead.

Canonical link: https://commits.webkit.org/197803@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 04:39:10 +00:00
Dewei Zhu fb6ec544c9 Extend 'ifBuilt' config key to set property based on whether certain repositories are built or not.
https://bugs.webkit.org/show_bug.cgi?id=181906

Reviewed by Ryosuke Niwa.

Before this change, 'ifBuilt' will always set specified property for test properties as long as there
is a build type build in the same build request group. However, this is no longer valid as we don't
want to set specified property for testing when only owned commit is built in previous build.
'ifBuilt' needs to conditionally set property based on whether certain required repositories are built.
Empty required repository list means no requirement on repository to set property.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):In the case of 'built', only set property when
repository requirment is meet and there is a 'build' root request in the same build request group.
(BuildbotSyncer._parseRepositoryGroup): Extend 'ifBuild' to pass information based on contition.
* unit-tests/buildbot-syncer-tests.js: Added unit tests.

Canonical link: https://commits.webkit.org/197782@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 22:08:03 +00:00
Dewei Zhu 2c00bae566 Should reject updating a build request which has an associated build.
https://bugs.webkit.org/show_bug.cgi?id=181893

Reviewed by Ryosuke Niwa.

Current code does not prevent submitting to same build request multiple times.
This could lead to a build losing its associated build request.
As a result, this build will be visible in charts which is not right.
Added a check when a build request is reported.
Addressed a 'FIXME' for the race condition inside ReportProcessor->resolve_build_id by surrounding
it with a database transaction.

* public/include/report-processor.php:
Wrap adding platform and resolve_build_id with a database transaction.
Add a check to make sure only a build request has no associated build can be updated.
* server-tests/api-report-tests.js: Added unit tests accordingly.

Canonical link: https://commits.webkit.org/197750@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 07:38:16 +00:00
Dewei Zhu 0f2feae9dc Should allow updating a build-request to 'canceled'.
https://bugs.webkit.org/show_bug.cgi?id=181819

Reviewed by Ryosuke Niwa.

It's possible syncing script update a build-request to 'canceled' state.

* public/api/build-requests.php: Added 'canceled' as an acceptable update state.
* server-tests/api-build-requests-tests.js: Added a unit test to update a build-request to 'canceled'.

Canonical link: https://commits.webkit.org/197710@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-19 22:12:23 +00:00
Aakash Jain 725e64db44 Add support for builderNameToIDMap in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=176526

Reviewed by Ryosuke Niwa.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer._loadConfig): Added builderNameToIDMap parameter. It would be used later on.
(BuildbotSyncer._resolveBuildersWithPlatforms): Ditto.
(BuildbotSyncer._validateAndMergeConfig): Added builderID as a valid config parameter.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.getBuilderNameToIDMap): Method to fetch BuilderNameToIDMap from Buildbot 0.9.
(BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Method to fetch BuilderNameToIDMap from Buildbot 0.8.
(BuildbotTriggerable.prototype.initSyncers): Updated to use getBuilderNameToIDMap.
* unit-tests/buildbot-syncer-tests.js: Updated unit-tests.
* server-tests/resources/mock-data.js:
(MockData.buildbotBuildersURLDeprecated): URL for fetching Builders list.
(MockData.buildbotBuildersURL): Ditto for Buildbot 0.9
(MockData.mockBuildbotBuildersDeprecated): Sample builders data for Buildbot 0.8
(MockData.mockBuildbotBuilders): Ditto for Buildbot 0.9
* server-tests/tools-buildbot-triggerable-tests.js: Added test for getBuilderNameToIDMap. Updated tests to handle
newly added promise for fetching builders list from Buildbot.
* server-tests/tools-sync-buildbot-integration-tests.js: Ditto.



Canonical link: https://commits.webkit.org/197660@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-19 05:42:39 +00:00
Ryosuke Niwa 81afe6292e Charts can be empty when values are all identical
https://bugs.webkit.org/show_bug.cgi?id=181828

Reviewed by Alexey Proskuryakov.

Fixed the bug that when SampleVarianceUpperTriangularMatrix can store -Infinity as the initial cost
of some entries when the sample standard deviation between two points turns out to be 0,
and cause splitIntoSegmentsUntilGoodEnough to return undefiend because no segmentation has a finite cost.

Also fixed the bug that the time series chart fails to show any data points when all data points have
identical values as the entire y-coordinate gets collapsed to an empty value range by adjusting the max value
when min & max values are identical.

* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype._ensureValueRangeCache): Raise the max slightly when min & max are identical
to avoid the chart becoming empty. Otherwise valueDiff in _computeVerticalRenderingMetrics becomes 0
and value-to-y-coordinate conversion always results in NaN.
* public/shared/statistics.js:
(Statistics..SampleVarianceUpperTriangularMatrix):
* unit-tests/statistics-tests.js: Added a test case.


Canonical link: https://commits.webkit.org/197658@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-19 04:46:45 +00:00
Ryosuke Niwa ff73dd67d3 Don't fetch more than two builds to check duplicity of builds in ReportProcessor
https://bugs.webkit.org/show_bug.cgi?id=181786

Reviewed by Wenson Hsieh.

Limit the number of builds to check to avoid using a lot of memory with a long delay.

* public/include/report-processor.php:
(ReportProcessor::resolve_build_id):


Canonical link: https://commits.webkit.org/197647@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-18 23:01:46 +00:00
Ryosuke Niwa 7960a267eb Rename config.json to config.json.sample
https://bugs.webkit.org/show_bug.cgi?id=181785

Reviewed by Wenson Hsieh.

* .gitignore: Added config.json.
* ReadMe.md: Updated the instruction.
* config.json.sample: Renamed from config.json.


Canonical link: https://commits.webkit.org/197619@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-18 07:24:43 +00:00
Ryosuke Niwa 4c5574c1ca Unreviewed build fixes in TestGroupResultsViewer.
* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.render): _renderCurrentMetricsLazily was never called.
(TestGroupResultsViewer.prototype._buildRowForMetric): Don't try to render null or NaN.


Canonical link: https://commits.webkit.org/197616@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-18 06:45:31 +00:00
Ryosuke Niwa 39fea8bd16 Fix perf dashboard tests for node v8
https://bugs.webkit.org/show_bug.cgi?id=181782

Reviewed by Wenson Hsieh.

Fixed the various tests for node.js v8, which is the latest LTS version.

* server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests
after r226836.
* server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date
in node.js parses using the local timezone by default.
* server-tests/resources/test-server.js:
(TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.
* server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
* unit-tests/measurement-set-tests.js:
(waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.


Canonical link: https://commits.webkit.org/197615@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-18 06:06:50 +00:00
Ryosuke Niwa 134cc52361 ΩUpdate the default hyperlink for Speedometer to Speedometer 2.0.
Rubber-stamped by Saam Barati.

* index.html:


Canonical link: https://commits.webkit.org/197512@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-16 02:36:48 +00:00
Ryosuke Niwa aad1fea8ac Cannot trigger Dromaeo tests on internal perf try bots
https://bugs.webkit.org/show_bug.cgi?id=179712

Reviewed by Chris Dumez.

The bug was caused by CustomAnalysisTaskConfigurator only showing the top-level tests that are triggerable
instead of the list of highest level tests that are triggerable.

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype.selectTests): Update the test group name when a new test is picked.
(CustomAnalysisTaskConfigurator.prototype.selectPlatform):
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Extracted from selectPlatform.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Include the list of all highest-level tests
which are triggerable.
(CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Added labelForObject which returns the label
to be used in the list items. For tests, we want to use the full name, not just its label.
* public/v3/models/analysis-task.js:
(AnalysisTask.fetchById):
* public/v3/models/triggerable.js:
(Triggerable.prototype.acceptedTests): Added.
(Triggerable.prototype.acceptsTest): Deleted.


Canonical link: https://commits.webkit.org/197440@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-12 02:13:53 +00:00
Ryosuke Niwa 5b5673042a Merge the latest version of Speedometer 2.0 to browserbench.org against at r226694.
Rubber-stamped by Keith Miller.

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.


Canonical link: https://commits.webkit.org/197328@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-10 05:02:36 +00:00
Michael Catanzaro 981423f065 == Rolled over to ChangeLog-2018-01-01 ==
Canonical link: https://commits.webkit.org/197044@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-02 04:27:34 +00:00
Dewei Zhu 740276c85a Test freshness page should use build time instead of commit time to determine the freshness of the data point.
https://bugs.webkit.org/show_bug.cgi?id=181156

Reviewed by Alexey Proskuryakov.

Build time is a better data point freshness indicator. Test freshness page is designed to highlight test failures.
Using commit time will result in including the compiling and test running time which does not quite match the
definition of data point fresshness.

* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage.prototype._fetchTestResults): Use build time instead of commit time.

Canonical link: https://commits.webkit.org/197027@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-27 22:55:43 +00:00
Dewei Zhu fa0cb4a593 Add UI for A/B testing on owned commits.
https://bugs.webkit.org/show_bug.cgi?id=177993

Reviewed by Ryosuke Niwa.

Customizable test group form should support specifying and A/B testing owned commits.
Introduce 'IntermediateCommitSet' to achieve the goal of specifying owned commits for A/B test.
In order to support configure A/B testing that may need to add/remove owned commits, CommitSet may be the
closest thing we can get. However, it is a subclass of DataModelObject, which means CommitSet is a representation
of 'commit_sets' table and can only be updated from server data. Thus, we want something like CustomCommitSet that
is not a representation of database table, but unlike CustomCommitSet, it should store information about commits
rather than a revision. As a result, IntermediateCommitSet is introduced. For a longer term, we may replace
CustomCommitSet with IntermediateCommitSet as it carries more information and could potentially simplify some
CustomCommitSet related APIs by using commit id instead of commit revision.
Extend ButtonBase class so that we can enable/disable a button.

* public/v3/components/button-base.js:
(ButtonBase):
(ButtonBase.prototype.setDisabled): Enable/disable a button.
(ButtonBase.prototype.render):
(ButtonBase.cssTemplate): Added css rule for disabled button.
* public/v3/components/combo-box.js: Added.
(ComboBox):
(ComboBox.prototype.didConstructShadowTree): Setup text field.
(ComboBox.prototype.render):
(ComboBox.prototype._candidateNameForCurrentIndex): Returns candidate name based on current index.
(ComboBox.prototype._candidateElementForCurrentIndex): Returns a list element based on current index.
(ComboBox.prototype._autoCompleteIfOnlyOneMatchingItem): Supports auto completion.
(ComboBox.prototype._moveCandidate): Supports arrow up/down.
(ComboBox.prototype._updateCandidateList): Hide/unhide candidate list and high-light selected candidate.
(ComboBox.prototype._renderCandidateList): Render candidate list base on value on text field.
(ComboBox.htmlTemplate):
(ComboBox.cssTemplate):
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype.didConstructShadowTree): Only fetch the full commits when we about to create a customized A/B tests.
(CustomizableTestGroupForm.prototype._computeCommitSetMap): Compute the CustomCommitSet based on IntermediateCommitSet and
other revision related information in some map.
(CustomizableTestGroupForm.prototype.render):
(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
(CustomizableTestGroupForm.prototype._constructTableBodyList): This function builds table body for each highest level repository.
It will also include the owned repository rows in the same table body if the commits for highest level repository owns other commits.
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner): Build a table row for a highest level repository.
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner): Build a table row for repository with owner.
(CustomizableTestGroupForm.prototype._constructTableRowForIncompleteOwnedCommits): Build a table row for an unspecified repository.
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons): Update the logic to support build radio buttons for the owned repository rows.
(CustomizableTestGroupForm.cssTemplate):
* public/v3/components/minus-button.js: Added.
(MinusButton):
(MinusButton.buttonContent):
* public/v3/components/owned-commit-viewer.js:
(OwnedCommitViewer.prototype._renderOwnedCommitTable):
* public/v3/components/plus-button.js: Added.
(PlusButton):
(PlusButton.buttonContent):
* public/v3/index.html: Added new components.
* public/v3/models/commit-log.js: Added owner and owned commit information.
(CommitLog):
(CommitLog.prototype.ownedCommits): Returns a list of commits owned by current commit.
(CommitLog.prototype.ownerCommit): Return owner commit of current commit.
(CommitLog.prototype.setOwnerCommits): Set owner commit of current commit.
(CommitLog.prototype.label): Remove unnecessary 'else'.
(CommitLog.prototype.diff): Remove unused 'fromRevisionForURL' and tiny code cleanup.
(CommitLog.prototype.ownedCommitForOwnedRepository):
(CommitLog.prototype.fetchOwnedCommits): Sets the owner for those owned commits. The owner of a commit with multiple owner
commits will be overwritten by each time this function is called.
(CommitLog.ownedCommitDifferenceForOwnerCommits): A more generic version of diffOwnedCommits. diffOwnedCommits only accepts 2 commits,
but ownedCommitDifferenceForOwnerCommits supports multiple commits.
(CommitLog.diffOwnedCommits): Deleted and should use 'CommitLog.ownedCommitDifferenceForOwnerCommits' instead.
* public/v3/models/commit-set.js:
(CommitSet.prototype.topLevelRepositories):
(CommitSet.prototype.commitForRepository):
(IntermediateCommitSet): Take CommitSet as argument, note the commit from CommitSet doesn't contains full information of the commit.
Always call 'fetchFullCommits' once before any further usages.
(IntermediateCommitSet.prototype.fetchCommitLogs): Fetch all commits information in current commit set.
(IntermediateCommitSet.prototype._fetchCommitLogAndOwnedCommits): Fetch commit log and owned commits if necessary.
(IntermediateCommitSet.prototype.updateRevisionForOwnerRepository): Updates a commit for a repository by given a revision of the repository.
(IntermediateCommitSet.prototype.setCommitForRepository): Sets a commit for a repository in commit set.
(IntermediateCommitSet.prototype.removeCommitForRepository): Removes a commit for a repository in commit set.
(IntermediateCommitSet.prototype.ownsCommitsForRepository): Returns whether the commit for repository owns commits.
(IntermediateCommitSet.prototype.repositories): Returns all repositories in the commit set.
(IntermediateCommitSet.prototype.highestLevelRepositories): Returns all repositories those don't have an owner.
(IntermediateCommitSet.prototype.commitForRepository): Returns a commit for a given repository.
(IntermediateCommitSet.prototype.ownedRepositoriesForOwnerRepository): Returns all repositories owned by a given repository in current commit set.
(IntermediateCommitSet.prototype.ownerCommitForRepository): Returns owner commit for a given owned repository.
* tools/js/v3-models.js: Added import for 'IntermediateCommitSet'.
* unit-tests/commit-log-tests.js: Updated unittest which tests 'ownerCommit' function.
* unit-tests/commit-set-tests.js: Added unit tests for IntermediateCommitSet.

Canonical link: https://commits.webkit.org/196983@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-22 06:25:24 +00:00
Dewei Zhu f82a1651f0 Add a test freshness page.
https://bugs.webkit.org/show_bug.cgi?id=180126

Reviewed by Ryosuke Niwa.

Added a page to show freshness of a test.
The test freshness page reports on the same set of tests as the one shown in the summary page.
Use a logistic function to evaluate the freshness of the data points.
This function has the desired property which increase dramatically when it close to the center of the graph.
'acceptableLastDataPointDurationInHour' configs the center of the graph.

* public/include/manifest-generator.php:
* public/v3/components/freshness-indicator.js: Added.
(FreshnessIndicator): A cell of the test freshness table, color will transit from green to red.
(FreshnessIndicator.prototype.update): Update the the data point information and triggers
the cell to re-render if anything changes.
(FreshnessIndicator.prototype._renderIndicator): Re-render the indicator.
(FreshnessIndicator.prototype.render): Render the box color base on a logistic function.
(FreshnessIndicator.prototype._createIndicator):
(FreshnessIndicator.htmlTemplate):
(FreshnessIndicator.cssTemplate):
* public/v3/index.html:
* public/v3/main.js: Added test freshness page.
(main):
* public/v3/models/build-request.js: Refactored waitingTime function to make it reusable.
(BuildRequest.formatTimeInterval): Format time interval in million seconds to more user friendly text.
(BuildRequest.prototype.waitingTime):
* public/v3/pages/test-freshness-page.js: Added.
(TestFreshnessPage):
(TestFreshnessPage.prototype.name):
(TestFreshnessPage.prototype._loadConfig): Load config from summary page configurations.
(TestFreshnessPage.prototype.open):
(TestFreshnessPage.prototype._fetchTestResults):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTable):
(TestFreshnessPage.prototype._isValidPlatformMetricCombination): Return whether a platform
and metric combination is valid.
(TestFreshnessPage.prototype._constructTableCell):
(TestFreshnessPage.cssTemplate):
(TestFreshnessPage.prototype.routeName):
* server-tests/api-manifest-tests.js: Added 'warningHourBaseline' so that we can config the
parameter of logistic funciton.
* unit-tests/build-request-tests.js: Added unit tests for formatTimeInterval.

Canonical link: https://commits.webkit.org/196700@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-14 09:49:37 +00:00
Dean Jackson f1e96d7322 Add a runtime feature flag for ImageBitmap and OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=180652
<rdar://problem/35969611>

Reviewed by Antoine Quint.

Source/WebCore:

Add a RuntimeEnabledFeature for these interfaces, and link the bindings
to the feature.

Test: fast/canvas/offscreen-enabled.html

* bindings/js/WebCoreBuiltinNames.h:
* html/ImageBitmap.idl:
* html/OffscreenCanvas.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setImageBitmapOffscreenCanvasEnabled):
(WebCore::RuntimeEnabledFeatures::imageBitmapOffscreenCanvasEnabled const):
* page/WindowOrWorkerGlobalScope.idl:

Source/WebKit:

Add an experimental feature flag for these interfaces.

* Shared/WebPreferences.yaml:

Websites/webkit.org:

Simple test to validate if these interfaces are enabled.

* experimental-features.html:

LayoutTests:

* fast/canvas/offscreen-enabled-expected.txt: Added.
* fast/canvas/offscreen-enabled.html: Added.

Canonical link: https://commits.webkit.org/196562@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-11 18:07:48 +00:00
Dean Jackson 595571d9e6 Include gl-matrix directly since github doesn't serve the correct mime type
https://bugs.webkit.org/show_bug.cgi?id=180102
<rdar://problem/35301622>

Reviewed by Antoine Quint.

* demos/webgpu/cubes.html:
* demos/webgpu/gl-matrix-min.js: Added.
* demos/webgpu/simple.html:

Canonical link: https://commits.webkit.org/196096@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-28 21:10:14 +00:00
Jonathan Davis dd89029357 Update safe area CSS for webkit.org
https://bugs.webkit.org/show_bug.cgi?id=179615

Reviewed by Alexey Proskuryakov.

* wp-content/themes/webkit/style.css:
(@media only screen and (max-height: 415px)):
(@supports(padding:max(0px))):


Canonical link: https://commits.webkit.org/195661@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 21:29:47 +00:00
Jonathan Davis c5c19707fb Add a new landing page design and site-wide design detail updates for webkit.org
https://bugs.webkit.org/show_bug.cgi?id=179558

Reviewed by Alexey Proskuryakov.

* wp-content/themes/webkit/404.php: Removed unnecessary prefixed CSS.
* wp-content/themes/webkit/444.php: Removed unnecessary prefixed CSS.
* wp-content/themes/webkit/css-status.php: Removed unnecessary prefixed CSS.
* wp-content/themes/webkit/footer.php: Added new page wrapper container.
* wp-content/themes/webkit/front-header.php: Redesigned landing hero.
* wp-content/themes/webkit/functions.php: Added support for configurable non-breaking words.
* wp-content/themes/webkit/header.php: Added viewport-fit, changed web font, changed logo title.
* wp-content/themes/webkit/images/chevron.svg: Added.
* wp-content/themes/webkit/images/circular.svg: Added.
* wp-content/themes/webkit/images/compass.svg: Added.
* wp-content/themes/webkit/images/download-white.svg: Added.
* wp-content/themes/webkit/images/template.svg: Added.
* wp-content/themes/webkit/loop.php: Updated "read more" link presentation.
* wp-content/themes/webkit/nightly-start.php: Adjusted header background colors.
* wp-content/themes/webkit/nightly-survey.php: Adjusted header background colors.
* wp-content/themes/webkit/nightly.php: Adjusted header background colors.
* wp-content/themes/webkit/page.php: Page clean up.
* wp-content/themes/webkit/single.php: Updated "read more" link presentation.
* wp-content/themes/webkit/status.php: Removed unnecessary prefixed CSS, improved page title.
* wp-content/themes/webkit/style.css: Redesigned.
(html):
(body):
(strong):
(em):
(code):
(main):
(h1,):
(input[type=text]):
(input[type=submit]):
(header):
(.home header):
(@supports ( -webkit-backdrop-filter: blur(10px) )):
(.sub-menu-layer):
(.nextrouter .link,):
(.pagination):
(.pagination::after):
(.pagination .page-numbers):
(.pagination .dots,):
(.pagination .next-button):
(.nextrouter):
(.nextrouter:hover):
(.nextrouter.previous):
(.nextrouter.previous:hover):
(.nextrouter .bodycopy):
(.nextrouter a):
(.nextrouter a:hover):
(.nextrouter-copy):
(.nextrouter .label):
(.nextrouter .title):
(.nextrouter .link):
(.nextrouter a:hover .link):
(footer):
(.tiles):
(.tile):
(.third-tile):
(.two-thirds-tile):
(.tile .background-image):
(.tile .background-image.has-featured-image):
(.tile .featured-image):
(.tile:not(.has-post-thumbnail) .background-image,):
(.tile h1):
(.tile h2):
(.tile .summary,):
(pre):
(article):
(article::after):
(article h1):
(article h2):
(article h3):
(article h4):
(article h5):
(article h6):
(article h2 + h3,):
(article figcaption):
(article figcaption::before):
(.table-of-contents):
(article .table-of-contents label):
(.table-of-contents ul):
(.table-of-contents ul li):
(.table-of-contents ul li > ul):
(.site-logo):
(footer nav):
(header nav li):
(header nav a,):
(header .menu-item-has-children .label-toggle::after):
(header .menu-item):
(@media only screen and (max-width: 1180px)):
(article .byline):
(@media only screen and (max-width: 920px)):
(.main-menu.label-toggle):
(header .menu):
(header nav a):
(header .menu-main-menu-container >  ul > li):
(header .sub-menu-layer):
(@media only screen and (max-width: 690px)):
(.third-tile,):
(@media only screen and (max-width: 600px)):
(.table-of-contents label:after):
(@media only screen and (max-width: 415px)):
(@media only screen and (max-height: 415px)):
(@supports(padding:max(0px))):
(header .menu .menu-item > .sub-menu):
(.sub-menu-layer .menu-item:first-child,):
(#template):
(#compass):
(.tile .featured-image,): Deleted.
(.site-logo .tagline): Deleted.
(.timeline): Deleted.
(.timeline:after): Deleted.
(.timeline *): Deleted.
(.timeline:before): Deleted.
(.timeline > li): Deleted.
(.timeline > li:before): Deleted.
(.timeline .content): Deleted.
(.timeline figure): Deleted.
(.timeline .time): Deleted.
(.timeline h2, .timeline h3): Deleted.
(.timeline .time::before): Deleted.
(.timeline img): Deleted.
(@media (min-width: 900px)): Deleted.
(.timeline > li.force-clear): Deleted.
(.timeline > li:nth-child(odd)): Deleted.
(.timeline > li:nth-child(even)): Deleted.
(.timeline > li:nth-child(2),): Deleted.
(.timeline li .time): Deleted.
(.timeline li:nth-child(odd) .time): Deleted.
(.timeline li:nth-child(even) .time): Deleted.
(.timeline li:nth-child(even) .time::before): Deleted.
(.timeline > li:nth-child(even):before): Deleted.
(@media (max-width: 900px)): Deleted.
(.timeline li .time::before): Deleted.
(.hero .logo,): Deleted.
(.home .hero): Deleted.
(.home.admin-bar .hero): Deleted.
(@media only screen and (max-width: 320px)): Deleted.
* wp-content/themes/webkit/widgets/post.php: Updated "read more" link presentation.


Canonical link: https://commits.webkit.org/195644@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 17:40:31 +00:00
Dewei Zhu 59a84ef417 Add platform argument for syncing script.
https://bugs.webkit.org/show_bug.cgi?id=179162

Reviewed by Ryosuke Niwa.

Syncing script should pass platform name to buildbot if platform argument is specified in configuration.

* server-tests/tools-sync-buildbot-integration-tests.js:
(return.createTriggerable.configWithPlatformName.then): Added unit test for platform argument.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer): Add '_platformPropertyName' property.
(BuildbotSyncer.prototype.scheduleRequest): Add '_platformPropertyName' to build property if specified.
(BuildbotSyncer._loadConfig): Read '_plaformPropertyName' from config.

Canonical link: https://commits.webkit.org/195459@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-07 22:57:05 +00:00
Dewei Zhu 77f7d7e854 Limit the number of results to be submitted in one submission.
https://bugs.webkit.org/show_bug.cgi?id=179045

Reviewed by Ryosuke Niwa.

Submitting results for a large number of builds with owned commit information may exceed the size limit of php.
Added a way to split the results into groups of certain sizes, and submit them one by one.

* server-tests/tools-os-build-fetcher-tests.js: Updated the unit tests.
* tools/js/os-build-fetcher.js: Added '_maxNumberOfResultsPerSubmit' which can be specified by a configuration but also use 20 as default value.
(prototype.fetchAndReportNewBuilds): Instead of submitting all results once, split them into groups and submit them one by one.
(prototype._fetchAvailableBuilds): 'label' is already quoted, should remove unnecessary quotes.
(prototype._addOwnedCommitsForBuild): Added logging to log the size of owned commits.

Canonical link: https://commits.webkit.org/195185@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-31 10:01:18 +00:00
Dewei Zhu a9a22623d7 OwnedCommitViewer should include the preceding commit.
https://bugs.webkit.org/show_bug.cgi?id=179047

Reviewed by Ryosuke Niwa.

OwnedCommitViewer shows the difference between owned commits.
To show changes made by first owned commit, we need to have the preceding commit information.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer):
(CommitLogViewer.prototype._fetchCommitLogs): Fetch preceding commit if the commits fetched is not a single commit.
(CommitLogViewer.prototype.render):
(CommitLogViewer.prototype._renderCommitList): Conditionally rendering preceding commit in commit list.

Canonical link: https://commits.webkit.org/195184@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-31 09:44:39 +00:00
Tim Horton 1e99c664dd Update safe area inset demo pages to use env()
https://bugs.webkit.org/show_bug.cgi?id=179041

Reviewed by Simon Fraser.

* demos/safe-area-insets/1-default.html:
* demos/safe-area-insets/2-viewport-fit.html:
* demos/safe-area-insets/3-safe-area-constants.html:
* demos/safe-area-insets/4-min-max.html:
* demos/safe-area-insets/safe-areas.html:
Update to use env() instead of constant(), but keep constant() around
for backwards-compatibility.

Adjust the colors on the safe areas test page to look a little less holiday-like.


Canonical link: https://commits.webkit.org/195179@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-31 03:22:18 +00:00
Dewei Zhu 2b53e5ed93 Fix a bug in syncing script that test/build syncer is never set.
https://bugs.webkit.org/show_bug.cgi?id=178772

Reviewed by Ryosuke Niwa.

Neither 'buildSyncer' nor 'testSyncer' is ever set.
Added a unit test to cover this case.

* server-tests/tools-sync-buildbot-integration-tests.js:
(createTriggerable): Refactor it to allow customized name.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Update syncer info accordingly.
(BuildbotTriggerable._testGroupMapForBuildRequests): Initialize build and test syncer to null.

Canonical link: https://commits.webkit.org/194970@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-25 19:48:57 +00:00
Dewei Zhu 1c13d6b026 Owner commit does not necessarily exist in the same commit set for an owned commit.
https://bugs.webkit.org/show_bug.cgi?id=178763

Reviewed by Ryosuke Niwa.

Remove the check based on previous incorrect assumption.
Added unit tests to cover this change.

* public/privileged-api/create-test-group.php:
* server-tests/privileged-api-create-test-group-tests.js:
(return.addTriggerableAndCreateTask.string_appeared_here.then.id.taskId.id.then):

Canonical link: https://commits.webkit.org/194942@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-25 01:34:34 +00:00
Dewei Zhu 78f1d73dbd Update perf dashboard upload logic to support uploading binaries from owned commits.
https://bugs.webkit.org/show_bug.cgi?id=178610

Reviewed by Ryosuke Niwa.

Update build requests to 'completed' only when all commit set items are satisfied.
Extend 'repositoryList' parameter to be able to specified own commit information.
Items in 'repositoryList' can either be a string for top level repository,
or a dictionary with two keys: 'ownerRepository' and 'ownedRepository'.

* public/api/upload-root.php: Extend upload logic for support uploading binaries from owned commits.
* server-tests/api-upload-root-tests.js: Added unit tests.
* server-tests/tools-sync-buildbot-integration-tests.js: Added unit tests.

Canonical link: https://commits.webkit.org/194860@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-24 00:22:57 +00:00
Daniel Bates 2a39714004 No nightlies listed on nightly.webkit.org when using shipping Safari on macOS Sierra and OS X El Capitan
https://bugs.webkit.org/show_bug.cgi?id=178372

Reviewed by Tim Horton.

The Build Archive page depends on the collections (e.g. HTMLCollection) being
iterable so as to support iteration using ES6 for-of loop. Such support postdates
the version of WebKit shipped in macOS Sierra and OS X El Capitan. We should
make <https://webkit.org/build-archives/> work for these OSes since we still publish
nightlies for them.

* wp-content/themes/webkit/build-archives.php: Use Array.prototype.slice() to
convert the HTMLCollection to an array that can be iterated using a ES6 for-of loop.

Canonical link: https://commits.webkit.org/194595@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-17 03:26:36 +00:00
Dewei Zhu 3f04cc1c01 Add try-bot button on perf analysis status page.
https://bugs.webkit.org/show_bug.cgi?id=177995

Reviewed by Ryosuke Niwa.

Add 'Create' button on analysis status top-left corner to create trybot analysis task.

* public/v3/pages/analysis-category-toolbar.js:
(AnalysisCategoryToolbar.cssTemplate):

Canonical link: https://commits.webkit.org/194264@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-06 19:54:51 +00:00
Megan Gardner fd464fdca5 Update Webkit Style webpage to include Obj-C blocks
https://bugs.webkit.org/show_bug.cgi?id=177906

Reviewed by Tim Horton.

* code-style.md:



Canonical link: https://commits.webkit.org/194208@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-05 22:32:55 +00:00
Jonathan Davis 078d331dac Add a WebKit Build Archives page
https://bugs.webkit.org/show_bug.cgi?id=177654

Reviewed by Alexey Proskuryakov.

* wp-content/themes/webkit/build-archives.php: Added.


Canonical link: https://commits.webkit.org/194000@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-02 17:26:38 +00:00
Dewei Zhu ca06813305 Update syncing script to be able to build binary for commit set with owned commits.
https://bugs.webkit.org/show_bug.cgi?id=177225

Reviewed by Ryosuke Niwa.

Added support for syncing script to be able to schedule builds to build binary for owned commits.
Introduces 'ifRepositorySet' and 'ownedRevisions' in 'buildProperties'.
'ifRepositorySet' will conditionaly set a build property if at least one of the repositories it specified requires build.
'ownedRevisions' specifies owned commits revision informations.

* public/v3/models/commit-set.js:
(CommitSet): Added '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype.updateSingleton): Reset '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype._updateFromObject): Only update '_repositoryToCommitOwnerMap' and '_ownerRepositoryToOwnedRepositoriesMap' when 'commitOwner' exists.
(CommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
(CommitSet.prototype.ownedRepositoriesForOwnerRepository): Returns owned repositories given a owner repository.
(CustomCommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
* public/v3/models/triggerable.js:
(prototype.accepts): It should only check against top-level repositories. Removed a deprecated 'FIXME'.
* server-tests/tools-sync-buildbot-integration-tests.js: Added unit test for building owned commits binary.
(createTriggerable): Added conditional 'ifRepositorySet' and 'ownedRevisions' in the repository groups.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
    Added logic to conditionaly create build property for 'ifRepositorySet'.
    Added logic to create 'ownedRevisions' based on the owner repositories it specified.
(BuildbotSyncer._parseRepositoryGroup): Build property template should be able to handle 'ifRepositorySet' and 'ownedRevisions'.
* unit-tests/buildbot-syncer-tests.js: Added unit tests for 'ifRepositorySet' and 'ownedRevisions'.
* unit-tests/commit-set-tests.js: Added unit tests for 'topLevelRepositoriesSortedByNamePreferringOnesWithURL'.
* unit-tests/resources/mock-v3-models.js: Added a repository group contains 'ios', 'webkit' and 'ownerRepository'.

Canonical link: https://commits.webkit.org/193932@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-29 07:34:41 +00:00
Ryosuke Niwa 3eb75bb6cf Merge the latest version of Speedometer 2.0 to browserbench.org against at r222534.
Rubber-stamped by Saam Barati (a while ago).

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.


Canonical link: https://commits.webkit.org/193929@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-29 02:42:46 +00:00
Tim Horton d9b00bfac3 Update some links in demos
* demos/safe-area-insets/1-default.html:
* demos/safe-area-insets/2-viewport-fit.html:
* demos/safe-area-insets/3-safe-area-constants.html:
* demos/safe-area-insets/4-min-max.html:


Canonical link: https://commits.webkit.org/193690@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-22 16:33:11 +00:00
Tim Horton bf3ffca18f Add some blog post resources
https://bugs.webkit.org/show_bug.cgi?id=177333

Reviewed by Sam Weinig.

* demos/safe-area-insets/1-default.html: Added.
* demos/safe-area-insets/2-viewport-fit.html: Added.
* demos/safe-area-insets/3-safe-area-constants.html: Added.
* demos/safe-area-insets/4-min-max.html: Added.
* demos/safe-area-insets/safe-areas.html: Added.
* demos/safe-area-insets/style.css: Added.


Canonical link: https://commits.webkit.org/193678@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-22 01:08:24 +00:00
Dewei Zhu 12ec07a274 Use 'owned commit' instead of 'sub commit' whenever refers to a commit owned by another commit.
https://bugs.webkit.org/show_bug.cgi?id=177178

Reviewed by Ryosuke Niwa.

We use both 'owned commit' and 'sub commit' to refer to a commit owned by an another commit. We should use one term instead of two.
Renaming 'subCommit' to 'ownedCommit', 'ownsSubCommit' to 'ownsCommit' and 'sub-commit' to 'owned-commit'.

* browser-tests/commit-log-viewer-tests.js:
* public/api/commits.php:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._renderCommitList):
* public/v3/components/owned-commit-viewer.js: Renamed from Websites/perf.webkit.org/public/v3/components/sub-commit-viewer.js.
(OwnedCommitViewer):
(OwnedCommitViewer.prototype.didConstructShadowTree):
(OwnedCommitViewer.prototype._toggleVisibility):
(OwnedCommitViewer.prototype.render):
(OwnedCommitViewer.prototype._renderOwnedCommitTable):
(OwnedCommitViewer.htmlTemplate):
(OwnedCommitViewer.cssTemplate):
* public/v3/index.html:
* public/v3/models/commit-log.js:
(CommitLog):
(CommitLog.prototype.updateSingleton):
(CommitLog.prototype.ownsCommits):
(CommitLog.prototype.fetchOwnedCommits):
(CommitLog.prototype._buildOwnedCommitMap):
(CommitLog.diffOwnedCommits):
(CommitLog.prototype.ownsSubCommits): Deleted.
(CommitLog.prototype.fetchSubCommits): Deleted.
(CommitLog.prototype._buildSubCommitMap): Deleted.
(CommitLog.diffSubCommits): Deleted.
* server-tests/api-commits-tests.js:
* server-tests/api-report-commits-tests.js:
* server-tests/tools-os-build-fetcher-tests.js:
(return.waitForInvocationPromise.then):
(string_appeared_here.return.waitForInvocationPromise.then):
* tools/js/os-build-fetcher.js:
(prototype._fetchAvailableBuilds):
(prototype._addOwnedCommitsForBuild):
(prototype._addSubCommitsForBuild): Deleted.
* unit-tests/commit-log-tests.js:
(return.commit.fetchOwnedCommits.then):
(return.fetchingPromise.then):
(return.commit.fetchSubCommits.then): Deleted.

Canonical link: https://commits.webkit.org/193549@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-19 21:47:41 +00:00
Dewei Zhu 7631cb192a Performance Dashboard backend should support A/B testing for owned components.
https://bugs.webkit.org/show_bug.cgi?id=175978

Reviewed by Ryosuke Niwa.

Add backend change for Performance Dashboard to support A/B testing for owned components.
Added 'commitset_commit_owner' and 'commitset_requires_build' columns to 'commit_set_items' table.
'commitset_commit_owner' referrs to determine a commit with owner.
'commitset_requires_build' indicates whether a root build is required.
This will be set true whenever commit_set_item specifies a patch file,
or commit_set_item is commit with owner commit,
or any other commit from same repository and in same build-request group requires build.
SQL for updating existing database:
    'BEGIN;
        ALTER TABLE commit_set_items ADD COLUMN commitset_commit_owner integer REFERENCES commits DEFAULT NULL, ADD COLUMN commitset_requires_build boolean DEFAULT FALSE;
        UPDATE commit_set_items SET commitset_requires_build = TRUE WHERE commitset_patch_file IS NOT NULL;
        UPDATE commit_set_items SET commitset_requires_build = TRUE WHERE commitset_set IN (SELECT requests1.request_commit_set FROM build_requests as requests1 JOIN build_requests as requests2 ON requests1.request_group = requests2.request_group JOIN commit_set_items as item ON item.commitset_set = requests2.request_commit_set  WHERE item.commitset_patch_file IS NOT NULL);
        ALTER TABLE commit_set_items ADD CONSTRAINT commitset_item_with_patch_must_requires_build CHECK (commitset_patch_file IS NULL OR commitset_requires_build = TRUE),
            ADD CONSTRAINT commitset_item_with_owned_commit_must_requires_build CHECK (commitset_commit_owner IS NULL OR commitset_requires_build = TRUE);
    END;'

* init-database.sql: Updated 'commit_set_items' table.
* public/admin/triggerables.php: Only top level repository should show on triggerables page.
* public/include/build-requests-fetcher.php: Added 'commitOwner' and 'requireBuild' to 'revision_items'. Added 'commitOwner' field to a commit.
* public/include/db.php: Should be able to insert boolean value to database without explicted convert to 't' or 'f'.
* public/privileged-api/create-test-group.php:
    Added logic to process 'commitOwner' and 'requireBuild' in 'commit_set_items'.
    Removed a 'FIXME' that has been addressed before this commit.
* public/v3/models/build-request.js:
(BuildRequest.constructBuildRequestsFromData): Set 'commitOwner' field for a commit set item.
* public/v3/models/commit-set.js:
(CommitSet): Added maps for repository to commit owner and whether a repository requires builds.
(CommitSet.prototype.updateSingleton):
(CommitSet.prototype._updateFromObject):
(CommitSet.prototype.ownerRevisionForRepository): Returns owner revision for a given repository in current commit set.
(CommitSet.prototype.requiresBuildForRepository): Returns whether a repository need to build.
(CommitSet.prototype.equals): Equality check should include 2 new maps.
(CustomCommitSet): CustomCommitSet should be able to store commit with an owner commit.
(CustomCommitSet.prototype.setRevisionForRepository): Added each revision list entry should have 'ownerRevision'(null by default).
(CustomCommitSet.prototype.equals): Equality check should also check the equality of 'ownerRevision'.
(CustomCommitSet.prototype.ownerRevisionForRepository): Returns a owner revision for a given repository.
* public/v3/models/repository.js:
(Repository.prototype.findOwnedRepositoryByName): Return an repository owned by current repository with a given name.
* public/v3/models/test-group.js: Added 'ownerRevision' field in each entry of revisionSet.
* server-tests/api-build-requests-tests.js: Added tests.
* server-tests/privileged-api-create-test-group-tests.js: Added tests.
* server-tests/privileged-api-upload-file-tests.js: Fix unit tests by setting'requires_build' field to be true when updating commit_set_item which has a patch..
* server-tests/resources/mock-data.js: Added mock build requests with commit sets contain owned commits.
(MockData.jscRepositoryId): Returns id for JavaScriptsCore repository.
(MockData.addMockConfiguration): Added mock JavaScriptCore and owned JavaScriptCore repositories and commits associated with them.
(MockData.ownedJSCRepositoryId): Added a JavaScriptCore repository with WebKit as owner.
(MockData.addMockConfiguration): Added mock data for test cases those require a commit with a owner commit.
(MockData.addTestGroupWithOwnedCommits): Added mock data for analysis tasks, the build requires of which contains owned commits.
(MockData.set addAnotherTriggerable): Added another triggerable which has mac, webkit and javascript core repositories as triggerable repository group.
(MockData.set addAnotherMockTestGroup): Added another mock test group.
* tools/js/v3-models.js: Import CustomCommitSet.
* unit-tests/resources/mock-v3-models.js: Added an owned webkit repository.
* unit-tests/commit-set-tests.js: Added unit tests CustomCommitSet.

Canonical link: https://commits.webkit.org/193541@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-19 20:14:45 +00:00
Dewei Zhu 90f123c0e5 Should not mark a platform as missing in summary page if all expecting metrics are exlucded.
https://bugs.webkit.org/show_bug.cgi?id=176970

Reviewed by Ryosuke Niwa.

In summary page, if all metrics for a test are excluded in excludedConfigurations for a platform, this platform should not be marked as missing.

* public/v3/pages/summary-page.js:
(SummaryPageConfigurationGroup):


Canonical link: https://commits.webkit.org/193445@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-16 01:11:27 +00:00
Ryosuke Niwa 399dc37a08 Analysis task page shows an empty results for an irrelevant top-level test
https://bugs.webkit.org/show_bug.cgi?id=175252

Reviewed by Antti Koivisto.

The bug was caused by TestGroupResultsViewer always listing every top-level test which has a result for the
entire analysis task. Since a custom analysis task (perf try bots) allows multiple tests to be tested in each
group, we have to only list the tests which contains results in a particular test group.

* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.render): Find the tests that have results for the current test group instead
of for any test group in this analysis task.
any test
* public/v3/models/analysis-results.js:
(AnalysisResults):
(AnalysisResults.prototype.topLevelTestsForTestGroup): Renamed from highestTests. Now takes a test group
as an argument.
(AnalysisResults.prototype._computedTopLevelTests): Renamed from _computeHighestTests. Filters the results
with the specified test group.


Canonical link: https://commits.webkit.org/193216@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-11 19:26:00 +00:00
Jonathan Davis aedb18e30a Minor design changes for browserbench.org landing page
https://bugs.webkit.org/show_bug.cgi?id=176612

Reviewed by Darin Adler.

* index.html:
* resources/main.css: Shrink the logos and arrange them into a grid.
(main):
(.benchmarks):
(.benchmarks a):
(.benchmark):
(.benchmark:hover):
(.benchmark img):
(#ares-6-logo): Deleted.
(#motionmark-logo): Deleted.
(#speedometer-logo): Deleted.
(#jetstream-logo): Deleted.


Canonical link: https://commits.webkit.org/193189@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-10 23:34:16 +00:00
Aakash Jain 654fa1a550 Add initSyncers method in BuildbotTriggerable
https://bugs.webkit.org/show_bug.cgi?id=176125

Reviewed by Ryosuke Niwa.

* tools/sync-buildbot.js:
(syncLoop): Use initSyncers() which returns a promise. Modified to handle the promise.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable): Invokes initSyncers() appropriately.
(BuildbotTriggerable.prototype.initSyncers): Returns a promise which initialize all the syncers.
* server-tests/tools-buildbot-triggerable-tests.js: Updated tests to handle initSyncers().
* server-tests/tools-sync-buildbot-integration-tests.js: Ditto.


Canonical link: https://commits.webkit.org/193076@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-07 04:23:35 +00:00
Ryosuke Niwa 36093d0fc7 Add a button to show two weeks of data to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=176438

Reviewed by Saam Barati.

Add "2W" button to show 14 days of data on dashboard pages.

* public/v3/pages/dashboard-toolbar.js:
(DashboardToolbar):


Canonical link: https://commits.webkit.org/193025@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-06 05:25:14 +00:00
Ryosuke Niwa 0f5acf9b64 Build fix. OS X "revision" can have a space.
* public/include/commit-log-fetcher.php:


Canonical link: https://commits.webkit.org/192741@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-29 21:28:04 +00:00
Ryosuke Niwa 459557a6b4 Make it possible to specify A/B testing revision with a partial hash
https://bugs.webkit.org/show_bug.cgi?id=176047

Rubber-stamped by Chris Dumez.

Added the support for specifying a partial hash in A/B testing instead of the full hash.

* public/include/commit-log-fetcher.php:
(CommitLogFetcher::find_commit_id_by_revision): Extracted from associate-commit.php.
* public/privileged-api/associate-commit.php:
(main):
* public/privileged-api/create-test-group.php:
(main): Use find_commit_id_by_revision here to support scheduling an A/B testing with a partial hash.
* server-tests/privileged-api-create-test-group-tests.js:
(createAnalysisTask): Make it possible to customize revision string in some test cases.
* server-tests/resources/test-server.js:
(TestServer.prototype._stopApache): Fixed the bug that cleanup step always fails whenever the test file
runs more than 8s.


Canonical link: https://commits.webkit.org/192740@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-29 21:18:49 +00:00
Ryosuke Niwa 4f2d76305b Build fix. Creating trying a test group no longer updates the page.
* public/v3/models/test-group.js:
(TestGroup.createWithCustomConfiguration): Added the missing ignoreCache=true.



Canonical link: https://commits.webkit.org/192677@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-26 23:26:16 +00:00
Ryosuke Niwa dae510703a Build fix. Copy the missing statistics.js for Speedometer 2.0.
* resources/statistics.js: Copied from PerformanceTests/resources/statistics.js.



Canonical link: https://commits.webkit.org/192582@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-24 06:17:22 +00:00
Ryosuke Niwa 8f4a5757d5 Merge the latest version of Speedometer 2.0 to browserbench.org against at r221126.
Rubber-stamped by Yusuke Suzuki.

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.
* Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/app.js:
* Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/todomvc.css:
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/footer.js:
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/index.js:
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/item.js:
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/util.js:
(export.uuid):



Canonical link: https://commits.webkit.org/192579@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-24 02:12:48 +00:00
Ryosuke Niwa 3fbf4f6ae8 Merge the latest version of Speedometer 2.0 to browserbench.org against at r221119.
Rubber-stamped by Joseph Pecoraro.

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.


Canonical link: https://commits.webkit.org/192572@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-24 00:09:28 +00:00
Ryosuke Niwa c55bc5a50f Merge the latest version of Speedometer 2.0 to browserbench.org against at r221056.
Rubber-stamped by Joseph Pecoraro.

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.
* Speedometer2.0/resources/main.js:
(window.benchmarkClient.didFinishLastIteration):
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.9debb1b0a94f14d0ebe9.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.9debb1b0a94f14d0ebe9.js.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.a55034b424c795b1a9a8.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.a55034b424c795b1a9a8.js.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.bade2cb8992d8a68d0d7.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.bade2cb8992d8a68d0d7.js.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.9debb1b0a94f14d0ebe9.css: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.9debb1b0a94f14d0ebe9.css.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.bade2cb8992d8a68d0d7.css: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.bade2cb8992d8a68d0d7.css.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/src/store.js:
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015/src/store.js:



Canonical link: https://commits.webkit.org/192512@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-23 00:00:06 +00:00
Dewei Zhu df2947433c Performance Dashboard should be compatible with PHP 7.
https://bugs.webkit.org/show_bug.cgi?id=175813

Reviewed by Ryosuke Niwa.

Use `file_get_contents('php://input')` instead of '$HTTP_RAW_POST_DATA'.
Update test harness script to load right php module in httpd.

* ReadMe.md: JSON example format fix.
* public/api/report-commits.php: Stop using '$HTTP_RAW_POST_DATA'.
* public/api/report.php: Stop using '$HTTP_RAW_POST_DATA'.
* public/api/update-triggerable.php: Stop using '$HTTP_RAW_POST_DATA'.
* public/include/json-header.php: Stop using '$HTTP_RAW_POST_DATA'.
* public/include/report-processor.php: Stop using '$HTTP_RAW_POST_DATA'.
* server-tests/resources/test-server.conf: Load php5 or php7 module conditionally.
* server-tests/resources/test-server.js: Pass PHP version info while launching httpd.
(TestServer.prototype._startApache):
* tools/remote-cache-server.py: Pass PHP version info while launching httpd.
(start_httpd):
* tools/remote-server-relay.conf: Load php5 or php7 module conditionally.
* tools/sync-buildbot.js:
(syncLoop.const.makeTriggerable):
(syncLoop):

Canonical link: https://commits.webkit.org/192508@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-22 23:04:19 +00:00
Ryosuke Niwa 01559b166f Merge the latest version of Speedometer 2.0 to browserbench.org
Rubber-stamped by Joseph Pecoraro.

* Speedometer2.0: Replaced with PerformanceTests/Speedometer.
* Speedometer2.0/resources/benchmark-runner.js:
* Speedometer2.0/resources/todomvc/architecture-examples/angular/dist/inline.b342d102ba4a53bf2002.bundle.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/dist/main.779eb2f1ddbe23ac61c7.bundle.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/dist/polyfills.2d45a4c73c85e24fe474.bundle.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/dist/vendor.b4be818cb6d8028f9192.bundle.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/e2e: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/e2e/app.e2e-spec.ts: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/e2e/app.po.ts: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angular/e2e/tsconfig.e2e.json: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/angularjs/node_modules/angular-resource/angular-resource.js:
* Speedometer2.0/resources/todomvc/architecture-examples/angularjs/node_modules/angular-route/angular-route.js:
* Speedometer2.0/resources/todomvc/architecture-examples/angularjs/node_modules/angular/angular.js:
* Speedometer2.0/resources/todomvc/architecture-examples/backbone/node_modules/jquery/dist/jquery.js:
* Speedometer2.0/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-app-css/index.css:
* Speedometer2.0/resources/todomvc/architecture-examples/emberjs/source/app/instance-initializers: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/emberjs/source/app/instance-initializers/global.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/emberjs/source/config/environment.js:
* Speedometer2.0/resources/todomvc/architecture-examples/emberjs/source/tests/.jshintrc: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/emberjs/source/tests/helpers/module-for-acceptance.js:
* Speedometer2.0/resources/todomvc/architecture-examples/emberjs/source/tests/helpers/start-app.js:
* Speedometer2.0/resources/todomvc/architecture-examples/react-redux/dist/static/css/main.d43d2909.css: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/react-redux/dist/static/js/main.946269ff.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/vuejs-cli/dist/static/css/app.677b45842d9f8b96e5b23c18969233b7.css: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/vuejs-cli/dist/static/js/app.b0e835874bc8949670d1.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/vuejs-cli/dist/static/js/manifest.84b2b4fceb74ab1f91f3.js: Removed.
* Speedometer2.0/resources/todomvc/architecture-examples/vuejs-cli/dist/static/js/vendor.a52517c5aa98e7fbea2e.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.73bcc5d3c1d07180f0e3.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.app.73bcc5d3c1d07180f0e3.js.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.112bf70a7f3deebf1f93.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.manifest.112bf70a7f3deebf1f93.js.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.efaa3e0e20077c8e7471.js: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/bundle.vendor.efaa3e0e20077c8e7471.js.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.73bcc5d3c1d07180f0e3.css: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.app.73bcc5d3c1d07180f0e3.css.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.efaa3e0e20077c8e7471.css: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/es2015-babel-webpack/dist/styles.vendor.efaa3e0e20077c8e7471.css.map: Removed.
* Speedometer2.0/resources/todomvc/vanilla-examples/vanillajs/js/store.js:



Canonical link: https://commits.webkit.org/192458@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-22 04:12:14 +00:00
Ross Kirsling cf3e903984 Add Sony to domain affiliations on team page
https://bugs.webkit.org/show_bug.cgi?id=175806

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-08-21
Reviewed by Alex Christensen.

* wp-content/themes/webkit/team.php:

Canonical link: https://commits.webkit.org/192456@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-22 02:25:12 +00:00
Ryosuke Niwa 9b3fccb87b REGRESSION(r219640): Speedometer no longer runs on Safari 7
https://bugs.webkit.org/show_bug.cgi?id=175749

Reviewed by Joseph Pecoraro.

PerformanceTests:

Use regular string instead of template literal to make the script compatible with older versions of Safari.

* Speedometer/resources/benchmark-runner.js:
(BenchmarkRunner.prototype._runTest):

Websites/browserbench.org:

Fix the bug on browserbench.org.

* Speedometer/resources/benchmark-runner.js:
(BenchmarkRunner.prototype._runTest):


Canonical link: https://commits.webkit.org/192411@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-19 03:05:57 +00:00
Ryosuke Niwa 1aa3f7792e Number each section in ReadMe.md and add more clarifications
https://bugs.webkit.org/show_bug.cgi?id=175687

Rubber-stamped by Joseph Pecoraro.

Numbered each section and added more clarifications per issues Aakash encountered.

* ReadMe.md:



Canonical link: https://commits.webkit.org/192351@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-17 22:03:37 +00:00
Ryosuke Niwa db98284507 Build fix. Make the test work with the latest versions of node modules.
* server-tests/privileged-api-upload-file-tests.js:



Canonical link: https://commits.webkit.org/192348@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-17 21:23:46 +00:00
Filip Pizlo 753a4af6de Caging shouldn't have to use a patchpoint for adding
https://bugs.webkit.org/show_bug.cgi?id=175483

Reviewed by Mark Lam.
Source/JavaScriptCore:


Caging involves doing a Add(ptr, largeConstant). All of B3's heuristics for how to deal with
constants and associative operations dictate that you always want to sink constants. For example,
Add(Add(a, constant), b) always becomes Add(Add(a, b), constant). This is profitable because in
typical code, it reveals downstream optimizations. But it's terrible in the case of caging, because
we want the large constant (which is shared by all caging operations) to be hoisted. Reassociating to
sink constants obscures the constant in this case. Currently, moveConstants is not smart enough to
reassociate, so instead of sinking largeConstant, it tries (and often fails) to sink some other
constants instead. Without some hacks, this is a 5% Kraken regression and a 1.6% Octane regression.
It's not clear that moveConstants could ever be smart enough to rematerialize that constant and then
hoist it - that would require quite a bit of algebraic reasoning. But the only case we know of where
our current constant reassociation heuristics are wrong is caging. So, we can get away with some
hacks for just stopping B3's reassociation only in this specific case.

Previously, we achieved this by concealing the Add(ptr, largeConstant) inside a patchpoint. That's
OK, but patchpoints are expensive. They require a SharedTask instance. They require callbacks from
the backend, including during register allocation. And they cannot be CSE'd. We do want B3 to know
that if we cage the same pointer in two places, both places will compute the same value.

This patch improves the situation by introducing the Opaque opcode. This is handled by LowerToAir as
if it was Identity, but all prior phases treat it as an unknown pure unary idempotent operation. I.e.
they know that Opaque(x) == Opaque(x) and that Opaque(Opaque(x)) == Opaque(x). But they don't know
that Opaque(x) == x until LowerToAir. So, you can use Opaque exactly when you know that B3 will mess
up your code but Air won't. (Currently we know of no cases where Air messes things up on a large
enough scale to warrant new opcodes.)

This change is perf-neutral, but may start to help as I add more uses of caged() in the FTL. It also
makes the code a bit less ugly.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects const):
(JSC::B3::Value::key const):
(JSC::B3::Value::isFree const):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize const):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::caged):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::opaque):
* ftl/FTLOutput.h:

Websites/webkit.org:


Write documentation for the new Opaque opcode.

* docs/b3/intermediate-representation.html:



Canonical link: https://commits.webkit.org/192206@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-12 18:44:48 +00:00
Jonathan Davis 02df470f40 Fixed superscript rendering for blog posts
https://bugs.webkit.org/show_bug.cgi?id=175285

Reviewed by Filip Pizlo.

* wp-content/themes/webkit/style.css:
(sup): Added.


Canonical link: https://commits.webkit.org/192004@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-07 22:31:32 +00:00
James Craig 232bef82a0 2017-08-06 James Craig <jcraig@apple.com>
Update prefers-reduced-motion demos to link back to blog post
        https://bugs.webkit.org/show_bug.cgi?id=175251

        Unreviewed, added some cross links to older demo files.

        * blog-files/prefers-reduced-motion/axi.htm:
        * blog-files/prefers-reduced-motion/prm.htm:



Canonical link: https://commits.webkit.org/191981@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-06 23:24:17 +00:00
Jonathan Davis 44d6513c38 Fixed loading feature status page queries and anchor link URLs
https://bugs.webkit.org/show_bug.cgi?id=175156

Reviewed by Simon Fraser.

* wp-content/themes/webkit/status.php:


Canonical link: https://commits.webkit.org/191938@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-04 18:32:09 +00:00
Ryosuke Niwa 63049de8b0 Build fix. Fixed a typo. task.id() isn't a thing in this function.
* public/v3/models/test-group.js:
(TestGroup.createWithCustomConfiguration):



Canonical link: https://commits.webkit.org/191789@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-31 23:30:25 +00:00
Frédéric Wang 129d4a1286 Unreviewed, minor adjustments to the previous demo.
Patch by Frederic Wang <fwang@igalia.com> on 2017-07-26

* demos/frames/index.html: Added. Index page for the list of demos.
* demos/frames/sandboxing/index.html: Minor fixes.

Canonical link: https://commits.webkit.org/191679@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-26 14:23:21 +00:00
Frédéric Wang 448df68a40 Unreviewed, add demos (frame sandboxing and scrolling) for a blog post.
Patch by Frederic Wang <fwang@igalia.com> on 2017-07-26

* demos/frames/sandboxing/am-i-sandboxed.html: Added.
* demos/frames/sandboxing/framebusting-success.html: Added.
* demos/frames/sandboxing/framebusting-without-user-activation.html: Added.
* demos/frames/sandboxing/index.html: Added.
* demos/frames/scrollable-iframes.html: Added.
* demos/frames/scrollingElement.html: Added.

Canonical link: https://commits.webkit.org/191677@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-26 13:43:25 +00:00
Jiewen Tan 3505f74304 Unreviewed, add the final demo page for a WebCrypto API blog post
* demos/webcrypto/pbkdf2.html: Added.

Canonical link: https://commits.webkit.org/191502@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-20 17:18:56 +00:00
Jiewen Tan 996c38161c Unreviewed, add yet another demo page for a WebCrypto API blog post
* demos/webcrypto/aes-gcm.html:
* demos/webcrypto/alice.png: Added.
* demos/webcrypto/bob.png: Added.
* demos/webcrypto/ecdh.html: Added.

Canonical link: https://commits.webkit.org/191499@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-20 16:42:39 +00:00
Jiewen Tan ea6c9bee6c Unreviewed, add another demo page for a WebCrypto API blog post
* demos/webcrypto/aes-gcm.html: Added.
* demos/webcrypto/asynchronous-execution.html:
* demos/webcrypto/common.js: Added.

Canonical link: https://commits.webkit.org/191495@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-20 15:46:51 +00:00
Jiewen Tan 9e8ee57cf2 Unreviewed, add a demo page for a WebCrypto API blog post
* demos/webcrypto/asynchronous-execution-worker.js: Added.
* demos/webcrypto/asynchronous-execution.html: Added.

Canonical link: https://commits.webkit.org/191491@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-20 14:25:34 +00:00
Ryosuke Niwa 1adca3541e Merge r219640 into Speedometer 1.0.
* Speedometer/resources/benchmark-runner.js:
(BenchmarkRunner.prototype._writeMark):
(BenchmarkRunner.prototype._runTest):
(BenchmarkRunner.prototype._runTestAndRecordResults):


Canonical link: https://commits.webkit.org/191454@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-19 00:33:07 +00:00
Saam Barati 77ac766bb8 Fix ambiguous description text in ARES-6 about the data the benchmark measures
https://bugs.webkit.org/show_bug.cgi?id=174510

Rubber stamped by Filip Pizlo.

* ARES-6/about.html:


Canonical link: https://commits.webkit.org/191334@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-14 17:47:28 +00:00
Ryosuke Niwa dc8e2630f2 Another build fix.
* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype._updateCommitLogViewer):



Canonical link: https://commits.webkit.org/191222@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-12 03:00:04 +00:00
Ryosuke Niwa 40ffbf5f0e Build fix. It looks like the code here is racy.
* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure):
(ChartPaneBase.prototype.setOpenRepository):



Canonical link: https://commits.webkit.org/191221@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-12 02:38:03 +00:00
Ryosuke Niwa ac6599906b Show the roots built by perf try bots on results page
https://bugs.webkit.org/show_bug.cgi?id=174305

Reviewed by Joseph Pecoraro.

Show build products created by a perf try bots so that we can download them for local testing.

* public/v3/components/test-group-revision-table.js:
(TestGroupRevisionTable.prototype._renderTable): Find the set of repositories for which a patch is applied.
Show build products for all commit sets for such a repository since when WebKit is built with a patch in
one configuration, the other configuration also needs to be built for consistency.
(TestGroupRevisionTable.prototype._buildCommitCell): Added the hyperlink for build products.
(TestGroupRevisionTable.prototype._buildFileInfo): Takes a string to override the file's label. Since all
build products made by bots tend to have the same filename, we show the label of "Build product" instead.
(TestGroupRevisionTable.prototype._mergeCellsWithSameCommitsAcrossRows): Fixed a bug that any entry with
a patch wasn't getting merged since it was comparing against the result commit set, which does not contain
the patch (only requested commit set contains a patch).


Canonical link: https://commits.webkit.org/191211@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-11 22:54:55 +00:00
Ryosuke Niwa 463edf873f Address Antti's review comment.
* public/v3/models/analysis-results.js:
(AnalysisResults.prototype.containsTest):


Canonical link: https://commits.webkit.org/191165@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-11 03:46:16 +00:00
Ryosuke Niwa 59a2a422fd A/B testing results page show results for the top-level tests instead of the one being analyzed
https://bugs.webkit.org/show_bug.cgi?id=174304

Reviewed by Antti Koivisto.

When a specific subtest is analyzed (e.g. Images subtest of MotionMark), then TestGroupResultsViewer
should expand and highlight that specific subtest instead of simply showing the top-level test's score.
This is especially misleading since AnalysisResultsViewer (stacking bars for each test group) uses
the score of the specific subtest being analyzed.

Fixed the bug by passing in the metric associated with the analysis task from AnalysisTaskPage to
TestGroupResultsViewer via AnalysisTaskTestGroupPane. Also made TestGroupResultsViewer.setAnalysisResults
auto-expand the tests that are ancestors of the specified metric. Without that, the test won't be shown
to the user until the ancestor tests are expanded by the user.

Also fixed the bug that we were always listing sub-tests regardless of whether they have results or not.
Since tests tend to change over time, we shouldn't show a test if it doesn't have any results associated.

* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.setAnalysisResults): Expand the ancestor tests of the metric.
(TestGroupResultsViewer.prototype._buildRowsForTest): Exit early if this test doesn't have any results.
* public/v3/models/analysis-results.js:
(AnalysisResults.prototype.containsTest): Added.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskTestGroupPane.prototype.setAnalysisResults): Takes a metric to pass it to the results viewer.
(AnalysisTaskPage.prototype._assignTestResultsIfPossible):


Canonical link: https://commits.webkit.org/191164@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-11 03:45:00 +00:00
Ryosuke Niwa 0b99ef5b22 Safari 10.1 fails to upload a patch on perf try bots page
https://bugs.webkit.org/show_bug.cgi?id=174214

Reviewed by Chris Dumez.

Added the workaround to make the analysis task page work on Safari 10.1

* public/v3/components/instant-file-uploader.js:
(InstantFileUploader.prototype._uploadFiles): Convert files to an array since for-of doesn't work otherwise on Safari 10.1.
* public/v3/models/uploaded-file.js:
(UploadedFile._computeSHA256Hash): Fallback to crypto.webkitSubtle since crypto.subtle isn't available on Safari 10.1 or 11.


Canonical link: https://commits.webkit.org/191075@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-07 02:59:11 +00:00
Ryosuke Niwa 64182975dc Fix a typo pointed out by Andreas Kling.
* public/v3/components/instant-file-uploader.js:
(InstantFileUploader.prototype._uploadFiles):
* public/v3/models/uploaded-file.js:
(UploadedFile.fetchUploadedFileWithIdenticalHash): Renamed from fetchUnloadedFileWithIdenticalHash.


Canonical link: https://commits.webkit.org/190964@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-04 04:08:16 +00:00
Ryosuke Niwa b19d29b3a2 Add an admin page to manage uploaded files
https://bugs.webkit.org/show_bug.cgi?id=174089

Reviewed by Andreas Kling.

Add an admin page to see the disk usage per user as well as the total, and to prune any zombie files (ones marked
as deleted but aren't actually deleted in the filesystem).

* public/admin/files.php: Added.
(format_size): Added.
* public/include/admin-header.php:


Canonical link: https://commits.webkit.org/190945@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-03 21:16:01 +00:00
Ryosuke Niwa 2a5adb6296 Roots uploaded by bots don't get author specified properly
https://bugs.webkit.org/show_bug.cgi?id=174087

Reviewed by Andreas Kling.

When a root file is uploaded from the bot, we manually specify the remote user to upload_file_in_transaction.
However, this was getting ignored by create_uploaded_file_from_form_data since it was always calling
remote_user_name to get the user name off of $_SERVER.

Fixed the bug by passing in the user name from upload_file_in_transaction to create_uploaded_file_from_form_data.

* public/include/uploaded-file-helpers.php:
(create_uploaded_file_from_form_data): Take the remote user as an argument instead of calling remote_user_name.
(upload_file_in_transaction):
* server-tests/api-upload-root-tests.js: Updated an existing test cases to make sure root files' author is set.
(createTestGroupWihPatch): Manually override the author of a test group for testing.


Canonical link: https://commits.webkit.org/190944@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-03 21:14:52 +00:00
Ryosuke Niwa bd9e8f9e5b Prune unused uploaded files when the file quota is reached
https://bugs.webkit.org/show_bug.cgi?id=174086

Reviewed by Andreas Kling.

Made /privileged-api/uploaded-file and /api/upload-root automatically delete old uploaded files when
uploading a new file results in the file quota to be exceeded. Also added the notion of the total quota
to avoid running out of a disk when there are hundreds of users each uploading near their quota.

* config.json: Added a sample total disk quota of 100GB.
* public/include/uploaded-file-helpers.php:
(query_file_usage_for_user): Renamed from query_total_file_size.
(query_total_file_usage): Added.
(upload_file_in_transaction):
(delete_file): Added.
(prune_old_files): Added.
* server-tests/privileged-api-upload-file-tests.js: Added tests for deleting old uploaded files as well as
tests for the total quota.
* server-tests/resources/test-server.js:
(TestServer.prototype.testConfig): Added uploadTotalQuotaInMB to the test configuration.


Canonical link: https://commits.webkit.org/190943@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-03 21:13:42 +00:00
Jon Lee 3afacc6e2e Add a WebRTC example for a blog post
https://bugs.webkit.org/show_bug.cgi?id=174049

Reviewed by Youenn Fablet.

Example does a typical WebRTC video call, but uses canvas to do some image effects.
Image effects will last for 30 seconds.
After that time, the video stream is directly sent.
This illustrates using RTCPeerConnection, replaceTrack and canvas capture.

* blog-files/webrtc/pc-with-effects/LICENSE: Added.
* blog-files/webrtc/pc-with-effects/glfx.js: Added.
* blog-files/webrtc/pc-with-effects/index.html: Added.
* blog-files/webrtc/pc-with-effects/main.css: Added.
* blog-files/webrtc/pc-with-effects/main.js: Added.


Canonical link: https://commits.webkit.org/190895@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-01 04:53:14 +00:00
Ryosuke Niwa dab46ee9f6 UploadedFile should include the file extension in its url
https://bugs.webkit.org/show_bug.cgi?id=174009

Reviewed by Chris Dumez.

Some command line tools such as darwinup use the file extension to determine the file type.
Include the file extension in the URL of an uploaded file to make it work with these tools.

* public/include/uploaded-file-helpers.php:
(format_uploaded_file): Include the file extension.
* public/v3/models/uploaded-file.js:
(UploadedFile):
(UploadedFile.prototype.url): Return the URL with hthe file extension specified. /api/uploaded-file
already supports having the file extension specified.
* server-tests/tools-sync-buildbot-integration-tests.js: Updated test cases.
* unit-tests/buildbot-syncer-tests.js: Ditto.


Canonical link: https://commits.webkit.org/190842@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-30 04:43:00 +00:00
Saam Barati 4550f689db Add a Object rest/spread test to the experimental features test page
https://bugs.webkit.org/show_bug.cgi?id=173947

Rubber stamped by Dean Jackson.

* experimental-features.html:



Canonical link: https://commits.webkit.org/190780@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-29 00:08:46 +00:00
Carlos Alberto Lopez Perez ef2b23bbf5 pretty patch doesn't show image diffs with newer versions of git
https://bugs.webkit.org/show_bug.cgi?id=173691

A new security check added in git >= 2.3.3 causes it to abort
when the tool runs "git apply" to generate the images.
Detect if git supports the flag --unsafe-paths and pass it.

Reviewed by Darin Adler.

* PrettyPatch/PrettyPatch.rb:


Canonical link: https://commits.webkit.org/190594@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-22 19:38:39 +00:00
Saam Barati 5bc662f250 ARES-6 incorrectly measures Worst 4 Iterations
https://bugs.webkit.org/show_bug.cgi?id=172960

Reviewed by Mark Lam.

Version 1.0 of ARES-6 was accidentally measuring the first
4 iterations, instead of the worst 4. This patch fixes the
bug and bumps the version to 1.0.1.

* ARES-6/glue.js:
(driver.reportResult):
* ARES-6/results.js:
(Results.prototype.reportResult):


Canonical link: https://commits.webkit.org/189922@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-07 19:13:46 +00:00
Jonathan Davis c4f5ea19fa Update the design of the WebKit Feature Status page
https://bugs.webkit.org/show_bug.cgi?id=173036

Reviewed by Simon Fraser.

* wp-content/themes/webkit/functions.php: Fixed a bad function call.
* wp-content/themes/webkit/status.php: Implemented redesign with saved search.
* wp-content/themes/webkit/style.css:
(.feature-header:after):
(@media only screen and (max-width: 920px)):
(@media only screen and (max-width: 600px)):
(.feature-filters): Deleted.
(.feature-filters.opened): Deleted.
(.feature-filters:after): Deleted.
(.feature-filters.opened:after): Deleted.


Canonical link: https://commits.webkit.org/189910@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-07 16:04:37 +00:00
Joseph Pecoraro ad786d9af4 Add a WebGPU test to the experimental features test page
https://bugs.webkit.org/show_bug.cgi?id=172953

Reviewed by Darin Adler.

* experimental-features.html:

Canonical link: https://commits.webkit.org/189867@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-06 18:11:21 +00:00
Joseph Pecoraro 20ee944758 Move Resource Timing / User Timing from experimental features into main preferences
https://bugs.webkit.org/show_bug.cgi?id=172950

Reviewed by Darin Adler.

Source/WebCore:

* features.json:
Graduate some features from In Development to Supported.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
Move Resource Timing and User Timing out of the Experimental Features section.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
Move out no longer experimental features to the main list.

Websites/webkit.org:

* experimental-features.html:
Remove no longer experimental features.

Canonical link: https://commits.webkit.org/189866@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-06 18:11:19 +00:00
Saam Barati add368ef7b Add a version number to ARES-6
https://bugs.webkit.org/show_bug.cgi?id=172962

Reviewed by Yusuke Suzuki.

* ARES-6/glue.js:
(driver.reportResult):


Canonical link: https://commits.webkit.org/189847@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-06 07:57:45 +00:00
Saam Barati 3fd5a46f94 Update index.html to include ARES-6.
Rubber stamped by Ryosuke Niwa.

* index.html:



Canonical link: https://commits.webkit.org/189816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-05 17:49:25 +00:00
Filip Pizlo 5860d4086d Atomics.load and Atomics.store need to be fully fenced
https://bugs.webkit.org/show_bug.cgi?id=172844

Reviewed by Keith Miller.

Source/JavaScriptCore:

Implement fully fenced loads and stores in FTL using AtomicXchgAdd(0, ptr) for the load and
AtomicXchg(value, ptr) for the store.

DFG needed no changes because it implements all atomics using a CAS loop.

AtomicsObject.cpp now uses new Atomic<> API for fully fences loads and stores.

Prior to this change, we used half fences (acquire/release) for atomic loads and stores. This
is not correct according to my current understanding of the SAB memory model, which requires
that atomic operations are SC with respect to everything not just other atomics.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::atomicWeakCAS):
* ftl/FTLOutput.h:
* runtime/AtomicsObject.cpp:

Source/WTF:

Add loadFullyFenced and storeFullyFenced to Atomic<>.

* wtf/Atomics.h:
(WTF::Atomic::loadFullyFenced):
(WTF::Atomic::storeRelaxed):
(WTF::Atomic::storeFullyFenced):
(WTF::atomicLoadFullyFenced):
(WTF::atomicStoreFullyFenced):

Websites/webkit.org:

Update documentation to say that the canonical way to do fully fenced loads and stores is
AtomicXchgAdd(0, ptr) and AtomicXchg(value, ptr), respectively.

* docs/b3/intermediate-representation.html:



Canonical link: https://commits.webkit.org/189750@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-02 17:58:24 +00:00
Saam Barati 9cb030dcef Ensure a good experience for ARES-6 error reporting
https://bugs.webkit.org/show_bug.cgi?id=171699

Reviewed by Filip Pizlo and Jon Davis.

This patch fixes a bug where we would silently fail running ARES-6. The bug
was that we were calling reportError with the wrong |this| value.
I also cleaned up a bit of the code around error reporting. We
now indicate which test failed, and update the status to reflect
that a failure happened.

This patch also modifies the CSS a bit to work better on smaller
screened devices. The CSS prevents the status from having a line
break both when an error is reported and when we're running the
benchmark.

* ARES-6/driver.js:
(Driver):
(Driver.prototype.reportError):
* ARES-6/results.js:
(Results.prototype.reportError):
(Results):
* ARES-6/styles.css:
(.start):
(#status):
(.failed):
(#status.failed):
(.test .failed:before):
(#magic):
(@media only screen and (max-width: 784px)):
(.test):
(p):
(@media only screen and (max-width: 320px)):


Canonical link: https://commits.webkit.org/189733@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-02 05:55:28 +00:00
Ryosuke Niwa e8ce3ae67b Don't shouldn't create a request to build a patch if there is no patch to build
https://bugs.webkit.org/show_bug.cgi?id=172791

Reviewed by Chris Dumez.

When a commit set doesn't have a patch specified, don't create a request to build. For example, when we're comparing
WebKit in the system to WebKit with a patch, there is nothing to build for the first commit set.

However, when conducting an A/B testing, it's advisible to compare WebKit built with and without a patch on a single
machine with the same version of Xcode, etc... For this reason, we still create a request to build for a commit set
if there is another commit set with a patch which uses the same repository group.

* public/privileged-api/create-test-group.php:
(main): Fixed the bug. Only create a build request to build if there is a matching repository group with a patch.
* server-tests/privileged-api-create-test-group-tests.js: Added a test case.


Canonical link: https://commits.webkit.org/189685@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-01 01:55:52 +00:00
Ryosuke Niwa 205220516d Allow sync-buildbot.js to set a buildbot property only when patches are built
https://bugs.webkit.org/show_bug.cgi?id=172743

Rubber-stamped by Chris Dumez.

Added the ability to specify a buildbot property only when there are build requests to build a patch.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype.scheduleRequest): Pass in the list of build requests that belong to the same test group.
(BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): Ditto.
(BuildbotSyncer.prototype._propertiesForBuildRequest): Added the support for specifying a conditional property.
For the condition type of "built", we check if there was any other
(BuildbotSyncer._parseRepositoryGroup): Added the support for "ifBuilt" conditional.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Pass in the list of build requests that
belong to the same test group.
(BuildbotTriggerable.prototype._scheduleRequestWithLog): Ditto.

* unit-tests/buildbot-syncer-tests.js:  Added test case for newly added "ifBuilt" as well as specifying a patch.
Updated the various test cases per the addition of new argument to scheduleRequest, _propertiesForBuildRequest,
and scheduleRequestInGroupIfAvailable.
(createSampleBuildRequestWithPatch): Added.

* unit-tests/resources/mock-v3-models.js:
(MockModels.inject): Made "ios-svn-webkit" accept a WebKit patch and roots to allow new testing.


Canonical link: https://commits.webkit.org/189670@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-31 20:24:59 +00:00
Jonathan Davis fd35125257 Reduce Safari Technology Preview Release Notes posts shown on homepage
https://bugs.webkit.org/show_bug.cgi?id=172364

Reviewed by Daniel Bates.

* wp-content/themes/webkit/functions.php: Load some extra posts.
* wp-content/themes/webkit/widgets/post.php: Show STP blog posts when it is the current featured post.


Canonical link: https://commits.webkit.org/189662@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-31 18:57:12 +00:00
Ryosuke Niwa cea6825f1c sync-builedbot.js fails to schedule the second request to test with a patch
https://bugs.webkit.org/show_bug.cgi?id=172701

Reviewed by Antti Koivisto.

The bug was caused by an assertion failure in BuildbotTriggerable's _pullBuildbotOnAllSyncers failing to
take into account that for a test group with a patch could be associated with two syncers, one to build
a patch and another to run tests. Fixed the bug by differentiating the two types of syncers by buildSyncer
and testSyncer per test group.

* server-tests/tools-sync-buildbot-integration-tests.js: Extended a test case so that it would hit the
assertion without the fix.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.syncOnce): Use the right kind of the syncer to schedule a build or a test.
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Associate a given syncer based on the kind of
the build request it processed, and assert accordingly.


Canonical link: https://commits.webkit.org/189609@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-30 17:09:36 +00:00
Ryosuke Niwa a04bad9035 Fix UI glitches with a custom analysis test group with a patch
https://bugs.webkit.org/show_bug.cgi?id=172694

Reviewed by Sam Weinig.

Fix the following UI glitches with perf try bots:
 - Retrying an A/B testing with a patch fails.
 - A patch specified in an test group does not get specified in the configurator.
 - Drag & dropping a patch doesn't work.
 - Results for custom analysis tasks don't get shown.

* public/api/test-groups.php:
(main): Fix a bug that test group's platform does not match that of the request'ed platform. Since each test
group is associated with platform, just use that instead of querying test_configurations. This resulted in
the configurator not being able to find a triggerable in some cases.

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator):
(CustomAnalysisTaskConfigurator.prototype.setCommitSets): Add patches in the commit set.
(CustomAnalysisTaskConfigurator.prototype._setUploadedFilesToUploader): Now clears the exiting uploaded files
Also renamed from _setUploadedFilesIfEmpty.
(CustomAnalysisTaskConfigurator.prototype._setPatchFiles): Added.
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): We no longer update the list of roots
for the comparsion when a new root is added to the baseline.
(CustomAnalysisTaskConfigurator.prototype._configureComparison): Copy over the list of patches and roots when
starting to configure the comparsion.

* public/v3/components/instant-file-uploader.js:
(InstantFileUploader.prototype.clear): Added.
(InstantFileUploader.prototype.didConstructShadowTree): Added event handlers for dragover & drop events to
allow specifying a patch and root using drag & drop. Unfortunately, this still doesn't work in WebKit due to
a bug in our shadow DOM implementation.
(InstantFileUploader.prototype._didFileInputChange):
(InstantFileUploader.prototype._uploadFiles): Extracted from _didFileInputChange.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskTestGroupPane.prototype.setAnalysisResults): No longer takes metric.
(AnalysisTaskTestGroupPane.cssTemplate): Removed unused rules. Also disallow flexing on the list of test groups
to avoid the name of a test froup from overflowing on top of the results pane.
(AnalysisTaskPage.prototype._assignTestResultsIfPossible): Set setAnalysisResults even when metric is not set
as is the case for a custom analysis task.
(AnalysisTaskPage.prototype._retryCurrentTestGroup): Use createWithCustomConfiguration to allow retrying of
an A/B testing with a patch in a custom analysis task.
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList):


Canonical link: https://commits.webkit.org/189593@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-30 05:03:43 +00:00
Devin Rousso 18e3a8e224 Provide bug information when https://webkit.org/b/# URLs are added in comments
https://bugs.webkit.org/show_bug.cgi?id=169707

Reviewed by David Kilzer.

* Bugzilla/Template.pm:
(quoteUrls):


Canonical link: https://commits.webkit.org/189558@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-26 20:59:30 +00:00
Ryosuke Niwa e5fd9fac8e Show patches applied in each A/B testing build requests
https://bugs.webkit.org/show_bug.cgi?id=172636

Reviewed by Antti Koivisto.

List patches applied along side revisions inn the list of revisions for an A/B tesing build requests if there
are any patches applied.

* public/v3/components/test-group-revision-table.js:
(TestGroupRevisionTable.prototype._renderTable): Indicate which request is to build a patch and which one is
to run tests.
(TestGroupRevisionTable.prototype._buildCommitCell): Include the patch file's information when there is one.
We need to use the requested commit set instead of the one reported by testers or builders since they don't
include patch or root information.
(TestGroupRevisionTable.prototype._buildCustomRootsCell):
(TestGroupRevisionTable.prototype._buildFileInfo): Extracted from _buildCustomRootsCell.


Canonical link: https://commits.webkit.org/189539@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-26 08:16:00 +00:00
Ryosuke Niwa bb89a175ca The queue page is broke when there is a custom analysis task
https://bugs.webkit.org/show_bug.cgi?id=172631

Reviewed by Antti Koivisto.

Fix the bug that we were always assuming each build request to have a test associated.

* public/v3/models/test-group.js:
(TestGroup.createAndRefetchTestGroups): Fixed the bug that we were referring to a non-existent variable task.
* public/v3/pages/build-request-queue-page.js:
(BuildRequestQueuePage.prototype._constructBuildRequestTable): Fixed the bug. Collect every request in the group
and then find the first test request's test name. Make it clear that we're waiting for a build as needed.


Canonical link: https://commits.webkit.org/189538@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-26 08:15:35 +00:00
Ryosuke Niwa 44dc4d8c52 Syncing script shouldn't schedule a build request when there is a build from another test group in progress
https://bugs.webkit.org/show_bug.cgi?id=172577
<rdar://problem/32395049>

Reviewed by Chris Dumez.

When a buildbot master gets restarted while there is an in-progress build and a pending build, the master will
re-schedule the currently running build, and this can result in multiple build requests from different test
groups being scheduled simultaneously.

sync-buildbot.js was supposed to recover from this state by only processing build requests from one test group
at a time and eventually come back to a state where only a single test group is running per buildbot slave.

We had a test for this particular case but it wasn't testing what it claimed to test. Rewriten the test case
and fixed the bug by explicitly checking this condition and treating it as if there is a pending build already
scheduled in the builder in this case.

* public/api/test-groups.php:
(main): Fixed a regression from r217397. Return the platform ID of the first request when none of the requets
have been processed yet or all of them had failed.
* server-tests/tools-buildbot-triggerable-tests.js: Rewritten a test case intended to cover this bug.
(.assertRequestAndResolve): Added.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): Fixed the bug. Avoid scheduling a new request on
this syncer if there is a build in progress for a test group different from that of the new request. Reuse the
code we had to deal with a pending build for this purpose.


Canonical link: https://commits.webkit.org/189512@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-25 21:10:09 +00:00
Ryosuke Niwa 4226d68ca5 Opening an analysis task from the queue page is broken
https://bugs.webkit.org/show_bug.cgi?id=172559
<rdar://problem/32389708>

Rubber-stamped by Chris Dumez.

Fix the bug that opening the analysis task page from the queue page results in multiple assertion failures
as well as the list of test groups in the analysis task page not getting updated.

* public/v3/models/build-request.js:
(BuildRequest.prototype.updateSingleton): Because /api/build-requests/ do not include test groups, it's
possible for testGroup to be dynamically updated upon loading an analysis task page. Update _testGroup in
such instances instead of asserting that it doesn't happen.

* public/v3/models/data-model.js:
(DataModelObject.cachedFetch): Because various code to create model objects from the result of a JSON API
modify the fetched content in irreversible manner, e.g. `object.platform = Platform.findById(object.platform)`
we must return a fresh new content each time even if the result had been cached.

* public/v3/models/test-group.js:
(TestGroup.prototype.platform): Return this._platform as that's not available.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage):
(AnalysisTaskPage.prototype._resetVariables): Extracted from the constructor.
(AnalysisTaskPage.prototype.updateFromSerializedState): Reset all instance variables when opening a new
analysis task page. This would avoid showing the stale result even when fetching new test groups had failed.

* unit-tests/test-groups-tests.js: Added a test case for fetching the same test group twice. This used to hit
a problem in BuildRequest.constructBuildRequestsFromData which overrode platform property of each raw content
with a Platform model object because in the case of a cached fetch, we end up trying to look up the platform
again using the result of stringifying the Platform object instead of the platform ID included in the original
fetched content.
(sampleTestGroup): Added "platform" as included in the JSON API's response now.


Canonical link: https://commits.webkit.org/189469@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-24 23:54:43 +00:00
Ryosuke Niwa c57d8e1c2a The commit log viewer can overlap the analysis results viewer
https://bugs.webkit.org/show_bug.cgi?id=172534

Rubber-stamped by Chris Dumez.

Allocate the padding on the right for the commit log viewer, and add a horizontal scrollbar
to the analysis results viewer instead of letting it expand beneath the commit log viewer.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskResultsPane.htmlTemplate):
(AnalysisTaskResultsPane.cssTemplate):


Canonical link: https://commits.webkit.org/189468@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-24 23:52:06 +00:00
Ryosuke Niwa 11c4d58288 Sycning script build fix after r217378.
* tools/sync-buildbot.js:
(syncLoop):

Canonical link: https://commits.webkit.org/189460@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-24 19:43:39 +00:00
Ryosuke Niwa 6e77fddfc3 Add the support for perf try bots to sync-buildbot.js
https://bugs.webkit.org/show_bug.cgi?id=172529

Rubber-stamped by Chris Dumez.

Make sync-buildbot.js schedule an A/B testing job with a patch or roots to buildbot.

Change the buildbot property format in the syncing script's configuration again to use a dictionary
with a single key of "revision", "patch", or "roots" to specify a revision, a patch, or a set of roots,
and simplified the structure of the configuration by always having "types" and "builders", and
make each entry in "configurations" refer to a list of types, platforms, and builders.

Since now there are build requests to build patches and run tests, "configurations" has been renamed to
"testConfigurations" and "buildConfigurations" have been added. Each entry in "buildConfigurations"
specifies a list of platforms and builders. Similarly in repository group configurations, the buildbot
properties for testing is now specified as "testProperties" and ones for building a patch is specified
in newly introduced "buildProperties".

* public/api/build-requests.php:
(update_builds): When a build request to build a patch fails, mark all subsequent requests as failed
since there is no way to run tests without a successful build.

* public/api/update-triggerable.php:
(main): Re-generate manifest.json after updating the triggerable. The lack of this re-generation was
the reason we had to manually GET /api/manifest in api-update-triggerable-tests.js.

* public/v3/models/build-request.js:
(BuildRequest.prototype.hasCompleted): Added.

* public/v3/models/manifest.js:
(Manifest.reset): Added. Extracted from MockData.resetV3Models in unit-tests/mock-data.js and
syncLoop in tools/sync-buildbot.js
(Manifest.fetch): Reset V3 models before fetching the manifest. This eliminates the need to manually
reset V3 models in syncLoop.

* public/v3/models/uploaded-file.js:
(UploadedFile.prototype.url): Use RemoteAPI.url to get the full URL instead of just a path.

* public/v3/remote.js:
(BrowserRemoteAPI.prototype.url): Added. Constructs the full URL.

* server-tests/api-update-triggerable-tests.js:
(.refetchManifest): Deleted. Now that /api/manifest re-generates manifest.json, we can simply call
Manifest.fetch instead.

* server-tests/resources/mock-data.js:
(MockData.resetV3Models): Calls Manifest.reset().
(MockData.addMockConfiguration): Extracted from addMockData.
(MockData.addMockData): Updated per the format change.
(MockData.mockTestSyncConfigWithSingleBuilder): Ditto.
(MockData.mockTestSyncConfigWithTwoBuilders): Ditto.
(MockData.runningBuild): Make buildNumber specifiable.
(MockData.finishedBuild): Ditto.

* server-tests/tools-buildbot-triggerable-tests.js: Updated configurations per the format change.
Now that now acceptsCustomRoots() for "system-and-webkit" must be true since we can't have a
repository group that which accepts a patch and not take roots.

* server-tests/tools-sync-buildbot-integration-tests.js: Added.
(createTriggerable): Added.
(createTestGroupWihPatch): Added.
(uploadRoot): Added.
(.assertAndResolveRequest): Added.
(.assertTestBuildHasFailed): Added.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer): Added. _type as an instance variable to identify whether this buildbot builder
is a "builder" which builds a patch, builder, or a "tester" which runs a test. Also renamed
_testConfigurations to _configurations.
(BuildbotSyncer.prototype.addTestConfiguration): Assert that either the type of this syncer hasn't
been set or it's a tester.
(BuildbotSyncer.prototype.testConfigurations): Return [] when it's a builder.
(BuildbotSyncer.prototype.addBuildConfiguration): Added. Adds a platform to a builder.
(BuildbotSyncer.prototype.buildConfigurations): Added. Returns the list of configurations if this
syncer is a builder. Otherwise returns [].
(BuildbotSyncer.prototype.isTester): Added.
(BuildbotSyncer.prototype.matchesConfiguration):
(BuildbotSyncer.prototype._propertiesForBuildRequest): Updated to support the new format.
(BuildbotSyncer._loadConfig): Ditto. Optionally parse buildConfigurations.
(BuildbotSyncer._resolveBuildersWithPlatforms): Added. For each test or build configuration entry,
creates the list of configurations per builder and platform.
(BuildbotSyncer._parseRepositoryGroup): Added the support for parsing the new format with revision,
roots, and patch option types with a lot of validations as we're seeing a bit of combinatorial
explosion in the number of things that can go wrong. Also parse buildProperties optionally.
(BuildbotSyncer._parseRepositoryGroupPropertyTemplate): Added. A helper function to parse a set of
buildbot properties, validates its content, and invokes a callback if it's an dynamically resolved
type such as "revision" and "patch".
(BuildbotSyncer._validateAndMergeConfig): Updated per the format change. No longer allows "types",
"type", "platforms", and "platform" as they're explicity resolved in _resolveBuildersWithPlatforms.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.syncOnce):
(BuildbotTriggerable.prototype._validateRequests): Handle the case when a build request is not
associated with any test.
(BuildbotTriggerable.prototype._nextRequestInGroup): Return null when there is a build request to
build a patch which has not been completed (pending, scheduled, running, or failed). Since all
requests to build a patch has a negative order, those requests should all show up at the beginning.
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Pick a new buildbot syncer when
scheduling the first request to build a patch or the first request to run a test. The first request
to run a test will always have order of 0, so it's a sufficient condition to find such a request.
On the other hand, the first request to build a patch can have a negative order number so we must
explicitly check if it's the first item in the ordered list of requests in the test group.

* tools/remote-server-relay.log: Added.

* tools/sync-buildbot.js:
(syncLoop): Fixed a bug we were not re-fetching the triggerable after updating the triggerable so
that Triggerable and related objects we have in the memory may not reflect what we just synced to
the perf dashboard. Also, we don't reset V3 models manually any more since Manifest.fetch does that.

* unit-tests/buildbot-syncer-tests.js: Added more test cases and updated existing test cases to test
exception messages explicitly since allowing any exception was resulting in some tests passing a
result of unrelated parsing error being thrown, etc...
(sampleiOSConfig): Updated per the format change.
(sampleiOSConfigWithExpansions): Ditto.
(smallConfiguration): Ditto.

Canonical link: https://commits.webkit.org/189454@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-24 18:47:01 +00:00
Dewei Zhu c34bd5467e Fix the bug that sometimes analysis task results pane is missing.
https://bugs.webkit.org/show_bug.cgi?id=172404

Reviewed by Ryosuke Niwa.

AnalysisTaskPage._didFetchTask and AnalaysisTaskPage._fetchRelatedInfoForTaskId should be called in order.
The race between those two functions causes the analysis task results pane sometimes missing.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype.render): Fix the bug in r217173 that commitSet can be undefined.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.updateFromSerializedState): Use arrow function to get rid of self variable.
Use `const` instead of var for constant variable. And call _didFetchTask before calling _fetchRelatedInfoForTaskId.
(AnalysisTaskPage.prototype._renderTaskNameAndStatus):
(AnalysisTaskPage.cssTemplate):


Canonical link: https://commits.webkit.org/189356@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-22 18:29:05 +00:00
Ryosuke Niwa 90f48a44db Add a commit log viewer next to the analysis results viewer
https://bugs.webkit.org/show_bug.cgi?id=172399

Reviewed by Chris Dumez.

Add a commit log viewer next to the analysis results viewer, which visualizes the A/B testing results.

Also linkify the revisions in the table that shows the status of each A/B testing job,
and allow the prefix of "r" when associating a Subversion revision.

Finally, Fixed a bug that the list of commits associated with the analysis task were not re-rendered
when the list was updated by the user.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer): Added _selectorRadioButtonList as an instance variable. It's a list of radio
buttons to select a configuration (A/B) with a commit set. It's added to update the checked status of
radio buttons upon changing the currently selected test group.
(AnalysisResultsViewer.prototype.setTestGroups): Update the selected range to that of the currently
selected group.
(AnalysisResultsViewer.prototype.render): Fill _selectorRadioButtonList with radio buttons.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer): Added _showRepositoryName as an instance variable.
(CommitLogViewer.prototype.setShowRepositoryName): Added.
(CommitLogViewer.prototype.render): Hide the repository name when _showRepositoryName is false. This
is used in the newly added commit log viewer for the analysis results since we're showing a select
element with all the names of repositories above this component.

* public/v3/components/test-group-revision-table.js:
(TestGroupRevisionTable.prototype._buildCommitCell): Linkify the revisions if possible.

* public/v3/models/analysis-task.js:
(AnalysisTask.prototype.associateCommit): Strip "r" at the beginning for a Subversion like r12345
since that's the format we use to show to the user. This makes copy & paste easier.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskResultsPane): Added a bunch of new instance variables to show and update the commit log
viewer next to the analysis results viewer.
(AnalysisTaskResultsPane.prototype.setPoints): Create the list of repositories to show details.
(AnalysisTaskResultsPane.prototype.didConstructShadowTree): Re-render when the current selected test
group changes since that may have updated the selected range for A/B testing. Also re-render when
a new repository is selected to show details.
(AnalysisTaskResultsPane.prototype.render): Update the list of repositories and the commit log viewer.
(AnalysisTaskResultsPane.prototype._renderRepositoryList): Renders the list of repositories.
(AnalysisTaskResultsPane.prototype._updateCommitViewer): Updates the commit log viewer given the range
selected in the analysis results viewer.
(AnalysisTaskResultsPane.htmlTemplate): Updated the template.
(AnalysisTaskResultsPane.cssTemplate): Ditto.
(AnalysisTaskTestGroupPane.cssTemplate): Add a little space between the list of results and the table
of A/B testing jobs with revisions.
(AnalysisTaskPage.prototype.render): Fixed the bug that the list of commits associated with the task
is not updated when the list changes the task or the start point never changed when the list of commits
associated with the task changed. Make the lazily evaluated function compare the actual list of commits
so that it will invoke _renderCauseAndFixes when the list changes.
(AnalysisTaskPage.prototype._renderCauseAndFixes): Now renders a specific list.


Canonical link: https://commits.webkit.org/189302@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-20 00:03:24 +00:00
Ryosuke Niwa 524370d25b REGRESSION(r217118): Speedometer 2.0: Flight.js test is broken
https://bugs.webkit.org/show_bug.cgi?id=172394

Reviewed by Chris Dumez.

PerformanceTests:

Fixed the bug that we were never clearing window.checkLoadedTimeoutId.

* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js:
(newContext.checkLoaded):

Websites/browserbench.org:

Merge the fix.

* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js:
(newContext.checkLoaded):


Canonical link: https://commits.webkit.org/189292@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 22:42:43 +00:00
Ryosuke Niwa 93a4930efa Merge Speedometer 2.0 fixes up to r217121 to browserbench.org
https://bugs.webkit.org/show_bug.cgi?id=172389

Rubber-stamped by Chris Dumez.

Merged the various fixes for Speedometer 2.0 starting from r217107 through r217121.

* Speedometer2.0/InteractiveRunner.html:
* Speedometer2.0/resources/benchmark-runner.js:
* Speedometer2.0/resources/tests.js:
* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/app/js/main.js:
* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js:
* Speedometer2.0/resources/todomvc/functional-prog-examples/elm/dist/elm.js:
* Speedometer2.0/resources/todomvc/vanilla-examples/vanillajs/js/store.js:


Canonical link: https://commits.webkit.org/189287@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 22:17:49 +00:00
Ryosuke Niwa 037989aa20 Add Speedometer 2.0 to browserbench.org for final testing
https://bugs.webkit.org/show_bug.cgi?id=172335

Rubber-stamped by Chris Dumez.

Stage Speedometer 2.0 here for the final testing before we call it official.

* Speedometer2.0: Copied from PerformanceTests/Speedometer.
* Speedometer2.0/Full.html: Removed.
* Speedometer2.0/index.html: Copied from PerformanceTests/Speedometer/index.html.



Canonical link: https://commits.webkit.org/189232@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 03:11:13 +00:00
Jonathan Davis cfc5afb349 Add an Accessibility icon to webkit.org
https://bugs.webkit.org/show_bug.cgi?id=172298

Reviewed by Alexey Proskuryakov.

* wp-content/themes/webkit/images/icons.svg: Added accessibility icon to the sprite.
* wp-content/themes/webkit/style.css: New rule to use the accessibility icon from the icons sprite.
(.tile.category-accessibility .background-image):


Canonical link: https://commits.webkit.org/189212@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-18 22:10:43 +00:00
Ryosuke Niwa 92217b10f2 Another build fix. Added a missing null check.
* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._setUploadedFilesIfEmpty):



Canonical link: https://commits.webkit.org/189111@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-16 19:36:40 +00:00
Ryosuke Niwa 712e67f4de browserbench.org/Speedometer/ should show the benchmark not an index of files
https://bugs.webkit.org/show_bug.cgi?id=172141

Reviewed by Alexey Proskuryakov.

Renamed Speedometer/Full.html to Speedometer/index.html.
We used to have a .htaccess but it's better to use the same file name convention as other benchmarks.

* Speedometer/index.html: Renamed from Websites/browserbench.org/Speedometer/Full.html.


Canonical link: https://commits.webkit.org/189073@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-16 01:59:10 +00:00
James Craig a162c474cb AX: Inaccessible content on webkit.org main page
https://bugs.webkit.org/show_bug.cgi?id=172106

Reviewed by Joseph Pecoraro.

* wp-content/themes/webkit/widgets/icon.php: Resolved link title.
* wp-content/themes/webkit/widgets/post.php: Resolved link title.
* wp-content/themes/webkit/widgets/twitter.php: Resolved link titles. Suppressed unlabeled images with alt="".


Canonical link: https://commits.webkit.org/189056@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-15 21:36:32 +00:00
James Craig 470a712721 2017-05-14 James Craig <jcraig@apple.com>
Upload poster images and working captioned video
        https://bugs.webkit.org/show_bug.cgi?id=172102

        Unreviewed. More resources for prefers-reduced-motion post.

        * blog-files/prefers-reduced-motion/axi.htm: Added.
        * blog-files/prefers-reduced-motion/axi.png: Removed.
        * blog-files/prefers-reduced-motion/posters: Added.
        * blog-files/prefers-reduced-motion/posters/apple_env_load.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/apple_env_planeshift.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/apple_ios10.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/apple_shoot.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/apple_shoot_reduced.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/apple_sierra.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/apple_sierra_reduced.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/axi.jpg: Added.
        * blog-files/prefers-reduced-motion/posters/viljami.jpg: Added.
        * blog-files/prefers-reduced-motion/prm.htm: Link to axi.htm video demo.



Canonical link: https://commits.webkit.org/189038@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-15 07:01:51 +00:00
James Craig d32a9c555a 2017-05-14 James Craig <jcraig@apple.com>
AX: All the articles on the WebKit blog are called 'Clickable Link' by VoiceOver
        https://bugs.webkit.org/show_bug.cgi?id=172096
        <rdar://problem/31624323>

        Unreviewed. Fixing broken link titles for screen readers.

        * wp-content/themes/webkit/loop.php: Adding relevant link label for accessibility.



Canonical link: https://commits.webkit.org/189035@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-15 05:00:08 +00:00
Ryosuke Niwa 672089c6ca Build fix. Added a missing null check.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskConfiguratorPane.prototype.setTestGroups):



Canonical link: https://commits.webkit.org/189025@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-14 08:18:51 +00:00
Ryosuke Niwa 441edbede2 Add Websites/browserbench.org
https://bugs.webkit.org/show_bug.cgi?id=172049

Rubber-stamped by Geoffrey Garen.

Added the current contents of browserbench.org.

* ARES-6/ARES-6.svg: Added.
* ARES-6/Air/README.md: Added.
* ARES-6/Air/airjs-tests.yaml: Added.
* ARES-6/Air/all.js: Added.
* ARES-6/Air/allocate_stack.js: Added.
* ARES-6/Air/arg.js: Added.
* ARES-6/Air/basic_block.js: Added.
* ARES-6/Air/benchmark.js: Added.
* ARES-6/Air/code.js: Added.
* ARES-6/Air/custom.js: Added.
* ARES-6/Air/frequented_block.js: Added.
* ARES-6/Air/insertion_set.js: Added.
* ARES-6/Air/inst.js: Added.
* ARES-6/Air/liveness.js: Added.
* ARES-6/Air/make_dist.sh: Added.
* ARES-6/Air/opcode.js: Added.
* ARES-6/Air/payload-airjs-ACLj8C.js: Added.
* ARES-6/Air/payload-gbemu-executeIteration.js: Added.
* ARES-6/Air/payload-imaging-gaussian-blur-gaussianBlur.js: Added.
* ARES-6/Air/payload-typescript-scanIdentifier.js: Added.
* ARES-6/Air/reg.js: Added.
* ARES-6/Air/stack_slot.js: Added.
* ARES-6/Air/stress-test.js: Added.
* ARES-6/Air/strip-hash.rb: Added.
* ARES-6/Air/symbols.js: Added.
* ARES-6/Air/test.html: Added.
* ARES-6/Air/test.js: Added.
* ARES-6/Air/tmp.js: Added.
* ARES-6/Air/tmp_base.js: Added.
* ARES-6/Air/util.js: Added.
* ARES-6/Babylon/AUTHORS: Added.
* ARES-6/Babylon/air-blob.js: Added.
* ARES-6/Babylon/babylon-blob.js: Added.
* ARES-6/Babylon/basic-blob.js: Added.
* ARES-6/Babylon/benchmark.js: Added.
* ARES-6/Babylon/index.js: Added.
* ARES-6/Babylon/inspector-blob.js: Added.
* ARES-6/Basic/ast.js: Added.
* ARES-6/Basic/basic-tests.yaml: Added.
* ARES-6/Basic/basic.js: Added.
* ARES-6/Basic/benchmark.js: Added.
* ARES-6/Basic/caseless_map.js: Added.
* ARES-6/Basic/lexer.js: Added.
* ARES-6/Basic/number.js: Added.
* ARES-6/Basic/parser.js: Added.
* ARES-6/Basic/random.js: Added.
* ARES-6/Basic/state.js: Added.
* ARES-6/Basic/stress-test.js: Added.
* ARES-6/Basic/test.html: Added.
* ARES-6/Basic/test.js: Added.
* ARES-6/Basic/util.js: Added.
* ARES-6/about.html: Added.
* ARES-6/air_benchmark.js: Added.
* ARES-6/babylon_benchmark.js: Added.
* ARES-6/basic_benchmark.js: Added.
* ARES-6/cli.js: Added.
* ARES-6/driver.js: Added.
* ARES-6/glue.js: Added.
* ARES-6/index.html: Added.
* ARES-6/ml/benchmark.js: Added.
* ARES-6/ml/index.js: Added.
* ARES-6/ml_benchmark.js: Added.
* ARES-6/results.js: Added.
* ARES-6/stats.js: Added.
* ARES-6/styles.css: Added.
* ARES-6/swoop.svg: Added.
* JetStream/CDjsSetup.js: Added.
* JetStream/JetStream-Logo.png: Added.
* JetStream/JetStream-Logo@2x.png: Added.
* JetStream/JetStream.css: Added.
* JetStream/JetStreamDriver.js: Added.
* JetStream/LLVM-test-suite-LICENSE.txt: Added.
* JetStream/Octane/base.js: Added.
* JetStream/Octane/code-load.js: Added.
* JetStream/Octane2/base.js: Added.
* JetStream/Octane2/box2d.js: Added.
* JetStream/Octane2/code-load.js: Added.
* JetStream/Octane2/crypto.js: Added.
* JetStream/Octane2/deltablue.js: Added.
* JetStream/Octane2/earley-boyer.js: Added.
* JetStream/Octane2/gbemu-part1.js: Added.
* JetStream/Octane2/gbemu-part2.js: Added.
* JetStream/Octane2/mandreel.js: Added.
* JetStream/Octane2/navier-stokes.js: Added.
* JetStream/Octane2/pdfjs.js: Added.
* JetStream/Octane2/raytrace.js: Added.
* JetStream/Octane2/regexp.js: Added.
* JetStream/Octane2/richards.js: Added.
* JetStream/Octane2/run.js: Added.
* JetStream/Octane2/splay.js: Added.
* JetStream/Octane2/typescript-compiler.js: Added.
* JetStream/Octane2/typescript-input.js: Added.
* JetStream/Octane2/typescript.js: Added.
* JetStream/Octane2/zlib-data.js: Added.
* JetStream/Octane2/zlib.js: Added.
* JetStream/Octane2Setup.js: Added.
* JetStream/OctaneSetup.js: Added.
* JetStream/Reference.js: Added.
* JetStream/SimplePayload.js: Added.
* JetStream/SimpleSetup.js: Added.
* JetStream/SunSpiderPayload.js: Added.
* JetStream/SunSpiderSetup.js: Added.
* JetStream/Swoosh.png: Added.
* JetStream/Swoosh@2x.png: Added.
* JetStream/TestingSetup.js: Added.
* JetStream/cdjs/benchmark.js: Added.
* JetStream/cdjs/call_sign.js: Added.
* JetStream/cdjs/collision.js: Added.
* JetStream/cdjs/collision_detector.js: Added.
* JetStream/cdjs/constants.js: Added.
* JetStream/cdjs/motion.js: Added.
* JetStream/cdjs/red_black_tree.js: Added.
* JetStream/cdjs/reduce_collision_set.js: Added.
* JetStream/cdjs/simulator.js: Added.
* JetStream/cdjs/util.js: Added.
* JetStream/cdjs/vector_2d.js: Added.
* JetStream/cdjs/vector_3d.js: Added.
* JetStream/in-depth.html: Added.
* JetStream/index.html: Added.
* JetStream/simple/bigfib.cpp: Added.
* JetStream/simple/bigfib.cpp.js: Added.
* JetStream/simple/container.cpp: Added.
* JetStream/simple/container.cpp.js: Added.
* JetStream/simple/dry.c: Added.
* JetStream/simple/dry.c.js: Added.
* JetStream/simple/float-mm.c: Added.
* JetStream/simple/float-mm.c.js: Added.
* JetStream/simple/gcc-loops.cpp: Added.
* JetStream/simple/gcc-loops.cpp.js: Added.
* JetStream/simple/hash-map.js: Added.
* JetStream/simple/n-body.c: Added.
* JetStream/simple/n-body.c.js: Added.
* JetStream/simple/quicksort.c: Added.
* JetStream/simple/quicksort.c.js: Added.
* JetStream/simple/towers.c: Added.
* JetStream/simple/towers.c.js: Added.
* JetStream/sources/3d-cube.js: Added.
* JetStream/sources/3d-raytrace.js: Added.
* JetStream/sources/base64.js: Added.
* JetStream/sources/bigfib.cpp: Added.
* JetStream/sources/bigfib.cpp.js: Added.
* JetStream/sources/box2d.js: Added.
* JetStream/sources/cdjs-benchmark.js: Added.
* JetStream/sources/cdjs-call_sign.js: Added.
* JetStream/sources/cdjs-collision.js: Added.
* JetStream/sources/cdjs-collision_detector.js: Added.
* JetStream/sources/cdjs-constants.js: Added.
* JetStream/sources/cdjs-motion.js: Added.
* JetStream/sources/cdjs-red_black_tree.js: Added.
* JetStream/sources/cdjs-reduce_collision_set.js: Added.
* JetStream/sources/cdjs-simulator.js: Added.
* JetStream/sources/cdjs-util.js: Added.
* JetStream/sources/cdjs-vector_2d.js: Added.
* JetStream/sources/cdjs-vector_3d.js: Added.
* JetStream/sources/code-first-load-code-load.js: Added.
* JetStream/sources/code-multi-load-code-load.js: Added.
* JetStream/sources/container.cpp: Added.
* JetStream/sources/container.cpp.js: Added.
* JetStream/sources/crypto-aes.js: Added.
* JetStream/sources/crypto-md5.js: Added.
* JetStream/sources/crypto-sha1.js: Added.
* JetStream/sources/crypto.js: Added.
* JetStream/sources/date-format-tofte.js: Added.
* JetStream/sources/date-format-xparb.js: Added.
* JetStream/sources/deltablue.js: Added.
* JetStream/sources/dry.c: Added.
* JetStream/sources/dry.c.js: Added.
* JetStream/sources/earley-boyer.js: Added.
* JetStream/sources/float-mm.c: Added.
* JetStream/sources/float-mm.c.js: Added.
* JetStream/sources/gbemu-part1.js: Added.
* JetStream/sources/gbemu-part2.js: Added.
* JetStream/sources/gcc-loops.cpp: Added.
* JetStream/sources/gcc-loops.cpp.js: Added.
* JetStream/sources/hash-map.js: Added.
* JetStream/sources/mandreel.js: Added.
* JetStream/sources/n-body.c: Added.
* JetStream/sources/n-body.c.js: Added.
* JetStream/sources/n-body.js: Added.
* JetStream/sources/navier-stokes.js: Added.
* JetStream/sources/pdfjs.js: Added.
* JetStream/sources/quicksort.c: Added.
* JetStream/sources/quicksort.c.js: Added.
* JetStream/sources/raytrace.js: Added.
* JetStream/sources/regex-dna.js: Added.
* JetStream/sources/regexp.js: Added.
* JetStream/sources/richards.js: Added.
* JetStream/sources/splay.js: Added.
* JetStream/sources/tagcloud.js: Added.
* JetStream/sources/towers.c: Added.
* JetStream/sources/towers.c.js: Added.
* JetStream/sources/typescript-compiler.js: Added.
* JetStream/sources/typescript-input.js: Added.
* JetStream/sources/typescript.js: Added.
* JetStream/sources/zlib-data.js: Added.
* JetStream/sources/zlib.js: Added.
* JetStream/sunspider/3d-cube.js: Added.
* JetStream/sunspider/3d-raytrace.js: Added.
* JetStream/sunspider/base64.js: Added.
* JetStream/sunspider/crypto-aes.js: Added.
* JetStream/sunspider/crypto-md5.js: Added.
* JetStream/sunspider/crypto-sha1.js: Added.
* JetStream/sunspider/date-format-tofte.js: Added.
* JetStream/sunspider/date-format-xparb.js: Added.
* JetStream/sunspider/n-body.js: Added.
* JetStream/sunspider/regex-dna.js: Added.
* JetStream/sunspider/tagcloud.js: Added.
* MotionMark/about.html: Added.
* MotionMark/developer.html: Added.
* MotionMark/index.html: Added.
* MotionMark/resources/debug-runner/animometer.css: Added.
* MotionMark/resources/debug-runner/animometer.js: Added.
* MotionMark/resources/debug-runner/d3.min.js: Added.
* MotionMark/resources/debug-runner/graph.js: Added.
* MotionMark/resources/debug-runner/tests.js: Added.
* MotionMark/resources/extensions.js: Added.
* MotionMark/resources/runner/animometer.css: Added.
* MotionMark/resources/runner/animometer.js: Added.
* MotionMark/resources/runner/benchmark-runner.js: Added.
* MotionMark/resources/runner/crystal.svg: Added.
* MotionMark/resources/runner/lines.svg: Added.
* MotionMark/resources/runner/logo.svg: Added.
* MotionMark/resources/runner/tests.js: Added.
* MotionMark/resources/statistics.js: Added.
* MotionMark/resources/strings.js: Added.
* MotionMark/tests/3d/resources/webgl.js: Added.
* MotionMark/tests/3d/webgl.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-canvas-images.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-canvas-shapes.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-css-images.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-css-shapes.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-svg-images.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-svg-shapes.html: Added.
* MotionMark/tests/bouncing-particles/bouncing-tagged-images.html: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-canvas-images.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-css-images.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-css-shapes.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-particles.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-svg-images.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-svg-particles.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-svg-shapes.js: Added.
* MotionMark/tests/bouncing-particles/resources/bouncing-tagged-images.js: Added.
* MotionMark/tests/bouncing-particles/resources/image1.jpg: Added.
* MotionMark/tests/bouncing-particles/resources/image2.jpg: Added.
* MotionMark/tests/bouncing-particles/resources/image3.jpg: Added.
* MotionMark/tests/bouncing-particles/resources/image4.jpg: Added.
* MotionMark/tests/bouncing-particles/resources/image5.jpg: Added.
* MotionMark/tests/dom/compositing-transforms.html: Added.
* MotionMark/tests/dom/focus.html: Added.
* MotionMark/tests/dom/leaves.html: Added.
* MotionMark/tests/dom/particles.html: Added.
* MotionMark/tests/dom/resources/compositing-transforms.js: Added.
* MotionMark/tests/dom/resources/dom-particles.js: Added.
* MotionMark/tests/dom/resources/focus.js: Added.
* MotionMark/tests/dom/resources/leaves.js: Added.
* MotionMark/tests/master/canvas-stage.html: Added.
* MotionMark/tests/master/focus.html: Added.
* MotionMark/tests/master/image-data.html: Added.
* MotionMark/tests/master/leaves.html: Added.
* MotionMark/tests/master/multiply.html: Added.
* MotionMark/tests/master/resources/canvas-stage.js: Added.
* MotionMark/tests/master/resources/canvas-tests.js: Added.
* MotionMark/tests/master/resources/compass.svg: Added.
* MotionMark/tests/master/resources/compass100.png: Added.
* MotionMark/tests/master/resources/console.svg: Added.
* MotionMark/tests/master/resources/console100.png: Added.
* MotionMark/tests/master/resources/contribute.svg: Added.
* MotionMark/tests/master/resources/contribute100.png: Added.
* MotionMark/tests/master/resources/debugger.svg: Added.
* MotionMark/tests/master/resources/debugger100.png: Added.
* MotionMark/tests/master/resources/focus.js: Added.
* MotionMark/tests/master/resources/image-data.js: Added.
* MotionMark/tests/master/resources/inspector.svg: Added.
* MotionMark/tests/master/resources/inspector100.png: Added.
* MotionMark/tests/master/resources/layout.svg: Added.
* MotionMark/tests/master/resources/layout100.png: Added.
* MotionMark/tests/master/resources/leaves.js: Added.
* MotionMark/tests/master/resources/multiply.js: Added.
* MotionMark/tests/master/resources/particles.js: Added.
* MotionMark/tests/master/resources/performance.svg: Added.
* MotionMark/tests/master/resources/performance100.png: Added.
* MotionMark/tests/master/resources/script.svg: Added.
* MotionMark/tests/master/resources/script100.png: Added.
* MotionMark/tests/master/resources/shortcuts.svg: Added.
* MotionMark/tests/master/resources/shortcuts100.png: Added.
* MotionMark/tests/master/resources/standards.svg: Added.
* MotionMark/tests/master/resources/standards100.png: Added.
* MotionMark/tests/master/resources/storage.svg: Added.
* MotionMark/tests/master/resources/storage100.png: Added.
* MotionMark/tests/master/resources/styles.svg: Added.
* MotionMark/tests/master/resources/styles100.png: Added.
* MotionMark/tests/master/resources/svg-particles.js: Added.
* MotionMark/tests/master/resources/text.js: Added.
* MotionMark/tests/master/resources/timeline.svg: Added.
* MotionMark/tests/master/resources/timeline100.png: Added.
* MotionMark/tests/master/svg-particles.html: Added.
* MotionMark/tests/master/text.html: Added.
* MotionMark/tests/resources/main.js: Added.
* MotionMark/tests/resources/math.js: Added.
* MotionMark/tests/resources/stage.css: Added.
* MotionMark/tests/resources/star.svg: Added.
* MotionMark/tests/resources/yin-yang.png: Added.
* MotionMark/tests/resources/yin-yang.svg: Added.
* MotionMark/tests/simple/resources/simple-canvas-paths.js: Added.
* MotionMark/tests/simple/resources/simple-canvas.js: Added.
* MotionMark/tests/simple/resources/tiled-canvas-image.js: Added.
* MotionMark/tests/simple/simple-canvas-paths.html: Added.
* MotionMark/tests/simple/tiled-canvas-image.html: Added.
* MotionMark/tests/template/resources/template-canvas.js: Added.
* MotionMark/tests/template/resources/template-css.js: Added.
* MotionMark/tests/template/resources/template-svg.js: Added.
* MotionMark/tests/template/template-canvas.html: Added.
* MotionMark/tests/template/template-css.html: Added.
* MotionMark/tests/template/template-svg.html: Added.
* MotionMark/version: Added.
* Speedometer/Full.html: Added.
* Speedometer/InteractiveRunner.html: Added.
* Speedometer/resources/benchmark-report.js: Added.
* Speedometer/resources/benchmark-runner.js: Added.
* Speedometer/resources/flightjs-example-app/LICENSE.md: Added.
* Speedometer/resources/flightjs-example-app/README.md: Added.
* Speedometer/resources/flightjs-example-app/app/boot/page.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_data/compose_box.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_data/mail_items.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_data/move_to.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_ui/compose_box.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_ui/folders.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_ui/mail_controls.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_ui/mail_items.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_ui/move_to_selector.js: Added.
* Speedometer/resources/flightjs-example-app/app/component_ui/with_select.js: Added.
* Speedometer/resources/flightjs-example-app/app/css/custom.css: Added.
* Speedometer/resources/flightjs-example-app/app/data.js: Added.
* Speedometer/resources/flightjs-example-app/app/templates.js: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/css/bootstrap-responsive.css: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/css/bootstrap-responsive.min.css: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/css/bootstrap.css: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/css/bootstrap.min.css: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/img/glyphicons-halflings-white.png: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/img/glyphicons-halflings.png: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/js/bootstrap.js: Added.
* Speedometer/resources/flightjs-example-app/components/bootstrap/js/bootstrap.min.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/.gitignore: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/CHANGES: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/CONTRIBUTORS.md: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/LICENSE: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/README.md: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/component.json: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/es5-sham.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/es5-sham.min.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/es5-shim.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/es5-shim.min.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/package.json: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/helpers/h-kill.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/helpers/h-matchers.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/helpers/h.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/index.html: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/lib/jasmine-html.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/lib/jasmine.css: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/lib/jasmine.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/lib/jasmine_favicon.png: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/lib/json2.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/spec/s-array.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/spec/s-date.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/spec/s-function.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/spec/s-object.js: Added.
* Speedometer/resources/flightjs-example-app/components/es5-shim/tests/spec/s-string.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/.travis.yml: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/advice.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/component.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/compose.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/index.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/logger.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/registry.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/lib/utils.js: Added.
* Speedometer/resources/flightjs-example-app/components/flight/tools/debug/debug.js: Added.
* Speedometer/resources/flightjs-example-app/components/jasmine-flight/LICENSE.md: Added.
* Speedometer/resources/flightjs-example-app/components/jasmine-flight/README.md: Added.
* Speedometer/resources/flightjs-example-app/components/jasmine-flight/bower.json: Added.
* Speedometer/resources/flightjs-example-app/components/jasmine-flight/lib/jasmine-flight.js: Added.
* Speedometer/resources/flightjs-example-app/components/jasmine-jquery/lib/jasmine-jquery.js: Added.
* Speedometer/resources/flightjs-example-app/components/jquery/component.json: Added.
* Speedometer/resources/flightjs-example-app/components/jquery/composer.json: Added.
* Speedometer/resources/flightjs-example-app/components/jquery/jquery.js: Added.
* Speedometer/resources/flightjs-example-app/components/jquery/jquery.min.js: Added.
* Speedometer/resources/flightjs-example-app/components/mustache/mustache.js: Added.
* Speedometer/resources/flightjs-example-app/components/requirejs/require.js: Added.
* Speedometer/resources/flightjs-example-app/index.html: Added.
* Speedometer/resources/flightjs-example-app/karma.conf.js: Added.
* Speedometer/resources/flightjs-example-app/package.json: Added.
* Speedometer/resources/flightjs-example-app/requireMain.js: Added.
* Speedometer/resources/gauge.png: Added.
* Speedometer/resources/gauge@2x.png: Added.
* Speedometer/resources/logo.png: Added.
* Speedometer/resources/logo@2x.png: Added.
* Speedometer/resources/main.css: Added.
* Speedometer/resources/main.js: Added.
* Speedometer/resources/statistics.js: Added.
* Speedometer/resources/tests.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/angular-mocks/angular-mocks.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/angular/angular.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/controllers/todoCtrl.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/directives/todoBlur.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/directives/todoEscape.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/directives/todoFocus.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/js/services/todoStorage.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/config/testacular.conf.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/package.json: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/unit/directivesSpec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/angularjs/test/unit/todoCtrlSpec.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/backbone.localStorage/backbone.localStorage.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/backbone/backbone.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/jquery/jquery.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/bower_components/underscore/underscore.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/collections/todos.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/models/todo.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/routers/router.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/views/app-view.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/js/views/todo-view.js: Added.
* Speedometer/resources/todomvc/architecture-examples/backbone/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/ember-data/ember-data.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/ember-localstorage-adapter/localstorage_adapter.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/ember/ember.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/handlebars/handlebars.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/jquery/jquery.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/controllers/todo_controller.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/controllers/todos_controller.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/helpers/pluralize.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/models/todo.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/router.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/views/edit_todo_view.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/js/views/todos_view.js: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/readme.md: Added.
* Speedometer/resources/todomvc/architecture-examples/emberjs/test.html: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower.json: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/handlebars/handlebars.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/jquery/jquery.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/css/app.css: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/index.html: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/js/app.js: Added.
* Speedometer/resources/todomvc/architecture-examples/jquery/readme.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/.gitignore: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/.jshintrc: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/app.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/data/stats.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/data/todos.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/main.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/store.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/js/utils.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/templates/stats.html: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/app/templates/todo.html: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/index.html: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/karma.conf.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/package.json: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/readme.md: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/.jshintrc: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/fixture/footer.html: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/mock/datastore.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js: Added.
* Speedometer/resources/todomvc/dependency-examples/flight/test/test-main.js: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower.json: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/director/LICENSE: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/director/README.md: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/react/JSXTransformer.js: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/react/bower.json: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/react/react.js: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/react/react.min.js: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/index.html: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/js/app.jsx: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/js/footer.jsx: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/js/todoItem.jsx: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/js/utils.jsx: Added.
* Speedometer/resources/todomvc/labs/architecture-examples/react/readme.md: Added.
* Speedometer/resources/todomvc/learn.json: Added.
* Speedometer/resources/todomvc/license.md: Added.
* Speedometer/resources/todomvc/readme.md: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower.json: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/base.css: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/base.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/bg.png: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/index.html: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/app.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/controller.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/helpers.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/model.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/store.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/view.js: Added.
* Speedometer/resources/todomvc/vanilla-examples/vanillajs/readme.md: Added.
* index.html: Added.
* resources/ARES-6-Logo.png: Added.
* resources/ARES-6-Logo@2x.png: Added.
* resources/JetStream-Logo.png: Added.
* resources/JetStream-Logo@2x.png: Added.
* resources/MotionMark-Logo.png: Added.
* resources/MotionMark-Logo@2x.png: Added.
* resources/Speedometer-Logo.png: Added.
* resources/Speedometer-Logo@2x.png: Added.
* resources/main.css: Added.



Canonical link: https://commits.webkit.org/189005@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-13 02:02:02 +00:00
Ryosuke Niwa 0e20eecb1c Remove the code for old syncing script configuration in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=171963

Reviewed by Chris Dumez.

Removed the code for specifying {"root": ~}, {"rootOptions": [~]}, and {"rootsExcluding": [~]} in buildbot
properties in the syncing script's configurations since they are no longer used after r215061.

Also removed the support for using "arguments" as an alias to "properties", and updated the tests accordingly.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer._parseRepositoryGroup): Removed the unused code.
(BuildbotSyncer._validateAndMergeConfig): Just allow string values in properties.
(BuildbotSyncer._validateAndMergeProperties): Deleted.

* unit-tests/buildbot-syncer-tests.js:
(sampleiOSConfig): Use "properties" instead of "arguments" to specify the buildbot properties.
(sampleiOSConfigWithExpansions): Ditto.


Canonical link: https://commits.webkit.org/188923@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-11 23:46:23 +00:00
Ryosuke Niwa 0807ab64a6 Another build fix after r215633 to make the bar graphs render even when the confidence intervals aren't available.
* public/v3/components/bar-graph-group.js:
(BarGraphGroup.prototype._computeRange):



Canonical link: https://commits.webkit.org/188888@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-11 04:23:26 +00:00
Ryosuke Niwa b7973508f5 Build fix after r215633.
* public/v3/models/test-group.js:
(TestGroup.prototype._computeRequestedCommitSets):
(TestGroup.prototype.requestsForCommitSet):



Canonical link: https://commits.webkit.org/188886@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-11 04:06:02 +00:00
Ryosuke Niwa 9a723fe68c Add API to upload a patched build for a custom A/B testing
https://bugs.webkit.org/show_bug.cgi?id=171956

Reviewed by Chris Dumez.

Added /api/upload-root to upload a root file, the build product of a patch associated with a commit set.

Extracted more functions out of privileged-api/upload-file.php to uploaded-file-helpers.php to share code
with /api/upload-root.php.

* public/api/upload-root.php: Added.
(main):
(compute_commit_set_items_to_update): Find the list of commit set items to associate this root with.
A root can be associated with multiple repositories and there fore commit set items; e.g. if a software
is built from multiple repositories and there is a patch associated with one of them, the built product
must be associated with all those repositories.

* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Include the root file is there is one.

* public/include/json-header.php:
(validate_arguments): Added the support for validating json string.
(verify_slave): Return the slave ID found.

* public/include/uploaded-file-helpers.php:
(validate_uploaded_file): Extracted from /privileged-api/upload-file to be shared with /api/upload-root.
(query_total_file_size): Ditto.
(create_uploaded_file_from_form_data): Ditto.
(upload_file_in_transaction): Ditto. Takes a lambda to do the extra work inside the transaction.

* public/privileged-api/upload-file.php:
(main):

* public/v3/models/build-request.js:
(BuildRequest.constructBuildRequestsFromData): Resolve the rootFIle of each commit set item.

* public/v3/models/commit-set.js:
(CommitSet): Added _repositoryToRootMap and _allRootFiles as instance variables.
(CommitSet.prototype.updateSingleton): Added. Previously, each commit set's states never changed after
its creation. After this patch, each item can be newly associated with a root so we must update its
_repositoryToRootMap and _allRootFiles. For simplicity, we update all states.
(CommitSet.prototype._updateFromObject): Extracted from the constructor.
(CommitSet.prototype.allRootFiles): Added. Includes custom roots and roots created for patches.
(CommitSet.prototype.rootForRepository): Added.
(CommitSet.prototype.equals): Fixed the bug that we were comparing _repositoryToPatchMap to
_repositoryToCommitMap, and added a check for _repositoryToRootMap.

* public/v3/models/test-group.js:
(TestGroup.prototype.task): Added.
(TestGroup.createWithTask):
(TestGroup.createWithCustomConfiguration):
(TestGroup.createAndRefetchTestGroups):
(TestGroup._fetchTestGroupsForTask): Deleted. Now fetchForTask takes a boolean argument: ignoreCache.
(TestGroup.findAllByTask): Added.
(TestGroup.fetchForTask): Renamed from fetchByTask.

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

* server-tests/api-build-requests-tests.js:

* server-tests/api-upload-root-tests.js: Added. Added tests for /api/upload-root.
(makeReport): Added.
(addSlaveAndCreateRootFile): Added.
(createTestGroupWihPatch): Added.

* server-tests/privileged-api-create-test-group-tests.js:

* server-tests/resources/mock-data.js:
(MockData.sharedRepositoryId): Added.
(MockData.addMockData): Added "Shared" repository along with commits.


Canonical link: https://commits.webkit.org/188885@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-11 02:32:00 +00:00
Ryosuke Niwa 0e1d7d95bc Rename server-tests/api-update-triggerable.js to server-tests/api-update-triggerable-tests.js
https://bugs.webkit.org/show_bug.cgi?id=171905

Reviewed by Chris Dumez.

* server-tests/api-update-triggerable-tests.js: Renamed from server-tests/api-update-triggerable.js.


Canonical link: https://commits.webkit.org/188884@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-11 02:26:29 +00:00
James Craig ab44aa5083 2017-05-08 James Craig <jcraig@apple.com>
More demo files for prefers-reduced-motion post
        https://bugs.webkit.org/show_bug.cgi?id=170663

        Unreviewed.

        * blog-files/prefers-reduced-motion/jaws.gif: Added.
        * blog-files/prefers-reduced-motion/jaws.jpg: Added.
        * blog-files/prefers-reduced-motion/prm.htm: New animated GIF example.



Canonical link: https://commits.webkit.org/188709@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-08 07:56:02 +00:00
Ryosuke Niwa afa5373856 Add the support for scheduling a A/B testing with a patch.
https://bugs.webkit.org/show_bug.cgi?id=171209

Reviewed by Chris Dumez.

Added the support for creating a custom test group with a patch applied.

First, each repository in a repository group has a boolean indicating whether a given repository can have
a patch applied or not. When any configuration in a test group contains a patch, we create build requests
without a test specified in order to "build" those patches. These build requests have negative order numbers
to differentiate them from regular build requests. We can't simply build ones with patches since there could
be differences in SDK, build options, etc... when patches are applied.

The JSON format for commit sets returned by /api/build-requests have been changed from using an array of
commit IDs to an array of dictionaries indicate commit and acceptsPatch boolean. /api/update-triggerable now
uses a dictionary with two keys: repository and acceptsPatch to specify a set of repositories associated with
a repository group, and /privileged-api-create-test-group uses a dictionary with two keys: revision and patch
instead of a revision string to specify commit sets.

Furthermore, the syncing script's configuration have been updated to use a dictionary of repository names to
an options dictionary instead of an array of repositories names. For now, the only supported option is
acceptsPatch but will be extended when we add the support for rolling back system components.
e.g. {"WebKit": {acceptsPatch: true}, "macOS": {}} instead of ["WebKit", "macOS"]

On the UI side, InstantFileUploader has been changed to accept only one file by default, and added a new method
allowMultipleFiles() to allow multiple files to be selected for custom roots. Also replaced the input element
with type=file by a button with a custom label to show labels such as "Apply a patch" or "Add a new root"
instead of the generic label like "choose a file".

* init-database.sql: Added trigrepo_accepts_patch to triggerable_repositories to indicate whether a given
repository can have a patch applied or not. Made request_test optional in build_requests for when a build
request is created to build patches. Such a build request have a negative request_order. Updated the related
constraints accordingly.

* public/admin/triggerables.php: Added the support for updating whether a given repository can have a patch
applied in each repository group. Only show the repositories in the repository group for this purpose since
there is no way to accept a patch on a repository without it being a part of the group.
(generate_repository_form): Now takes the markup for checkboxes instead of generating one itself.
(generate_repository_checkboxes): Now takes an array of repositories to generate checkboxes. The checkbox is
shown when the repository ID exists as a key in this array, and is checked when its value is true. The new
capability to skip repositories not in the array is used to hide repositories not associated with the group
in the list of checkboxes to indicate a repository accepts a patch.

* public/api/update-triggerable.php:
(main): Now updates the description and acceptsRoots states of each repository group, and sets acceptsPatch
boolean for each repository in the group if set in the update.
(validate_repository_groups): Use a reference to $repository_groups in order to set repository_id_list, which
contains an array of repository IDs to find the existing repository group that matches the set via
RepositoryGroupFinder's find_by_repositories. Also added a various validations for acceptsRoots, a dictionary
specifying repository and acceptsPatch.

* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Instead of returning an array of commit IDs as
"commits", it now returns an array of dictionaries with "commit" and "patch" keys specifying the commit ID
and the patch file's ID respectively as "revisionItems".
(BuildRequestsFetcher::add_uploaded_file): Added. Extracted from fetch_commits_for_set_if_needed. Used to
add either a patch file or a custom root file in the list of uploaded files in the result.

* public/include/manifest-generator.php:
(fetch_triggerables): Each element in repository group's "repositories" field is now an array of dictionaries
with "repository" and "acceptsPatch" as keys.

* public/include/repository-group-finder.php:
(RepositoryGroupFinder::__construct): Added a map for boolean indicating whether a given repository group
allows a patch on a repository. Used in /privileged-api/create-test-group.
(RepositoryGroupFinder::accepts_patch): Added.
(RepositoryGroupFinder::populate_map): Build up the map for acceptsPatch boolean per repository per group.

* public/privileged-api/create-test-group.php:
(main): Fixed a bug that we were not explicitly checking for a duplicate test group name (with a test). Create
build requests to "build" patches if there is any patch file specified.
(commit_sets_from_revision_sets): Updated to take a dictionary with "revision" and "patch" as keys to specify
a revision and a patch if any instead of just a revision string for each repository. Also validate that each
repository is allowed to have a patch once the repository group has been found for the set of repositories.
(ensure_commit_sets):

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator): Added _patchUploaders as an instance variable, which is a dictionary of
configuration names to a map of InstantFileUploader's used to upload a patch. Also renamed _fileUploaders to
_customRootUploaders for clarity.
(CustomAnalysisTaskConfigurator.prototype.setCommitSets):
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree.createRootUploader): Added.
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree):
(CustomAnalysisTaskConfigurator.prototype._ensurePatchUploader): Added. Creates an instant file uploader for
patches. We only allow a single patch per repository.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Include a patch in the commit set as needed.
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Show the patch file uploader for repositories
which can have patches in the current repository group.
(CustomAnalysisTaskConfigurator.cssTemplate): Show borders between every rows instead of just between tbody's
now that each row can have a patch file uploader.

* public/v3/components/instant-file-uploader.js:
(InstantFileUploader): Added _fileInput and _allowMultipleFiles as instance variables. We now show a button
in the UI instead of an input with type=file. _fileInput is a hidden input with type=file used inside a click
event of the button to let the user pick a file.
(InstantFileUploader.prototype.allowMultipleFiles): Added. Allows this instance to accept multiple files.
(InstantFileUploader.prototype.didConstructShadowTree): Synthetically click on the hidden input element when
the newly added button element is clicked to open the browser's file picker.
(InstantFileUploader.prototype.render): Hide the button to add a file if this instance can only select one file
and there is already some file being uploaded in this instance.
(InstantFileUploader.htmlTemplate): Replaced the input element with type=file with a button. Its label comes
from the default slot content.

* public/v3/models/build-request.js:
(BuildRequest): Made the test optional.
(BuildRequest.prototype.isBuild): Returns true if this is a build request for building a patch.
(BuildRequest.prototype.isTest): Returns true if this is a build request for running tests.
(BuildRequest.constructBuildRequestsFromData): Create each commit log here instead of relying on CommitSet's
constructor to construct its commit logs. Also updated per the replacement of an array of commit IDs by
an array of dictionaries with commit and patch properties.

* public/v3/models/commit-set.js:
(CommitSet): Made _repositoryToCommitMap a real Map object. Also added _repositoryToPatchMap. Also got rid of
the code to instantiate commit logs since that's now done in BuildRequest.constructBuildRequestsFromData.
(CommitSet.prototype.commitForRepository):
(CommitSet.prototype.revisionForRepository):
(CommitSet.prototype.patchForRepository): Added.
(CommitSet.prototype.latestCommitTime): Modernized the code.
(CommitSet.prototype.equals): Modernized the code. Also added the check for patches.
(MeasurementCommitSet): Updated per the change to make _repositoryToCommitMap a real Map.
(CustomCommitSet.prototype.setRevisionForRepository):
(CustomCommitSet.prototype.equals): Added the check for patches.
(CustomCommitSet.prototype.revisionForRepository):
(CustomCommitSet.prototype.patchForRepository): Added.

* public/v3/models/manifest.js:
(Manifest._didFetchManifest): Updated per the replacement of an array of commit IDs by an array of dictionaries
with commit and patch properties.

* public/v3/models/repository.js:
(Repository.prototype.ownerId): Renamed from owner for clarity.

* public/v3/models/test-group.js:
(TestGroup): Modernized the code by using LazilyEvaluatedFunction. Removed _requestsAreInOrder since it's not
necessary anymore with LazilyEvaluatedFunction.
(TestGroup.prototype.addBuildRequest):
(TestGroup.prototype.test): Use the last build request's test since the first few requests could be requests to
build patches.
(TestGroup.prototype.platform): Ditto.
(TestGroup.prototype._lastRequest): Added.
(TestGroup.prototype._orderedBuildRequests): Added.
(TestGroup.prototype.repetitionCount): Only count the build requests for testing (skipping any requests to
build patches).
(TestGroup.prototype.requestedCommitSets): Simply call _computeRequestedCommitSetsLazily.
(TestGroup.prototype._computeRequestedCommitSets): Extracted from requestedCommitSets.
(TestGroup.prototype.requestsForCommitSet):
(TestGroup.prototype.labelForCommitSet): Rewritten. Just compute the label here instead of relying on
_commitSetToLabel since requestedSets is always of the length two at the moment.
(TestGroup._revisionSetsFromCommitSets): Specify both the revision and the patch in the revision set.

* public/v3/models/triggerable.js:
(TriggerableRepositoryGroup): Added _patchAcceptingSet as an instance variable. Use
sortByNamePreferringOnesWithURL to sort repositories instead of simple sortByName.
(TriggerableRepositoryGroup.prototype.accepts): Added checks for the custom roots and patches.
(TriggerableRepositoryGroup.prototype.acceptsPatchForRepository): Added.

* server-tests/api-build-requests-tests.js: Updated the test cases per the replacement of an array of commit
IDs by an array of dictionaries with commit and patch properties.

* server-tests/api-manifest-tests.js: Updated the test case per the name of Repository's owner to ownerId.

* server-tests/api-update-triggerable.js: Updated the test case per the name of Repository's owner to ownerId,
and added a test case for updating whether a given repository group allows custom roots as well as patches
on repositories via /api/update-triggerable.
(.updateWithOSXRepositoryGroup): Updated the sample syncing script configuration per the format change.
(.refetchManifest): Added.

* server-tests/privileged-api-create-test-group-tests.js: Updated per the syncing script configuration format
change. Also added a test for creating a test group with a duplicate name, which is expected to fail with
DuplicateTestGroupName, and creating a test group with a patch both when it's allowed and when it's not allowed
in the matching repository group.
(.addTriggerableAndCreateTask): Updated per the format change.

* server-tests/resources/mock-data.js:
(MockData.addEmptyTriggerable): Added a metric and its configuration to make it appear in the manifest file.
The new test case in api-update-triggerable.js requires this.
(MockData.mockTestSyncConfigWithSingleBuilder): Updated per the syncing script configuration format change.
(MockData.mockTestSyncConfigWithTwoBuilders): Ditto.

* server-tests/tools-buildbot-triggerable-tests.js: Removed the useless assertions about test configurations,
and added assertions about custom roots and patches in the test case for updateTriggerables.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer._parseRepositoryGroup): Made each assertion explicitly refer to the specific repository group
to make it more user friendly. Now each repository group uses a dictionary of repository names to its options
in the syncing script configurations. When parsed, we insert it as an array of dictionaries with repository ID
and acceptsPatch boolean specified separately since this is the format /api/update-triggerable expects.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.updateTriggerable):

* unit-tests/build-request-tests.js:
(sampleBuildRequestData): Updated per the commit sets format change in /api/build-requests.

* unit-tests/buildbot-syncer-tests.js: Updated the existing tests per various format changes and added a couple
of new test cases for the syncing script's configuration validation.
(sampleiOSConfig):
(smallConfiguration):
(createSampleBuildRequest):

* unit-tests/resources/mock-v3-models.js:
(MockModels.inject): Updated per the repository group format change.

* unit-tests/test-groups-tests.js:
(sampleTestGroup): Updated per the commit sets format change in /api/build-requests.


Canonical link: https://commits.webkit.org/188378@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-30 18:11:47 +00:00
James Craig 89fba98114 2017-04-24 James Craig <jcraig@apple.com>
Upload demo files for prefers-reduced-motion post
        https://bugs.webkit.org/show_bug.cgi?id=170663

        Rubber stamped by Jon Davis.

        * blog-files/prefers-reduced-motion: Added.
        * blog-files/prefers-reduced-motion/axi.png: Added.
        * blog-files/prefers-reduced-motion/prm.htm: Added.


Canonical link: https://commits.webkit.org/188120@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-25 03:21:29 +00:00
Ryosuke Niwa 794bc77257 Rename commit_set_relationships to commit_set_items
https://bugs.webkit.org/show_bug.cgi?id=171143

Reviewed by Joseph Pecoraro.

Renamed commit_set_relationships to commit_set_items. Also added commitset_patch_file in the preparation to add
the support for applying patches in custom test groups. To migrate an existing database, run:

```sql
BEGIN;
ALTER TABLE commit_set_relationships RENAME TO commit_set_items;
ALTER TABLE commit_set_items ADD COLUMN commitset_patch_file integer REFERENCES uploaded_files;
ALTER TABLE commit_set_items ADD CONSTRAINT commitset_with_patch_must_have_commit
    CHECK (commitset_patch_file IS NULL OR commitset_commit IS NOT NULL);
END;
```

* init-database.sql:
* public/include/build-requests-fetcher.php:
* public/privileged-api/create-test-group.php:
* server-tests/resources/mock-data.js:
(MockData.addMockData):
(MockData.addMockTestGroupWithGitWebKit):
* tools/js/database.js:


Canonical link: https://commits.webkit.org/188044@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-21 21:31:06 +00:00
Ryosuke Niwa 96b994241e Add the support for creating a custom test group in the analysis task page
Make it possible to create more custom test groups in the analysis task page
https://bugs.webkit.org/show_bug.cgi?id=171138

Rubber-stamped by Chris Dumez.

Extracted CustomConfigurationTestGroupForm out of CreateAnalysisTaskPage and added it to AnalysisTaskPage inside
AnalysisTaskConfiguratorPane. This allows configuration of a new test group within a custom analysis task.

* public/privileged-api/create-test-group.php:
(main): Fixed the bug that the triggerable wasn't resolved when creating a test group in a custom analysis task.

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype.selectTests): Added. Used by CustomConfigurationTestGroupForm's
setConfigurations.
(CustomAnalysisTaskConfigurator.prototype.selectPlatform): Ditto.
(CustomAnalysisTaskConfigurator.prototype.setCommitSets): Ditto.
(CustomAnalysisTaskConfigurator.prototype._setUploadedFilesIfEmpty): Added.
(CustomAnalysisTaskConfigurator.prototype._revisionMapFromCommitSet): Added.
(CustomAnalysisTaskConfigurator.prototype.render): Update the currently selected platforms and tests now that
they can be set externally via selectTests and selectPlatform.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Return the result of _renderRadioButtonList
so that the caller can update the currently selected tests without having to reconstruct the list.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Ditto.
(CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Renamed from _buildCheckboxList. Now returns
a function which updates the currently selected items. We still pretend that multiple items can be selected to
make it future-proof.

* public/v3/components/custom-configuration-test-group-form.js: Added.
(CustomConfigurationTestGroupForm): Added. Inherits from TestGroupForm. Extracted from CreateAnalysisTaskPage.
(CustomConfigurationTestGroupForm.prototype.setHasTask): Added.
(CustomConfigurationTestGroupForm.prototype.hasCommitSets): Added.
(CustomConfigurationTestGroupForm.prototype.setConfigurations): Added. Used by AnalysisTaskConfiguratorPane to
set the default configuration to what the latest test group used.
(CustomConfigurationTestGroupForm.prototype.startTesting): Added. Dispatches "startTesting" action with
platform, test, taskName in addition to what CustomizedTestGroupForm emits.
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree): Added.
(CustomConfigurationTestGroupForm.prototype.render): Added.
(CustomConfigurationTestGroupForm.prototype._updateTestGroupName): Added.
(CustomConfigurationTestGroupForm.cssTemplate): Added.
(CustomConfigurationTestGroupForm.htmlTemplate): Added.

* public/v3/components/test-group-form.js:
(TestGroupForm.cssTemplate): Make the form display: block.

* public/v3/index.html:

* public/v3/models/test-group.js:
(TestGroup.prototype.test): Added.
(TestGroup.prototype.platform): Added.
(TestGroup.createWithCustomConfiguration): Added. Creates a custom test group with an existing analysis task.

* public/v3/models/uploaded-file.js:
(UploadedFile): Fixed a bug that _deletedAt was set to a Date object even when object.deletedAt is null.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskConfiguratorPane): Added.
(AnalysisTaskConfiguratorPane.prototype.didConstructShadowTree): Added. Dispatch createCustomTestGroup action
in turn when receiving startTesting from CustomConfigurationTestGroupForm.
(AnalysisTaskConfiguratorPane.prototype.setTestGroups): Added.
(AnalysisTaskConfiguratorPane.prototype.render): Added.
(AnalysisTaskConfiguratorPane.htmlTemplate): Added. We override this instead of formContent to display the
"Start" button at the end instead of at the beginnning.
(AnalysisTaskConfiguratorPane.cssTemplate): Added.
(AnalysisTaskPage.prototype.didConstructShadowTree): Listen to createCustomTestGroup.
(AnalysisTaskPage.prototype.render): Hide AnalysisTaskConfiguratorPane when the analysis task is not custom.
(AnalysisTaskPage.prototype._showTestGroup): Let AnalysisTaskConfiguratorPane know of the current test group
so that it can update the default configuration if the user hasn't modified yet.
(AnalysisTaskPage.prototype._createCustomTestGroup): Added.

* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage.prototype.didConstructShadowTree):
(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup):
(CreateAnalysisTaskPage.prototype.render):
(CreateAnalysisTaskPage.prototype._renderMessage):
(CreateAnalysisTaskPage.htmlTemplate):
(CreateAnalysisTaskPage.cssTemplate):

* server-tests/privileged-api-create-test-group-tests.js: Added a test case for creating a custom test group for
an existing analysis task.

* server-tests/resources/mock-data.js:
(MockData.otherPlatformId): Added.
(MockData.addMockData): Added a test configuration for otherPlatformId.


Canonical link: https://commits.webkit.org/188040@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-21 21:08:36 +00:00
Ryosuke Niwa 4c2b4ecff1 Make it possible to view results for sub tests and metrics in A/B testing
https://bugs.webkit.org/show_bug.cgi?id=170975

Reviewed by Chris Dumez.

Replaced TestGroupResultsTable, which was a single table that presented the test results with a set of revisions
each build request used, with TestGroupResultsViewer and TestGroupRevisionTable. TestGroupResultsViewer provides
an UI to look the results of sub-tests and sub-metrics and TestGroupRevisionTable provides an UI to display
the set of revisions each build request used. TestGroupRevisionTable can also show the list of custom roots now
that we've added UI to schedule an analysis task with a custom test group.

This patch extends BarGraphGroup to show multiple bars per SingleBarGraph using a canvas with bars indicating
their mean and confidence interval.

* browser-tests/index.html:
(ChartTest.importChartScripts): Include lazily-evaluated-function.js now that Test model object uses
LazilyEvaluatedFunction.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForCommitSet):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):

* public/v3/components/bar-graph-group.js:
(BarGraphGroup): No longer takes formatter. Added _computeRangeLazily and _showLabels as instance variables.
(BarGraphGroup.prototype.addBar): Now takes a list of values, their labels, mean, confidence interval, and
the colors of bar graphs shown for each value and the mean indicator.
(BarGraphGroup.prototype.showLabels): Added.
(BarGraphGroup.prototype.setShowLabels): Added.
(BarGraphGroup.prototype.range): Added.
(BarGraphGroup.prototype._computeRange): Renamed from updateGroupRendering. Now returns the range instead off
setting it to each bar, and each SingleBarGraph's render function uses the value via BarGraphGroup's range.
(BarGraph): Renamed from SingleBarGraph. Added various arguments introduced in addBar, and now stores various
lazily evaluated functions used for rendering.
(BarGraph.prototype.render): Rewritten to use canvas to draw bar graphs and show a label when group's
showLabels() returns true.
(BarGraph.prototype._resizeCanvas): Added.
(BarGraph.prototype._renderCanvas): Added.
(BarGraph.prototype._renderLabels): Added. We align the top of each label to the middle of each bar and shift it
back up by half the height of the label (0.4rem) using margin-top in css.
(BarGraph.htmlTemplate): Uses a canvas now.
(BarGraph.cssTemplate):

* public/v3/components/results-table.js:
(ResultsTable.prototype.renderTable): Updated per code changes to BarGraphGroup.
(ResultsTableRow.prototype.resultContent): Ditto.

* public/v3/components/test-group-results-table.js: Removed.
* public/v3/components/test-group-results-viewer.js: Added.
(TestGroupResultsViewer): Added. Shows a list of test results with bar graphs with mean and confidence interval
indicators. The results of sub tests and metrics can be expanded via "(Breakdown)" link shown below each test.
(TestGroupResultsViewer.prototype.setTestGroup): Added.
(TestGroupResultsViewer.prototype.setAnalysisResults): Added.
(TestGroupResultsViewer.prototype.render): Added.
(TestGroupResultsViewer.prototype._renderResultsTable): Compute the depth of the test tree we show, and construct
the header rows. Each sub test is "indented" by a new column.
(TestGroupResultsViewer.prototype._buildRowForTest): Added. Build rows for metrics of the given test. Expand the
list of its child tests if it's in expandedTests. Otherwise add a link to "Breakdown" if it has any child tests.
(TestGroupResultsViewer.prototype._buildRowForMetric): Added. Builds rows of table cells to show the results for
the given metric for each configuration.
(TestGroupResultsViewer.prototype._buildRowForMetric.createConfigurationRow): Added. A helper to build cells for
a given configuration represented by a requested commit set.
(TestGroupResultsViewer.prototype._buildValueMap): Added. Creates a mappting between a requested commit set, and
the list of values, mean, etc... associated with the results for the commit set.
(TestGroupResultsViewer.prototype._buildEmptyCells): Added. A helper to create empty cells to indent sub tests.
(TestGroupResultsViewer.prototype._expandCurrentMetrics): Added. Highlights the current metrics and renders the
label for each bar in the results.
(TestGroupResultsViewer.htmlTemplate): Added.
(TestGroupResultsViewer.cssTemplate): Added.

* public/v3/components/test-group-revision-table.js: Added.
(TestGroupRevisionTable): Added. Renders the list of revisions requested for each test configuration as well as
ones used in actual testing, and additional repositories being reported (e.g. repositories for helper scripts).
(TestGroupRevisionTable.prototype.setTestGroup): Added.
(TestGroupRevisionTable.prototype.setAnalysisResults): Added.
(TestGroupRevisionTable.prototype.render): Added.
(TestGroupRevisionTable.prototype._renderTable): Added. The basic algorithm here is to first create a row entry
object for each build request, merge cells that use the same revision of the same repository, and then render
the entire table.
(TestGroupRevisionTable.prototype._buildCommitCell): Added.
(TestGroupRevisionTable.prototype._buildCustomRootsCell): Added.
(TestGroupRevisionTable.prototype._mergeCellsWithSameCommitsAcrossRows): Added. Compute rowspan for each cell
by traversing the rows that use the same revision per repository, and store it in rowCountByRepository while
adding the repository to each succeeding row's repositoriesToSkip.
(TestGroupRevisionTable.htmlTemplate): Added.
(TestGroupRevisionTable.cssTemplate): Added.

* public/v3/index.html:
* public/v3/models/analysis-results.js:
(AnalysisResults): Added _metricIds and _lazilyComputedHighestTests as instance variables.
(AnalysisResults.prototype.findResult): Renamed from find.
(AnalysisResults.prototype.highestTests): Added.
(AnalysisResults.prototype._computeHighestTests): Added. Finds the root tests for this analysis result.
(AnalysisResults.prototype.add): Update _metricIds.
(AnalysisResults.prototype.commitSetForRequest): Added. Returns the reported commit set for the build request.
This commit set contains the set of revisions reported to /api/report by A/B testers.
(AnalysisResultsView.prototype.resultForRequest): Renamed from resultForBuildId.

* public/v3/models/metric.js:
(Metric.prototype.relativeName): Added. Computes the relative name given the test/metric path. This function is
used to determine the label for each test/metric in TestGroupResultsViewer.
(Metric.prototype.aggregatorLabel): Extracted from label.
(Metric.prototype.label):
(Metric.makeFormatter): Added the default value of false to alwaysShowSign.

* public/v3/models/test-group.js:
(TestGroup.prototype.compareTestResults): Now takes a metric instead of retrieving it from the analysis task
since a custom analysis task may not have a metric associated with it.

* public/v3/models/test.js:
(Test): Added _computePathLazily as an instance variable.
(Test.prototype.path): Lazily computes the path now that this function can be called on the same test for many
times in TestGroupResultsViewer while computing relative names of tests and metrics.
(Test.prototype._computePath): Extracted path.
(Test.prototype.fullName): Modernized the code.
(Test.prototype.relativeName): Added.

* public/v3/models/uploaded-file.js:
(UploadedFile):
(UploadedFile.prototype.deletedAt): Added.
(UploadedFile.prototype.label): Added.
(UploadedFile.prototype.url): Added.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskTestGroupPane.prototype.setTestGroups):
(AnalysisTaskTestGroupPane.prototype.setAnalysisResults): Replaced setAnalysisResultsView. Now takes an
analysisResults instead of its view.
(AnalysisTaskTestGroupPane.prototype.render): No longer enqueues the results table and the retry form to render
since the results table no longer exists, and the retry form re-renders itself as needed.
(AnalysisTaskTestGroupPane.htmlTemplate): Now uses test-group-results-viewer and test-group-revision-table
instead of test-group-results-table, which has been removed.
(AnalysisTaskTestGroupPane.cssTemplate):
(AnalysisTaskPage.prototype._assignTestResultsIfPossible):

* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Removed superflous console.log's.

* tools/js/v3-models.js: Import LazilyEvaluatedFunction now that it's used in the Test model.

* unit-tests/test-model-tests.js: Added.


Canonical link: https://commits.webkit.org/188037@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-21 20:20:05 +00:00
Ryosuke Niwa 767bb65581 Another build fix after r215061. Clear TriggerableRepositoryGroup's static map in each iteration.
* tools/sync-buildbot.js:
(syncLoop):



Canonical link: https://commits.webkit.org/187912@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-19 07:42:12 +00:00
Ryosuke Niwa a68323fff6 Build fix after r215061.
There was a mismatch between the format updateTriggerable and /api/update-triggerable were using.
Namely, each repository group was assumed to contain a name field in /api/update-triggerable
but updateTriggerable was not including that at all.

We didn't catch this because the test for updateTriggerable also used the wrong format :(

* server-tests/tools-buildbot-triggerable-tests.js:
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.updateTriggerable):



Canonical link: https://commits.webkit.org/187910@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-19 05:58:44 +00:00
Jonathan Davis ea6d2d0ad2 Images in WebKit.org blog article are stretched out
https://bugs.webkit.org/show_bug.cgi?id=169208

Reviewed by Michael Catanzaro.

* wp-content/themes/webkit/style.css:
(article figure > img):


Canonical link: https://commits.webkit.org/187870@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-18 16:17:36 +00:00
Dewei Zhu 2dfb95eefb Add sub-commit UI in commit log viewer.
https://bugs.webkit.org/show_bug.cgi?id=170379

Reviewed by Ryosuke Niwa.

Add an API to return sub-commits for a given commit.
Add sub-commit difference viewer into commit log viewer to show changed sub-commits between two commits.
Add 'ownsSubCommits' info in 'api/commits' return values.
Extend 'api/manifest' to include whether a repositories owns other repositories.
Only show this sub-commit difference viewer when a repository owns other repositories and both commits owns sub-commits.
Add unit tests for those new features.

* browser-tests/commit-log-viewer-tests.js: Updated test cases.
* public/api/commits.php: Added 'sub-commits' to provide sub-commit for a given commit.
* public/include/commit-log-fetcher.php: Added function to query sub-commit from database. Added 'repository' and 'ownsSubCommits' fields in returning commits.
* public/v3/components/expand-collapse-button.js: Added.
(ExpandCollapseButton):
(ExpandCollapseButton.prototype.didConstructShadowTree): Changes state on click and dispatches 'toggle' event.
(ExpandCollapseButton.sizeFactor):
(ExpandCollapseButton.buttonContent):
(ExpandCollapseButton.cssTemplate):
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._renderCommitList): Added sub-commit viewer if two adjacent commits both have sub-commits.
(CommitLogViewer.cssTemplate):
* public/v3/components/sub-commit-viewer.js: Added.
(SubCommitViewer): Added 'SubCommitViewer' class to represent the sub-commit differences between two given commits.`
(SubCommitViewer.prototype.didConstructShadowTree): Makes 'expand-collapse' button listen to 'toggle' event.
(SubCommitViewer.prototype._toggleVisibility): Updates UI once 'expand-collapse' button is clicked.
(SubCommitViewer.prototype.render): Render sub-commit view based on the state.
(SubCommitViewer.prototype._renderSubcommitTable): Generates sub-commits difference table entries.
(SubCommitViewer.htmlTemplate):
(SubCommitViewer.cssTemplate):
* public/v3/index.html: Added 'sub-commit-viewer.js' and 'expand-collapse-button.js'.
* public/v3/models/commit-log.js:
(CommitLog): Added '_subCommits'.
(CommitLog.prototype.updateSingleton): Updates 'rawData.ownsSubCommits' as well.
(CommitLog.prototype.ownsSubCommits):
(CommitLog.prototype.subCommits): Added. Returns sub-commits.
(CommitLog.prototype.fetchSubCommits): Added. Fetches sub-commits if haven't fetched them before.
(CommitLog.prototype._buildSubCommitMap): Added. Creates a map which maps repositories to commits.
(CommitLog.diffSubCommits): Added. Finds difference between two given commits.
(CommitLog.fetchBetweenRevisions): Updated due to '_constructFromRawData' change.
(CommitLog.fetchForSingleRevision): Updated due to '_constructFromRawData' change.
(CommitLog._constructFromRawData): Removed first argument 'repository' as it can be determined by calling 'Repository.findById'.
* public/v3/models/repository.js:
(Repository):
(Repository.prototype.owner): Returns the owner id.
(Repository.prototype.ownedRepositories): Returns a list of repositories owned by this repository.
* server-tests/api-commits-tests.js: Added tests for 'sub-commits' filter.
* server-tests/api-manifest-tests.js: Added a test.
* unit-tests/commit-log-tests.js: Added tests for 'fetchSubCommits' and 'diffSubCommits'.
* unit-tests/resources/mock-v3-models.js: Added 'ownerRepository' and 'ownedRepository'.


Canonical link: https://commits.webkit.org/187795@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-14 23:03:19 +00:00
JF Bastien 6ffeeac143 WebAssembly: manage memory better
https://bugs.webkit.org/show_bug.cgi?id=170628

Reviewed by Keith Miller, Michael Saboff.

JSTests:

* wasm/Builder.js: move a helper out so tests can use it
(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
* wasm/WASM.js: add utilities to classify opcodes
(export.opcodes):
(export.const.memoryAccessInfo.op.const.sign):
* wasm/function-tests/memory-access-past-4gib.js: Added. This test
fails before this patch.
(const.op.of.WASM.opcodes):
* wasm/function-tests/memory-many.js: Added. This simple tests
just shouldn't crash. In verbose mode it's useful at determining
if the GC falls behind or not.
* wasm/function-tests/memory-multiagent.js: Added. Emulate postMessage.
(const.startAgents.numAgentsToStart.a.agent.receiveBroadcast):
(const.startAgents.numAgentsToStart.a.write.const.idx.Math.random):
(const.broadcastToAgents):
* wasm/js-api/extension-MemoryMode.js: verbose logging.
(testMemoryNoMax):
(testMemory):
(testInstanceNoMemory):
(testInstanceNoMax):
(testInstance):
* wasm/utilities.js: move a utility here.

Source/JavaScriptCore:

WebAssembly fast memories weren't managed very well. This patch
refactors it and puts us in a good position to further improve our
fast memory handling in the future.

We now cache fast memories at a process granularity, but make sure
that they don't consume dirty pages. We add a cap to the total
number of allocated fast memories to avoid ASLR degradation.

We teach the GC about memories as a kind of resource it should
care about because it didn't have visibility into the amount of
memory each represented. This allows benchmarks which allocate
memories back-to-back to reliably get fast memories 100% of the
time, even on a system under load, which wasn't the case
before. This reliability yields roughly 8% perf bump on x86-64
WasmBench.

The GC heuristic is as follows: each time we allocate a fast
memory we notify the GC, which then keeps track of the total
number of fast memories allocated since it last GC'd. We
separately keep track of the total number of fast memories which
have ever existed at any point in time (cached + allocated). This
is a monotonically-increasing high watermark. The GC will force a
full collection if, since it last ran, half or more of the high
watermark of fast memories was allocated.

At the same time, if we fail obtaining a fast memory from the
cache we do a GC to try to find one. If that fails we'll allocate
a new one (this can also fail, then we go to slow memory). This
can also be improved, but it's a good start.

This currently disables fast memories on iOS because getting fast
memories isn't a guaranteed thing. Rather, we get quite a few of
them and achieve significant speedups, but benchmarks which
allocate memories back-to-back end up falling behind because the
GC can conservatively hold onto memories, which then yields a perf
cliff. That cliff isn't reliable, WasmBench gets roughly 10 of 18
fast memories when in theory it should get all of them fast (as
MacOS does). The patch significantly improves the state of iOS
though, and in a follow-up we could re-enable fast memories.

Part of this good positioning is a facility to pre-allocate fast
memories very early at startup, before any fragmentation
occurs. This is currently disabled but worked extremely reliably
on iOS. Once we fix the above issues we'll want to re-visit and
turn on pre-allocation.

We also avoid locking for fast memory identification when
performing signal handling. I'm very nervous about acquiring locks
in a signal handler because in general signals can happen when
we've messed up. This isn't the case with fast memories: we're
raising a signal on purpose and handling it. However this doesn't
mean we won't mess up elsewhere! This will get more complicated
once we add support for multiple threads sharing memories and
being able to grow their memories. One example: the code calls
CRASH(), which executes the following code in release:

    *(int *)(uintptr_t)0xbbadbeef = 0;

This is a segfault, which our fast memory signal handler tries to
handle. It does so by first figuring out whether 0xbbadbeef is in
a fast memory region, reqiring a lock. If we CRASH() while holding
the lock then our thread self-deadlocks, giving us no crash report
and a bad user experience.

Avoiding a lock therefore it's not about speed or reduced
contention. In fact, I'd use something else than a FIFO if these
were a concern. We're also doing syscalls, which dwarf any locking
cost.

We now only allocate 4GiB + redzone of 64k * 128 for fast memories
instead of 8GiB. This patch reuses the logic from
B3::WasmBoundsCheck to perform bounds checks when accesses could
exceed the redzone. We'll therefore benefit from CSE goodness when
it reaches WasmBoundsCheck. See bug #163469.

* b3/B3LowerToAir.cpp: fix a baaaaddd bug where unsigned->signed
conversion allowed out-of-bounds reads by -2GiB. I'll follow-up in
bug #170692 to prevent this type of bug once and for all.
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Validate.cpp: update WasmBoundsCheck validation.
* b3/B3Value.cpp:
(JSC::B3::Value::effects): update WasmBoundsCheck effects.
* b3/B3WasmBoundsCheckValue.cpp:
(JSC::B3::WasmBoundsCheckValue::WasmBoundsCheckValue):
(JSC::B3::WasmBoundsCheckValue::redzoneLimit):
(JSC::B3::WasmBoundsCheckValue::dumpMeta):
* b3/B3WasmBoundsCheckValue.h:
(JSC::B3::WasmBoundsCheckValue::maximum):
* b3/air/AirCustom.cpp:
(JSC::B3::Air::WasmBoundsCheckCustom::isValidForm):
* b3/testb3.cpp:
(JSC::B3::testWasmBoundsCheck):
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reportWebAssemblyFastMemoriesAllocated):
(JSC::Heap::webAssemblyFastMemoriesThisCycleAtThreshold):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didAllocateWebAssemblyFastMemories):
(JSC::Heap::shouldDoFullCollection):
(JSC::Heap::collectIfNecessaryOrDefer):
* heap/Heap.h:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/Options.cpp:
* runtime/Options.h:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffset):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::B3IRGenerator::emitLoadOp):
(JSC::Wasm::B3IRGenerator::emitStoreOp):
(JSC::Wasm::createJSToWasmWrapper):
* wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):
* wasm/WasmMemory.cpp: Rewrite.
(JSC::Wasm::makeString):
(JSC::Wasm::Memory::initializePreallocations):
(JSC::Wasm::Memory::createImpl):
(JSC::Wasm::Memory::create):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::fastMappedRedzoneBytes):
(JSC::Wasm::Memory::fastMappedBytes):
(JSC::Wasm::Memory::maxFastMemoryCount):
(JSC::Wasm::Memory::addressIsInActiveFastMemory):
(JSC::Wasm::Memory::grow):
* wasm/WasmMemory.h:
(Memory::maxFastMemoryCount):
(Memory::addressIsInActiveFastMemory):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::visitChildren):
(JSC::JSWebAssemblyInstance::globalMemoryByteSize):
* wasm/js/JSWebAssemblyInstance.h:
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::grow):
(JSC::JSWebAssemblyMemory::finishCreation):
(JSC::JSWebAssemblyMemory::visitChildren):

Source/WebCore:

Re-use a VM tag which was intended for JavaScript core, was then
used by our GC, and is now unused. If I don't do this then
WebAssembly fast memories will make vmmap look super weird because
it'll look like multi-gigabyte of virtual memory are allocated as
part of our process' regular memory!

Separately I need to update vmmap and other tools to print the
right name. Right now this tag gets identified as "JS garbage
collector".

* page/ResourceUsageData.cpp:
(WebCore::ResourceUsageData::ResourceUsageData):
* page/ResourceUsageData.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::HistoricResourceUsageData::HistoricResourceUsageData):
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::displayNameForVMTag):
(WebCore::categoryForVMTag):

Source/WTF:

Re-use a VM tag which was intended for JavaScript core, was then
used by our GC, and is now unused. If I don't do this then
WebAssembly fast memories will make vmmap look super weird because
it'll look like multi-gigabyte of virtual memory are allocated as
part of our process' regular memory!

Separately I need to update vmmap and other tools to print the
right name. Right now this tag gets identified as "JS garbage
collector".

* wtf/OSAllocator.h:
* wtf/VMTags.h:

Websites/webkit.org:

* docs/b3/intermediate-representation.html: typos


Canonical link: https://commits.webkit.org/187757@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-13 21:48:42 +00:00
Ryosuke Niwa bb021681a6 Retrying an A/B testing does not set the repetition count in some cases
https://bugs.webkit.org/show_bug.cgi?id=170695

Reviewed by Joseph Pecoraro.

When selecting an existing A/B test group, the analysis task page automatically sets the repetition count
of its retry to be that of the original test group. However, this information wasn't being passed correctly
to the code that actually created a test group. As a result, the retried test group's repetition count does
not match that of the original group or the number shown to the user on UI.

Fixed the bug by updating this._repetitionCount in setRepetitionCount.

* browser-tests/index.html:
* browser-tests/test-group-form-tests.js: Added. Added tests.
(.createTestGroupFormWithContext): Added.
* public/v3/components/test-group-form.js:
(TestGroupForm.prototype.setRepetitionCount):
(TestGroupForm.formContent):
(TestGroupForm):


Canonical link: https://commits.webkit.org/187683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-12 04:37:38 +00:00
Ryosuke Niwa 24d96fe83c Add the UI for scheduling a A/B testing with a custom root
https://bugs.webkit.org/show_bug.cgi?id=170622

Reviewed by Anders Carlsson.

This patch adds the support for creating a new analysis task with a custom darwinup roots. A follow up patch
would update the syncing script to schedule such an A/B testing job to a buildbot instance.


* ReadMe.md: Updated instructions for backing up and restoring the database so that it's easier to replace
the file path for the backup.

* init-database.sql: Make task_platform and task_metric optional in each analysis task. Also added a column
to store the root file in commit_set_relationships.

* public/api/build-requests.php:
(main): Include the uploaded files.

* public/api/commits.php:
(main): Added the support for querying the latest commits for a given platform. This is used in a new page
to create a custom analysis task to autofill the latest revisions for a given platform.

* public/api/test-groups.php:
(main): Include the uploaded files.

* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::__construct): Added a list of uploaded_files and a map from its id.
(BuildRequestsFetcher::uploaded_files): Added.
(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Added the support for including custom roots' id in
each commit set, and inserting its meta data in the list of uplaoded files.

* public/include/commit-log-fetcher.php:
(CommitLogFetcher::fetch_latest_for_platform): Added. Finds the latest commit for a given platform. Ideally,
we should be finding the latest commit for a given platform, but this is very slow so instead find the commit
of the latest build for a given platform.

* public/privileged-api/create-test-group.php:
(main): Added the support for creating an analysis task along with a group.
(commit_sets_from_revision_sets): Added the support for custom roots. Verify the specified uploaded file exists
and include it in commit_set_relationships. Because commits and upload files are stored in a different column
in commit_set_relationships, this function now stores the information for each row of commit_set_relationships
except the commit set ID, which is unknown until the set is created, instead of a commit ID.
(ensure_commit_sets): Made the each entry in a commit set a row instead of a commit ID as done. As this format
is only by v2 UI and detect-changes.js, we don't add the support for specifying custom roots here.

* public/privileged-api/upload-file.php:
(main): Fixed a typo. Also added one more error check.

* public/v3/components/custom-analysis-task-configurator.js: Added. The UI for selecting a test, a platform,
and a set of revisions, as well as custom roots for a custom A/B testing job. The first set of revision with
custom roots is referred as "baseline", and the second configuration is referred as "comparison" in this class.
(CustomAnalysisTaskConfigurator):
(CustomAnalysisTaskConfigurator.prototype.tests): Added.
(CustomAnalysisTaskConfigurator.prototype.platform): Added.
(CustomAnalysisTaskConfigurator.prototype.commitSets): Added. Returns a pair of baseline and comparsion if both
have been configured by the user.
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): Added.
(CustomAnalysisTaskConfigurator.prototype._configureComparison): Added. Called when the user is to configu the
"comparison" configuration.
(CustomAnalysisTaskConfigurator.prototype.render): Added.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Added. Renders the list of top-level tests
that can be scheduled by a triggerable.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Added. Renders the list of platforms
that can be schedule with the currently selected list of tests by a triggerable. Note that the current UI only
lets the user select a single test but the intent is to allow multiple tests to be selected in the near future.
(CustomAnalysisTaskConfigurator.prototype._buildCheckboxList): Added. Creates a list of radio boxes to select
an item with a callback for each. It automatically sets "selected" class on the selected item. It's used to
render both the list of tests and platforms.
(CustomAnalysisTaskConfigurator.prototype._updateTriggerable): Added. Finds the triggerable for a given list of
tests and platforms. Returns an error when some tests belong to another triggearalbe.
(CustomAnalysisTaskConfigurator.prototype._updateRepositoryGroups): Added. Finds a repository group to use when
the current triggerable has changed. We try to use the repository group of the same name if there is any, and
defaults to the first repository group if there is none. This allows the set of repositories to be specified to
more or less persist across different triggerables. For example, if iOS platforms and Mac platforms use two
distinct triggerables , and both triggerables have two repository groups: one that only specify the OS and the
other that specifies both teh OS and WebKit revision, then this code allows the choice the user had made to
specify either just the OS or the OS and WebKit will be preserved when the user switches from an iOS platform
to a Mac platform.
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Added. Create a commit set map, the format that
TestGroup.createWithTask accepts given "baseline" and "comparison" commit sets. Pretend "comparison" is not set
if two sets are identical since it makes no sense to schedule an A/B testing job when A and B are identical.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Added. Creates a commit set using the revisions
and the csutom roots the user had specified.
(CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Added. Renders the pane to specify revisions
and custom roots for "baseline" and "comparison".
(CustomAnalysisTaskConfigurator.prototype._renderBaselineRevisionTable): Added.
(CustomAnalysisTaskConfigurator.prototype._renderComparisonRevisionTable): Added.
(CustomAnalysisTaskConfigurator.prototype._optionalRepositoryList): Added.
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Added. Creates a table for specifying revisions
and custom roots along with a list of repository groups to pick. The set of repositories and custom roots are
shown at the all if all repository groups require them. Otherwise, they are grouped at the bottom as optional.
(CustomAnalysisTaskConfigurator.prototype._buildRepositoryGroupList): Added.
(CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup): Added.
(CustomAnalysisTaskConfigurator.prototype._buildRevisionInput): Added. Creates an input element to specify
a revision for a given repository. Autofills it with the latest commit for the currently selected platform if
the user had not modified the field by the time the revisions are fetched.
(CustomAnalysisTaskConfigurator.htmlTemplate): Added.
(CustomAnalysisTaskConfigurator.cssTemplate): Added.

* public/v3/components/instant-file-uploader.js: Added. A form to upload a custom darwinup root in "baseline"
or "comparison" configurations of CustomAnalysisTaskConfigurator. It's "instant" because it auto-detects when a
file to be uploaded had already been uploaded elsewhere by checking its SHA-256 hash.
(InstantFileUploader):
(InstantFileUploader.prototype.hasFileToUpload): Added.
(InstantFileUploader.prototype.uploadedFiles): Added.
(InstantFileUploader.prototype.addUploadedFile): Added. It's called on the uploader for "comparison"
configuration when the uploader for "baseline" configuration dipsatches "uploadedFile" action to automatically
mirror the newly uploaded custom root to "comparision" configuration.
(InstantFileUploader.prototype.didConstructShadowTree): Added.
(InstantFileUploader.prototype.render): Added.
(InstantFileUploader.prototype._renderUploadedFiles): Added. Renders the list of the uploaded files.
(InstantFileUploader.prototype._renderPreuploadFiles): Added. Renders the list of the files to be uploaded with
a progress bar.
(InstantFileUploader.prototype._updateUploadStatus): Added. Updates the progress bar for uploading the file.
(InstantFileUploader.prototype._formatUploadError): Added.
(InstantFileUploader.prototype._didFileInputChange): Added. Called when the user picks a file to uploaded on
the input element. Fetch the meta data for the uploaded file with the same SHA-256 hash if there is any, and
start uploading the file if there isn't one.
(InstantFileUploader.prototype._removeUploadedFile): Added.
(InstantFileUploader.prototype._didUploadFile): Added. Move a file from the list of files to be uploaded to
the list of uploaded files.
(InstantFileUploader.htmlTemplate): Added.
(InstantFileUploader.cssTemplate): Added.

* public/v3/index.html:

* public/v3/models/analysis-task.js:
(AnalysisTask): Made platform and metric optional as it is now.
(AnalysisTask.findByPlatformAndMetric): Skip analysis tasks without a platform or a metric.
(AnalysisTask.prototype.isCustom): Added. Returns true for a custom analysis task.
(AnalysisTask.fetchRelatedTasks): Skip custom analysis tasks.
(AnalysisTask._constructAnalysisTasksFromRawData): Construct analysis tasks even if they were missing a metric
or a platform instead of silently skipping them.

* public/v3/models/build-request.js:
(BuildRequest.constructBuildRequestsFromData): Construct uploaded file objects returned by /api/build-requests.

* public/v3/models/commit-log.js:
(CommitLog.fetchLatestCommitForPlatform): Added.

* public/v3/models/commit-set.js:
(CommitSet): Added this._customRoots.
(CommitSet.prototype.customRoots): Returns this._customRoots.
(CommitSet.prototype.equals): Returns false when the set of custom roots are not equal.
(CommitSet.areCustomRootsEqual): Added.
(CustomCommitSet):
(CustomCommitSet.prototype.equals): Added.
(CustomCommitSet.prototype.customRoots): Added.
(CustomCommitSet.prototype.addCustomRoot): Added.

* public/v3/models/manifest.js:
(Manifest._didFetchManifest): Store fileUploadSizeLimit in the manifest as UploadedFile.fileUploadSizeLimit.
This allows a file size check in the client size instead of uploading it to the server and receiving an error.

* public/v3/models/metric.js:
(Metric.formatTime): Moved from ChartPaneStatusView to be also used by InstantFileUploader._renderUploadedFiles.

* public/v3/models/test-group.js:
(TestGroup.prototype.createWithTask): Added.
(TestGroup.prototype.createAndRefetchTestGroups):
(TestGroup.prototype._revisionSetsFromCommitSets): Added. Extracted from createAndRefetchTestGroups.
(TestGroup.prototype._fetchTestGroupsForTask): Added. Extracted from createAndRefetchTestGroups.

* public/v3/models/triggerable.js:
(Triggerable.triggerablePlatformsForTests): Added.
(Triggerable.sortByNamePreferringSmallerRepositories): Added.

* public/v3/models/uploaded-file.js:
(UploadedFile.prototype.createdAt): Added.
(UploadedFile.prototype.filename): Added.
(UploadedFile.prototype.author): Added.
(UploadedFile.prototype.size): Added.
(UploadedFile.uploadFile): Added a client-side check for the file size using UploadedFile.fileUploadSizeLimit.
(UploadedFile.fetchUnloadedFileWithIdenticalHash): Ditto. Also fixed a bug that 404 was resulting in a rejected
promise instead of a resolved promise with null.

* public/v3/pages/analysis-category-page.js:
(AnalysisCategoryPage.prototype._reconstructTaskList): Modernized the code. Added the support for platform and
metric being null for some analysis tasks.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype._didFetchTask): Don't fetch the measurement set or create a chart for custom tasks.
(AnalysisTaskPage.prototype.render): Don't display the charts or the stacking table for custom tasks.
(AnalysisTaskPage.prototype._renderTaskNameAndStatus): Don't try to show the full test name for custom tasks
since it's not associated with exactly one pair.

* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView.prototype._renderBuildRevisionTable):
(ChartPaneStatusView.prototype._formatTime): Moved to Metric.formatTime.

* public/v3/pages/chart-pane.js:
(ChartPane.prototype._analyzeRange): Set inProgress to true to hide CustomAnalysisTaskConfigurator in
CreateAnalysisTaskPage when creating a non-custom analysis task for a specific range.

* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage): This page now shows CustomAnalysisTaskConfigurator by default, and lets a user create
a custom analysis task by picking a test, a platform, and a set of revisions and custom darwinup roots.
(CreateAnalysisTaskPage.prototype.updateFromSerializedState): Show a message when inProgress is set. This is
the old behavior of this page.
(CreateAnalysisTaskPage.prototype.didConstructShadowTree): Added.
(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Added.
(CreateAnalysisTaskPage.prototype.render):
(CreateAnalysisTaskPage.prototype._renderMessage): Added. Hides CustomAnalysisTaskConfigurator and the select
element to specify the numebr of iterations when a message is set.
(CreateAnalysisTaskPage.htmlTemplate):
(CreateAnalysisTaskPage.cssTemplate):

* public/v3/pages/page-router.js:
(PageRouter.prototype.route): Always enqueue the page to re-render when the route has changed.

* server-tests/api-build-requests-tests.js: Updated test cases now that the response contains a list of
uploaded files associated with build requests.

* server-tests/privileged-api-create-test-group-tests.js: Added test cases for creating a custom analysis task
and a test group with custom roots.

* server-tests/resources/mock-data.js:
(MockData.addMockData): Updated the mock data to satisfy new constraint on analysis-tasks table.

* tools/js/remote.js: Include global.FormData from form-data.js.

* unit-tests/build-request-tests.js:
(sampleBuildRequestData): Updated the mock response.
* unit-tests/buildbot-syncer-tests.js:
(createSampleBuildRequest): Ditto.
* unit-tests/test-groups-tests.js:
(sampleTestGroup): Ditto.


Canonical link: https://commits.webkit.org/187631@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:45:11 +00:00
Ting-Wei Lan 50b3877a0a .:
Elftoolchain ar doesn't support response files
https://bugs.webkit.org/show_bug.cgi?id=170105

Patch by Ting-Wei Lan <lantw44@gmail.com> on 2017-04-08
Reviewed by Michael Catanzaro.

WebKit enables the use of response files when cmake and ninja is used.
However, the default implementation of ar command used in FreeBSD, which
is part of elftoolchain project, doesn't support reading arguments from
response files. To avoid causing undefined reference error on FreeBSD,
we disable the use of response files when elftoolchain ar is detected.

* Source/cmake/OptionsCommon.cmake:

Websites/perf.webkit.org:
Unreviewed, rolling out r215202.
https://bugs.webkit.org/show_bug.cgi?id=170694

Committed incorrectly (Requested by rniwa on #webkit).

Reverted changeset:

"Add the UI for scheduling a A/B testing with a custom root"
https://bugs.webkit.org/show_bug.cgi?id=170622
http://trac.webkit.org/changeset/215202

Patch by Commit Queue <commit-queue@webkit.org> on 2017-04-10


Canonical link: https://commits.webkit.org/187629@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:43:11 +00:00
Ryosuke Niwa 6c5587a73e Add the UI for scheduling a A/B testing with a custom root
https://bugs.webkit.org/show_bug.cgi?id=170622

Reviewed by Anders Carlsson.

This patch adds the support for creating a new analysis task with a custom darwinup roots. A follow up patch
would update the syncing script to schedule such an A/B testing job to a buildbot instance.


* ReadMe.md: Updated instructions for backing up and restoring the database so that it's easier to replace
the file path for the backup.

* init-database.sql: Make task_platform and task_metric optional in each analysis task. Also added a column
to store the root file in commit_set_relationships.

* public/api/build-requests.php:
(main): Include the uploaded files.

* public/api/commits.php:
(main): Added the support for querying the latest commits for a given platform. This is used in a new page
to create a custom analysis task to autofill the latest revisions for a given platform.

* public/api/test-groups.php:
(main): Include the uploaded files.

* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::__construct): Added a list of uploaded_files and a map from its id.
(BuildRequestsFetcher::uploaded_files): Added.
(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Added the support for including custom roots' id in
each commit set, and inserting its meta data in the list of uplaoded files.

* public/include/commit-log-fetcher.php:
(CommitLogFetcher::fetch_latest_for_platform): Added. Finds the latest commit for a given platform. Ideally,
we should be finding the latest commit for a given platform, but this is very slow so instead find the commit
of the latest build for a given platform.

* public/privileged-api/create-test-group.php:
(main): Added the support for creating an analysis task along with a group.
(commit_sets_from_revision_sets): Added the support for custom roots. Verify the specified uploaded file exists
and include it in commit_set_relationships. Because commits and upload files are stored in a different column
in commit_set_relationships, this function now stores the information for each row of commit_set_relationships
except the commit set ID, which is unknown until the set is created, instead of a commit ID.
(ensure_commit_sets): Made the each entry in a commit set a row instead of a commit ID as done. As this format
is only by v2 UI and detect-changes.js, we don't add the support for specifying custom roots here.

* public/privileged-api/upload-file.php:
(main): Fixed a typo. Also added one more error check.

* public/v3/components/custom-analysis-task-configurator.js: Added. The UI for selecting a test, a platform,
and a set of revisions, as well as custom roots for a custom A/B testing job. The first set of revision with
custom roots is referred as "baseline", and the second configuration is referred as "comparison" in this class.
(CustomAnalysisTaskConfigurator):
(CustomAnalysisTaskConfigurator.prototype.tests): Added.
(CustomAnalysisTaskConfigurator.prototype.platform): Added.
(CustomAnalysisTaskConfigurator.prototype.commitSets): Added. Returns a pair of baseline and comparsion if both
have been configured by the user.
(CustomAnalysisTaskConfigurator.prototype.didConstructShadowTree): Added.
(CustomAnalysisTaskConfigurator.prototype._configureComparison): Added. Called when the user is to configu the
"comparison" configuration.
(CustomAnalysisTaskConfigurator.prototype.render): Added.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Added. Renders the list of top-level tests
that can be scheduled by a triggerable.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerablePlatforms): Added. Renders the list of platforms
that can be schedule with the currently selected list of tests by a triggerable. Note that the current UI only
lets the user select a single test but the intent is to allow multiple tests to be selected in the near future.
(CustomAnalysisTaskConfigurator.prototype._buildCheckboxList): Added. Creates a list of radio boxes to select
an item with a callback for each. It automatically sets "selected" class on the selected item. It's used to
render both the list of tests and platforms.
(CustomAnalysisTaskConfigurator.prototype._updateTriggerable): Added. Finds the triggerable for a given list of
tests and platforms. Returns an error when some tests belong to another triggearalbe.
(CustomAnalysisTaskConfigurator.prototype._updateRepositoryGroups): Added. Finds a repository group to use when
the current triggerable has changed. We try to use the repository group of the same name if there is any, and
defaults to the first repository group if there is none. This allows the set of repositories to be specified to
more or less persist across different triggerables. For example, if iOS platforms and Mac platforms use two
distinct triggerables , and both triggerables have two repository groups: one that only specify the OS and the
other that specifies both teh OS and WebKit revision, then this code allows the choice the user had made to
specify either just the OS or the OS and WebKit will be preserved when the user switches from an iOS platform
to a Mac platform.
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Added. Create a commit set map, the format that
TestGroup.createWithTask accepts given "baseline" and "comparison" commit sets. Pretend "comparison" is not set
if two sets are identical since it makes no sense to schedule an A/B testing job when A and B are identical.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet): Added. Creates a commit set using the revisions
and the csutom roots the user had specified.
(CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Added. Renders the pane to specify revisions
and custom roots for "baseline" and "comparison".
(CustomAnalysisTaskConfigurator.prototype._renderBaselineRevisionTable): Added.
(CustomAnalysisTaskConfigurator.prototype._renderComparisonRevisionTable): Added.
(CustomAnalysisTaskConfigurator.prototype._optionalRepositoryList): Added.
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable): Added. Creates a table for specifying revisions
and custom roots along with a list of repository groups to pick. The set of repositories and custom roots are
shown at the all if all repository groups require them. Otherwise, they are grouped at the bottom as optional.
(CustomAnalysisTaskConfigurator.prototype._buildRepositoryGroupList): Added.
(CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup): Added.
(CustomAnalysisTaskConfigurator.prototype._buildRevisionInput): Added. Creates an input element to specify
a revision for a given repository. Autofills it with the latest commit for the currently selected platform if
the user had not modified the field by the time the revisions are fetched.
(CustomAnalysisTaskConfigurator.htmlTemplate): Added.
(CustomAnalysisTaskConfigurator.cssTemplate): Added.

* public/v3/components/instant-file-uploader.js: Added. A form to upload a custom darwinup root in "baseline"
or "comparison" configurations of CustomAnalysisTaskConfigurator. It's "instant" because it auto-detects when a
file to be uploaded had already been uploaded elsewhere by checking its SHA-256 hash.
(InstantFileUploader):
(InstantFileUploader.prototype.hasFileToUpload): Added.
(InstantFileUploader.prototype.uploadedFiles): Added.
(InstantFileUploader.prototype.addUploadedFile): Added. It's called on the uploader for "comparison"
configuration when the uploader for "baseline" configuration dipsatches "uploadedFile" action to automatically
mirror the newly uploaded custom root to "comparision" configuration.
(InstantFileUploader.prototype.didConstructShadowTree): Added.
(InstantFileUploader.prototype.render): Added.
(InstantFileUploader.prototype._renderUploadedFiles): Added. Renders the list of the uploaded files.
(InstantFileUploader.prototype._renderPreuploadFiles): Added. Renders the list of the files to be uploaded with
a progress bar.
(InstantFileUploader.prototype._updateUploadStatus): Added. Updates the progress bar for uploading the file.
(InstantFileUploader.prototype._formatUploadError): Added.
(InstantFileUploader.prototype._didFileInputChange): Added. Called when the user picks a file to uploaded on
the input element. Fetch the meta data for the uploaded file with the same SHA-256 hash if there is any, and
start uploading the file if there isn't one.
(InstantFileUploader.prototype._removeUploadedFile): Added.
(InstantFileUploader.prototype._didUploadFile): Added. Move a file from the list of files to be uploaded to
the list of uploaded files.
(InstantFileUploader.htmlTemplate): Added.
(InstantFileUploader.cssTemplate): Added.

* public/v3/index.html:

* public/v3/models/analysis-task.js:
(AnalysisTask): Made platform and metric optional as it is now.
(AnalysisTask.findByPlatformAndMetric): Skip analysis tasks without a platform or a metric.
(AnalysisTask.prototype.isCustom): Added. Returns true for a custom analysis task.
(AnalysisTask.fetchRelatedTasks): Skip custom analysis tasks.
(AnalysisTask._constructAnalysisTasksFromRawData): Construct analysis tasks even if they were missing a metric
or a platform instead of silently skipping them.

* public/v3/models/build-request.js:
(BuildRequest.constructBuildRequestsFromData): Construct uploaded file objects returned by /api/build-requests.

* public/v3/models/commit-log.js:
(CommitLog.fetchLatestCommitForPlatform): Added.

* public/v3/models/commit-set.js:
(CommitSet): Added this._customRoots.
(CommitSet.prototype.customRoots): Returns this._customRoots.
(CommitSet.prototype.equals): Returns false when the set of custom roots are not equal.
(CommitSet.areCustomRootsEqual): Added.
(CustomCommitSet):
(CustomCommitSet.prototype.equals): Added.
(CustomCommitSet.prototype.customRoots): Added.
(CustomCommitSet.prototype.addCustomRoot): Added.

* public/v3/models/manifest.js:
(Manifest._didFetchManifest): Store fileUploadSizeLimit in the manifest as UploadedFile.fileUploadSizeLimit.
This allows a file size check in the client size instead of uploading it to the server and receiving an error.

* public/v3/models/metric.js:
(Metric.formatTime): Moved from ChartPaneStatusView to be also used by InstantFileUploader._renderUploadedFiles.

* public/v3/models/test-group.js:
(TestGroup.prototype.createWithTask): Added.
(TestGroup.prototype.createAndRefetchTestGroups):
(TestGroup.prototype._revisionSetsFromCommitSets): Added. Extracted from createAndRefetchTestGroups.
(TestGroup.prototype._fetchTestGroupsForTask): Added. Extracted from createAndRefetchTestGroups.

* public/v3/models/triggerable.js:
(Triggerable.triggerablePlatformsForTests): Added.
(Triggerable.sortByNamePreferringSmallerRepositories): Added.

* public/v3/models/uploaded-file.js:
(UploadedFile.prototype.createdAt): Added.
(UploadedFile.prototype.filename): Added.
(UploadedFile.prototype.author): Added.
(UploadedFile.prototype.size): Added.
(UploadedFile.uploadFile): Added a client-side check for the file size using UploadedFile.fileUploadSizeLimit.
(UploadedFile.fetchUnloadedFileWithIdenticalHash): Ditto. Also fixed a bug that 404 was resulting in a rejected
promise instead of a resolved promise with null.

* public/v3/pages/analysis-category-page.js:
(AnalysisCategoryPage.prototype._reconstructTaskList): Modernized the code. Added the support for platform and
metric being null for some analysis tasks.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype._didFetchTask): Don't fetch the measurement set or create a chart for custom tasks.
(AnalysisTaskPage.prototype.render): Don't display the charts or the stacking table for custom tasks.
(AnalysisTaskPage.prototype._renderTaskNameAndStatus): Don't try to show the full test name for custom tasks
since it's not associated with exactly one pair.

* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView.prototype._renderBuildRevisionTable):
(ChartPaneStatusView.prototype._formatTime): Moved to Metric.formatTime.

* public/v3/pages/chart-pane.js:
(ChartPane.prototype._analyzeRange): Set inProgress to true to hide CustomAnalysisTaskConfigurator in
CreateAnalysisTaskPage when creating a non-custom analysis task for a specific range.

* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage): This page now shows CustomAnalysisTaskConfigurator by default, and lets a user create
a custom analysis task by picking a test, a platform, and a set of revisions and custom darwinup roots.
(CreateAnalysisTaskPage.prototype.updateFromSerializedState): Show a message when inProgress is set. This is
the old behavior of this page.
(CreateAnalysisTaskPage.prototype.didConstructShadowTree): Added.
(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup): Added.
(CreateAnalysisTaskPage.prototype.render):
(CreateAnalysisTaskPage.prototype._renderMessage): Added. Hides CustomAnalysisTaskConfigurator and the select
element to specify the numebr of iterations when a message is set.
(CreateAnalysisTaskPage.htmlTemplate):
(CreateAnalysisTaskPage.cssTemplate):

* public/v3/pages/page-router.js:
(PageRouter.prototype.route): Always enqueue the page to re-render when the route has changed.

* server-tests/api-build-requests-tests.js: Updated test cases now that the response contains a list of
uploaded files associated with build requests.
*server-tests/api-commits-tests.js: Added a test case for /api/commits/<repository-name>/latest?platform=X.
* server-tests/privileged-api-create-test-group-tests.js: Added test cases for creating a custom analysis task
and a test group with custom roots.
* server-tests/resources/mock-data.js:
(MockData.addMockData): Updated the mock data to satisfy new constraint on analysis-tasks table. Also inserted
more commits, builds, and build_commits rows for testing /api/commits/<repository-name>/latest?platform=X.

* tools/js/remote.js: Include global.FormData from form-data.js.

* unit-tests/analysis-task-tests.js: Added a test for calling findByPlatformAndMetric when there is a custom
analysis task.
(sampleAnalysisTask): Removed the category since /api/analysis-tasks/ no longer generate this property.
(sampleCustomAnalysisTask): Added.
* unit-tests/build-request-tests.js:
(sampleBuildRequestData): Updated the mock response. Added a test case for fetcing custom roots.
* unit-tests/buildbot-syncer-tests.js:
(createSampleBuildRequest): Ditto.
* unit-tests/test-groups-tests.js:
(sampleTestGroup): Ditto.


Canonical link: https://commits.webkit.org/187628@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-10 21:38:04 +00:00
Simon Fraser af5126d74f Update the css-status page to handle changes in CSSProperties.json.
Change the page structure to allow the left sidebar to use sticky positioning.

"Done" -> "Supported".

Save the search in the URL.

Other formatting changes.

* wp-content/themes/webkit/css-status.php:

Canonical link: https://commits.webkit.org/187580@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-08 23:55:33 +00:00
Ryosuke Niwa a24ed0574a Make cycler page scroll down when a dashboard is too tall for the current viewport size
https://bugs.webkit.org/show_bug.cgi?id=170588

Rubber-stamped by Chris Dumez.

Updated the cycler page to scroll down smoothly over 500ms and scroll up again before moving to the next page
when a dashboard page is too tall to be shown at once. For now, we assume that each dashboard's height is no
more than 2x the height of the viewport.

* public/cycler.html:


Canonical link: https://commits.webkit.org/187546@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-07 21:45:45 +00:00
Dean Jackson a79b9e03b2 Fix broken link.
* demos/webgpu/index.html:

Canonical link: https://commits.webkit.org/187503@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-07 00:36:53 +00:00
Ryosuke Niwa 658e5485ca Each build request should be associated with a repository group
https://bugs.webkit.org/show_bug.cgi?id=170528

Rubber-stamped by Chris Dumez.

Make the buildbot syncing script use the concept of repository groups so that each repository group can post
a different set of properties to buildbot. In order to do this, we associate each build request with
a repository group to use. Each triggerable's repository groups is now updated by the syncing scripts via
/api/update-triggerable just the same way the set of the supported platform, test pairs are updated.

Each repository group specifies the list of repositories, a dictionary that maps the buildbot property name
to either a string value or a repository name enclosed in < and >:

```js
"repositoryGroups": {
    "webkit-svn": {
        "repositories": ["WebKit", "macOS"],
        "properties": {"os": "<macOS>", "wk": "<WebKit>"}
    }
}
```

With this, removed the support for specifying a repository to use in generic dictionary of properties via
a dictionary with a single key of "root", "rootOptions", and "rootsExcluding". We now validate that the list of
repositories in each repository group matches exactly the ones used in buildbot properties as well as ones in
build requests.

After this patch, sync-with-buildbot.js will no longer schedule a build request without a repository group.
Run the appropriate database queries to set the repository group on each build request. Because of this change,
this patch also makes BuildbotTriggerable.prototype.syncOnce more robust against invalid build requests.
Instead of throwing an exception and exiting early, it simply skips all build requests that belong to the same
test group if the next build request to be scheduled does not specify a repository group.

* init-database.sql: Add request_repository_group column to build_requests table, and a unique constraint for
repository and group pair in triggerable_repositories table.

* public/api/update-triggerable.php:
(main): Validate and insert repository groups.
(validate_configurations): Extracted from main.
(validate_repository_groups): Added.

* public/v3/models/repository.js:
(Repository.findTopLevelByName): Added.

* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::results_internal): Include the repository group of each request in the JSON response.

* public/include/repository-group-finder.php: Added. A helper class to find the repository group for a given
triggerable for a list of repositories.
(RepositoryGroupFinder): Added.
(RepositoryGroupFinder::__construct): Added.
(RepositoryGroupFinder::find_by_repositories): Added.
(RepositoryGroupFinder::populate_map): Added.

* public/privileged-api/create-test-group.php:
(main): Each element in an array returned by ensure_commit_sets and commit_sets_from_revision_sets now contains
"set", the list of commit IDs, and "repository_group", the repository group identified for each commit set.
Use that to set the repository group in each new build request.
(commit_sets_from_revision_sets): Use RepositoryGroupFinder to find the right repository group.
(ensure_commit_sets): Ditto. There is no need to find a repository group for each commit set here since its
argument is keyed by the repository name. e.g. {"WebKit": [123, 456], "macOS": ["16A323", "16A323"]}

* public/v3/models/build-request.js:
(BuildRequest):
(BuildRequest.prototype.triggerable): Added.
(BuildRequest.prototype.repositoryGroup): Added.
(BuildRequest.constructBuildRequestsFromData): Resolve the triggerable and the repository group.

* public/v3/models/triggerable.js:
(Triggerable.prototype.name): Added.
(Triggerable.prototype.acceptedRepositories): Deleted.
(TriggerableRepositoryGroup):
(TriggerableRepositoryGroup.prototype.accepts): Added. Retruns true if the repository group

* server-tests/api-build-requests-tests.js: Added a test for getting the repository group of a build request.
* server-tests/api-manifest-tests.js: Added assertions for the repository groups.
* server-tests/api-report-tests.js:
(.emptyReport):
(.reportWithTwoLevelsOfAggregations):
* server-tests/api-update-triggerable.js: Added test cases for updating the repository groups associated with
a triggerable.
(.updateWithOSXRepositoryGroup):
(.mapRepositoriesByGroup):
* server-tests/privileged-api-create-test-group-tests.js:
(addTriggerableAndCreateTask): Add two repository groups for testing. Added assertions for repository groups
in existing test cases, and added a test case for creating a test group with two different repository groups.

* server-tests/resources/mock-data.js:
(MockData.resetV3Models): Reset TriggerableRepositoryGroup's static maps.
(MockData.emptyTriggeragbleId): Added.
(MockData.macosRepositoryId): Added.
(MockData.webkitRepositoryId): Added.
(MockData.gitWebkitRepositoryId): Added.
(MockData.addMockData): Create repository groups as needed. Renamed the "OS X" repository to "macOS" since some
tests were using the latter, and now we need mock data to be consistent across tests due to stricter checks.
(MockData.addEmptyTriggerable): Added. Used in api-update-triggerable.js.
(MockData.addMockTestGroupWithGitWebKit): Added. Used in api-build-requests-tests.js.
(MockData.addAnotherMockTestGroup): Cleanup.
(MockData.mockTestSyncConfigWithSingleBuilder): Updated the mock configuration per code changes.
(MockData.mockTestSyncConfigWithTwoBuilders): Ditto.

* server-tests/tools-buildbot-triggerable-tests.js: Updated a test case testing /api/update-triggerable to test
updating the set of repository groups in addition to the set of test, platform pairs.
(.refetchManifest): Added.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer): Now takes a set of configurations shared across syncers: repositoryGroups, slaveArgument,
and buildRequestArgument as the third argument.
(BuildbotSyncer.prototype.repositoryGroups): Added.
(BuildbotSyncer.prototype._testGroupMapForBuildRequests): Cleaned up the code to use Array.prototype.find.
Also added an assertion that the build request is associated with a repository group.
(BuildbotSyncer.prototype._propertiesForBuildRequest): Removed the support for using an arbitary property to
specify a revision in favor of explicity listing each property and repository name in a repository group.
(BuildbotSyncer._loadConfig): Removed the support for "shared", which specified the set of buildbot properties
shared across syncers, the name of properties which specifies the build slave name and build request ID. These
values are not stored as top-level properties and superseded by the concept of repository groups.
(BuildbotSyncer._parseRepositoryGroup): Parses and validates repository groups.
(BuildbotSyncer._createTestConfiguration): We no longer expect each configuration to specify a dictionary of
properties or buildRequestArgument (often inherited from shared).
(BuildbotSyncer._validateAndMergeConfig): Removed "slaveArgument" and "buildRequestArgument" from the list of
allowed proeprties in each configuration now that they're specified as top-level properties.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.updateTriggerable): Update the associated repository groups.
(BuildbotTriggerable.prototype.syncOnce): Skip test groups for which the next build request to be scheduled is
not included in the list of valid build requests.
(BuildbotTriggerable.prototype._validateRequests): Now returns the list of valid build requests, which excludes
those that lack a repository group set.
(BuildbotTriggerable.prototype._nextRequestInGroup): Extracted from _scheduleRequestIfSlaveIsAvailable. Finds
the next build request to be scheduled for the test group.
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Renamed from
_scheduleNextRequestInGroupIfSlaveIsAvailable. Now takes the syncer and the slave name as arguments instead of
a test group information since syncOnce now calls _nextRequestInGroup to find the next build request.

* tools/js/v3-models.js:

* unit-tests/build-request-tests.js: Fixed the test name.

* unit-tests/buildbot-syncer-tests.js: Removed tests for "rootOptions" and "rootsExcluding", and added tests
for parsing repository groups.
(sampleiOSConfig): Updated the mock configuration per code changes.
(sampleiOSConfigWithExpansions): Ditto.
(smallConfiguration): Ditto. Now returns the entire configuration instead of a single builder configuration.
Various test cases have been updated to reflect this.
(createSampleBuildRequest): Removed the git hash of WebKit to match the repository groups listed in the mock
configurations. The git hash was there to test "rootOptions", which this patch removed.
(samplePendingBuild): Removed "root_dict" from the list of properties. This was used to test "rootsExcluding"
which, again, this patch removed.
(sampleInProgressBuild): Ditto.
(sampleFinishedBuild): Ditto.

* unit-tests/resources/mock-v3-models.js:
(MockModels.inject): Added ock repository groups so that existing tests will continue to function.


Canonical link: https://commits.webkit.org/187490@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-06 21:56:59 +00:00
Jonathan Davis 70b114e7af Updates feature status for recently shipped features
https://bugs.webkit.org/show_bug.cgi?id=170359

Reviewed by Brian Burg.
Source/JavaScriptCore:

Changed "Done" status to "Supported".

* features.json:

Source/WebCore:

Added missing Gamepad entry.
Changed "Done" status to "Supported".
Also changed status from "In Development" to "Supported" for:

- CSS Grid Layout Level 1
- CSS Inline Layout Module Level 3
- CSS Scroll Snap Points Module Level 1
- CSS Color Level 4
- Fetch API
- Indexed Database 2.0
- Media Capture and Streams
- Pointer Lock
- Preload
- Input Events

* features.json:

Websites/webkit.org:

Added styles for "Supported" status.

* wp-content/themes/webkit/status.php:


Canonical link: https://commits.webkit.org/187482@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-06 19:51:25 +00:00
Ryosuke Niwa 9e3a23f74f Introduce the notion of repository groups to triggerables
https://bugs.webkit.org/show_bug.cgi?id=170228

Reviewed by Chris Dumez.

On some triggerable, it's desirable to specify multiple sets of repositories that are accepted.

For example, if a repository X transitioned from Subversion to Git, and if a triggerable accepted X and
some other repository Y, then it's desirable to two sets: (X-Subversion, Y) and (X-Git, Y) since neither
(X-Subversion, X-Git) nor (X-Subversion, X-Git, Y) makes sense as a set.

This patch introduces triggerable_repository_groups table to represent a set of repositories accepted by
a triggerable. It has many to one relationship to build_triggerables and triggerable_repositories in turn
now has many to one relationship to triggerable_repository_groups instead of build_triggerables.

Also make it possible to disable a triggerable e.g. a set of tests and platforms are no longer supported.
We don't want to delete the triggerable completely from the database since it would result in the associated
A/B testing results being purged, which is not desirale.

To migrate an existing database, run the following transaction:
```sql
BEGIN;
ALTER TABLE build_triggerables ADD COLUMN triggerable_disabled boolean NOT NULL DEFAULT FALSE;

CREATE TABLE triggerable_repository_groups (
    repositorygroup_id serial PRIMARY KEY,
    repositorygroup_triggerable integer REFERENCES build_triggerables NOT NULL,
    repositorygroup_name varchar(256) NOT NULL,
    repositorygroup_description varchar(256),
    repositorygroup_accepts_roots boolean NOT NULL DEFAULT FALSE,
    CONSTRAINT repository_group_name_must_be_unique_for_triggerable
        UNIQUE(repositorygroup_triggerable, repositorygroup_name));
INSERT INTO triggerable_repository_groups (repositorygroup_triggerable, repositorygroup_name)
    SELECT triggerable_id, 'default' FROM build_triggerables;

ALTER TABLE triggerable_repositories ADD COLUMN trigrepo_group integer REFERENCES triggerable_repository_groups;
UPDATE triggerable_repositories SET trigrepo_group = repositorygroup_id FROM triggerable_repository_groups
    WHERE trigrepo_triggerable = repositorygroup_triggerable;
ALTER TABLE triggerable_repositories ALTER COLUMN trigrepo_group SET NOT NULL;

ALTER TABLE triggerable_repositories DROP COLUMN trigrepo_triggerable;
ALTER TABLE triggerable_repositories DROP COLUMN trigrepo_sub_roots;
END;
```

* init-database.sql:
* public/admin/triggerables.php: Use a custom column to make forms to add and configure repository groups.
(insert_triggerable_repositories): Added.
(generate_repository_list): Added.
(generate_repository_form): Added.
(generate_repository_checkboxes): Now generates checkboxes for a repository group instead of a triggerable.

* public/include/manifest-generator.php:
(fetch_triggerables): Fixed the bug that we were not filtering results with query in /api/triggerable.
Rewrote it to include an array of repository groups, which in turn contains an array of repositories along
with its name and a description, and a boolean indicating whether it accepts a custom root file or not.
The boolean will be used when we're adding the support for perf try bots. We will keep acceptedRepositories
since it's still used by detect-changes.js.

* public/v3/models/manifest.js:
(Manifest._didFetchManifest): Resolve repositoriy, test, and platform IDs to their respective objects.

* public/v3/models/triggerable.js:
(Triggerable):
(Triggerable.prototype.isDisabled): Added.
(Triggerable.prototype.repositoryGroups): Added.
(Triggerable.prototype.acceptsTest): Added.
(TriggerableRepositoryGroup): Added.
(TriggerableRepositoryGroup.prototype.description): Added.
(TriggerableRepositoryGroup.prototype.acceptsCustomRoots): Added.
(TriggerableRepositoryGroup.prototype.repositories): Added.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype._didFetchTask): Don't use a disabled triggerable.

* server-tests/api-manifest-tests.js: Updated a test case to test repository groups.

* tools/js/database.js:
(tableToPrefixMap): Added triggerable_repository_groups.

* tools/js/v3-models.js: Imported TriggerableRepositoryGroup from triggerable.js.


Canonical link: https://commits.webkit.org/187454@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-05 23:12:46 +00:00
Dean Jackson fdac680d67 Unreviewed. Add details on how to enable the experimental feature.
* demos/webgpu/index.html:

Canonical link: https://commits.webkit.org/187382@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-04 21:22:05 +00:00
Dean Jackson 705fd2dd0c Unreviewed. More WebGPU demos.
* demos/webgpu/2d.jpg: Added.
* demos/webgpu/2d.js:
* demos/webgpu/circle.svg: Added.
* demos/webgpu/cubes.jpg: Added.
* demos/webgpu/hello.html: Added.
* demos/webgpu/hello.jpg: Added.
* demos/webgpu/hello.js: Copied from Websites/webkit.org/demos/webgpu/2d.js.
(init):
(render):
* demos/webgpu/index.html: Added.
* demos/webgpu/simple.jpg: Added.

Canonical link: https://commits.webkit.org/187349@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-03 22:47:53 +00:00
Dean Jackson 0ddafd875c Unreviewed. Add some WebGPU examples.
* demos/webgpu/2d.html: Added.
* demos/webgpu/2d.js: Added.
* demos/webgpu/cubes.html: Added.
* demos/webgpu/cubes.js: Added.
* demos/webgpu/shared.css: Added.
* demos/webgpu/shared.js: Added.
* demos/webgpu/simple.html: Added.
* demos/webgpu/simple.js: Added.

Canonical link: https://commits.webkit.org/187291@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-01 02:05:01 +00:00
Ryosuke Niwa 4b16249e48 Build fix. For OS versions, we can end up with non-alphanumeric revision.
Delete the code path only used by the v2 UI since nobody uses that now.

* public/api/commits.php:
(main):



Canonical link: https://commits.webkit.org/187288@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-01 00:45:51 +00:00
Ryosuke Niwa 5074f685f6 sync-buildbot.js can schedule more than one build per builder
https://bugs.webkit.org/show_bug.cgi?id=170318

Reviewed by Saam Barati.

The bug was caused by _scheduleNextRequestInGroupIfSlaveIsAvailable not returning a promise when
scheduling the first build request of a test group. This resulted in _pullBuildbotOnAllSyncers
to prematurely resolve before POST'ing new build had finished. That in turn could result in the
next cycle of syncing to occur before POST'ing has actually taken place.

More precisely, when the nextRequest was the first request or its associated syncer object could
not be identified, we were supposed to find the first available syncer, schedule the request,
and then return the promise returned by scheduleRequestInGroupIfAvailable. However, the for loop
which called scheduleRequestInGroupIfAvailable on every syncer was declaring its own variable
named "promise" thereby shadowing the outer variable, which is returned to the caller.

Fixed the bug by not declaring a shadowing variable, and refactored the code. Namely, the only
reason we had such a complicated logic with two local variables, promise and syncer, was so that
we could log that we're scheduling a build. Extracted this code as _scheduleRequestWithLog.

_scheduleNextRequestInGroupIfSlaveIsAvailable can now simply exit early with a call to
_scheduleRequestWithLog when the syncer is readily identified. When looping over syncers, it can
simply return the first non-null result of _scheduleNextRequestInGroupIfSlaveIsAvailable.

* server-tests/tools-buildbot-triggerable-tests.js: Added a test case where we wait 10ms after
receiving the request to POST a build. There should be no new network request until we resolve
this request.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._scheduleNextRequestInGroupIfSlaveIsAvailable): Fixed the bug.
(BuildbotTriggerable.prototype._scheduleRequestWithLog): Extracted.


Canonical link: https://commits.webkit.org/187244@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-31 02:33:44 +00:00
Ryosuke Niwa 0331d703de Modernize BuildbotSyncer and BuildbotTriggerable
https://bugs.webkit.org/show_bug.cgi?id=170310

Reviewed by Chris Dumez.

Modernized the code to use arrow functions and other modern idoms in ES2016.

* ReadMe.md: Added instructions on how to run tests, and moved the steps to configure postgres
above the steps to configure Apache since only the former is needed to run tests.
* tools/js/buildbot-syncer.js:
* tools/js/buildbot-triggerable.js:


Canonical link: https://commits.webkit.org/187243@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-31 02:11:32 +00:00
Ryosuke Niwa a7b2604afb Yet another build fix after r214502. Workaround webkit.org/b/169907 for now.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.cssTemplate):



Canonical link: https://commits.webkit.org/187240@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-31 02:04:57 +00:00
Ryosuke Niwa e9b5dbb709 Revert an erronously change in the previous commit.
* public/v3/components/base.js:



Canonical link: https://commits.webkit.org/187225@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:52:35 +00:00
Ryosuke Niwa bb5e34b63d Build fix after r214280. Don't render components until its element is inserted into a document.
* public/v3/components/base.js:
(ComponentBase):


Canonical link: https://commits.webkit.org/187224@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:48:16 +00:00
Ryosuke Niwa 5d2ad33446 Another build fix after r214502.
* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype.render): this._groupToCellMap.get may not contain the cell when startPoint
or metric had not been fetched yet even if currentTestGroup is set.


Canonical link: https://commits.webkit.org/187175@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 21:58:40 +00:00
Ryosuke Niwa 2ac6405431 Build fix after r214502. Analysis tasks without any test groups are throwing exceptions.
* public/v3/components/results-table.js:
(ResultsTable.prototype.renderTable): Don't show the header row when there are no content to show.
(ResultsTable.prototype._computeRepositoryList): Return a pair of arrays. The caller expects the repository
list to be an array, not undefined.


Canonical link: https://commits.webkit.org/187174@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 21:26:20 +00:00
Ryosuke Niwa af2e510f96 Modernize AnalysisTaskPage
https://bugs.webkit.org/show_bug.cgi?id=170165

Reviewed by Antti Koivisto.

Modernized AnalysisTaskPage and related components. The main refactoring happened in AnalysisTaskPage
from which AnalysisTaskResultsPane and AnalysisTaskTestGroupPane have been extracted.

Decoupled BuildRequest from its results. AnalysisResultsViewer and TestGroupResultsTable now stores
a reference to AnalysisResultsView and Metric to find the results for each build request.
This refactoring is necessary in order to view results of an arbitrary metric in the future.

Also refactored ResultsTable and its subclasses extensively. Instead of making its render() to invoke
subclass' methods such as buildRowGroups, heading, and additionalHeading, rely on each subclass call
to invoke renderTable(), renamed from render(), with callbacks to add extra headers and columns.

This patch also fixes a number of usability issues found by the user such as changing the test name
resets the customized revisions by the virtue of the modern code being naturally more correct.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer):
(AnalysisResultsViewer.prototype.setTestGroupCallback): Deleted. Replaced by "testGroupClick" action.
(AnalysisResultsViewer.prototype.setRangeSelectorLabels): Moved here from ResultsTable since it's
never used in ResultsTable or TestGroupResultsTable.
(AnalysisResultsViewer.prototype.selectedRange): Ditto.
(AnalysisResultsViewer.prototype.setPoints): Now takes metric as the third argument.
(AnalysisResultsViewer.prototype.setTestGroups): Now takes the current test group.
(AnalysisResultsViewer.prototype.didUpdateResults): Deleted.
(AnalysisResultsViewer.prototype.setAnalysisResultsView): Added.
(AnalysisResultsViewer.prototype.render): Invoke _renderTestGroups lazily. Also simplified the logic
to find the selected list item. Since we always use a shadow DOM now, we can simply look for an element
with ".seleted" instead of crafting a unique class name.
(AnalysisResultsViewer.prototype.renderTestGroups): Renamed from buildRowGroups. Specify callbacks to
insert headers for A/B radio buttons, which has been moved from ResultsTable.prototype.render, and the
stacked blocks of testing results.
(AnalysisResultsViewer.prototype._classForTestGroup): Deleted.
(AnalysisResultsViewer.prototype._openStackingBlock): Deleted.
(AnalysisResultsViewer.prototype._expandBetween): Create a new set for expandedPoints to make
_renderTestGroupsLazily.evaluate do the work.
(AnalysisResultsViewer._layoutBlocks): Moved from TestGroupStackingGrid.layout.
(AnalysisResultsViewer._sortBlocksByRow): Moved from AnalysisResultsViewer.TestGroupStackingGrid.
(AnalysisResultsViewer._insertAfterBlockWithSameRange): Ditto.
(AnalysisResultsViewer._insertBlockInFirstAvailableColumn): Ditto.
(AnalysisResultsViewer._createCellsForRow): Ditto.

(AnalysisResultsViewer.TestGroupStackingBlock):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.createStackingCell): No longer creates a unique
class name here. See the inline comment for AnalysisResultsViewer.prototype.render.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.isThin): Deleted. We used to collapse "failed"
test groups as a thin vertical line, and we wanted to show them next to each other in _layoutBlock but
we don't do that anymore.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForCommitSet): Added. Uses
this._analysisResultsView to extract the results for the current metrics.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):

* public/v3/components/analysis-task-bug-list.js: Added.
(AnalysisTaskBugList): Added. Extracted from AnalysisTaskChartPane.
(AnalysisTaskBugList.prototype.setTask): Added.
(AnalysisTaskBugList.prototype.didConstructShadowTree): Added.
(AnalysisTaskBugList.prototype.render): Added.
(AnalysisTaskBugList.prototype._associateBug): Added.
(AnalysisTaskBugList.prototype._dissociateBug): Added.
(AnalysisTaskBugList.htmlTemplate): Added.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.htmlTemplate): Added a hook to insert more content at the end in AnalysisTaskChartPane.
(ChartPaneBase.paneFooterTemplate): Added.

* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype.setCommitSetMap):
(CustomizableTestGroupForm.prototype.startTesting): Renamed from _submitted. Now dispatches an action
by the name of "startTesting" instead of calling this._startCallback.
(CustomizableTestGroupForm.prototype.didConstructShadowTree): Added. Moved the logic to attach event
handlers here to avoid eagerly creating the shadow tree in the constructor.
(CustomizableTestGroupForm.prototype._computeCommitSetMap): Use the newly added this._revisionEditorMap
to find the relevant input element instead of running a querySelector.
(CustomizableTestGroupForm.prototype.render): Lazily invoke _renderCustomRevisionTable. This avoids
overriding the customized revisions when the user finally types in the test group name.
(CustomizableTestGroupForm.prototype._renderCustomRevisionTable): Extracted from render.
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons): Made this a non-static method
since it needs to update this._revisionEditorMap now. Merged _constructRevisionRadioButtons.
(CustomizableTestGroupForm.prototype._createRadioButton): Deleted. See above.
(CustomizableTestGroupForm.cssTemplate):
(CustomizableTestGroupForm.formContent): Use IDs instead of classes to make this.content(ID) work.

* public/v3/components/mutable-list-view.js:
(MutableListView.prototype.setList):
(MutableListView.prototype.setKindList):
(MutableListView.prototype.setAddCallback): Deleted. Replaced by "addItem" action.
(MutableListView.prototype.render):
(MutableListItem.prototype.content):

* public/v3/components/results-table.js:
(ResultsTable): Removed this._rangeSelectorLabels, this._rangeSelectorCallback, and this._selectedRange
as they are only used by AnalysisResultsViewer. Also replaced this._valueFormatter by
this._analysisResultsView which knows a metric.
(ResultsTable.prototype.setValueFormatter): Deleted.
(ResultsTable.prototype.setRangeSelectorLabels): Deleted.
(ResultsTable.prototype.setRangeSelectorCallback): Deleted.
(ResultsTable.prototype.selectedRange): Deleted.
(ResultsTable.prototype._rangeSelectorClicked): Deleted.
(ResultsTable.prototype.setAnalysisResultsView): Added.
(ResultsTable.prototype.renderTable): Added. Removed the logic to add _rangeSelectorLabels since it has
been moved to AnalysisResultsViewer.prototype.render inside buildColumns, which also inserts additional
columns which used to be stored on each ResultsTableRow. Use the same technique to insert additional
headers. Also take the name (thead tr th) of row header (tbody tr td) as an argument and automatically
create a table cell of an appropriate colspan.
(ResultsTable.prototype._createRevisionListCells):
(ResultsTable.prototype.heading): Deleted. Superseded by buildHeaders callback.
(ResultsTable.prototype.additionalHeading): Ditto.
(ResultsTable.prototype.buildRowGroups): Deleted. It is now the responsibility of each subclass to call
ResultsTable's renderTable() in the subclass' render() function.
(ResultsTable.prototype._computeRepositoryList): No longer takes extraRepositories as an argument.
Instead, this function now returns a pair of the repository list and the list of constant commits.
(ResultsTable.htmlTemplate):
(ResultsTable.cssTemplate):

* public/v3/components/test-group-form.js:
(TestGroupForm): Avoid eagerly creating the shadow tree. Also removed the removed the dead code.
(TestGroupForm.prototype.setRepetitionCount): Simply override the value of the select element.
(TestGroupForm.prototype.didConstructShadowTree): Added. Attach event handlers here to avoid eagerly
creating the shadow tree in the constructor.
(TestGroupForm.prototype.startTesting): Renamed from _submitted. Dispatch "startTesting" action instead
of invoking _startCallback which has been removed.
(TestGroupForm.htmlTemplate):
(TestGroupForm.formContent):

* public/v3/components/test-group-results-table.js:
(TestGroupResultsTable):
(TestGroupResultsTable.prototype.didUpdateResults): Deleted. No longer neeed per setAnalysisResultsView
in ResultsTable.
(TestGroupResultsTable.prototype.setTestGroup):
(TestGroupResultsTable.prototype.heading): Deleted.
(TestGroupResultsTable.prototype.render):
(TestGroupResultsTable.prototype._renderTestGroup): Extracted from render.
(TestGroupResultsTable.prototype._buildRowGroups): Renamed from buildRowGroups.
(TestGroupResultsTable.prototype._buildRowGroupForCommitSet): Extracted from buildRowGroups.
(TestGroupResultsTable.prototype._buildComparisonRow): Extracted from buildRowGroups.buildRowGroups

* public/v3/index.html: Include analysis-task-bug-list.js.

* public/v3/models/analysis-results.js:
(AnalysisResults): Inverted the map so that we can easily create a view based on metric.
(AnalysisResults.prototype.find): Ditto.
(AnalysisResults.prototype.add): Ditto.
(AnalysisResults.prototype.viewForMetric): Added.
(AnalysisResults.fetch):
(AnalysisResultsView): Added.
(AnalysisResultsView.prototype.metric): Added.
(AnalysisResultsView.prototype.resultForBuildId): Added.

* public/v3/models/build-request.js:
(BuildRequest.result): Deleted.
(BuildRequest.setResult): Deleted.

* public/v3/models/test-group.js:
(TestGroup): Removed this._allCommitSets since it was never used.
(TestGroup.prototype.didSetResult): Deleted since it was never used.
(TestGroup.prototype.compareTestResults): Now takes an array of measurement set values.
(TestGroup.prototype._valuesForCommitSet): Deleted.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane): This class now includes the form to cutomize the revisions.
(AnalysisTaskChartPane.prototype.setShowForm): Added.
(AnalysisTaskChartPane.prototype._mainSelectionDidChange):
(AnalysisTaskChartPane.prototype.didConstructShadowTree): Added. Dispatches "newTestGroup" action when
the user presses the button to start a new A/B testing from the chart.
(AnalysisTaskChartPane.prototype.render): Added.
(AnalysisTaskChartPane.prototype.paneFooterTemplate): Added.
(AnalysisTaskChartPane.cssTemplate):

(AnalysisTaskResultsPane): Added. Encapsulates AnalysisResultsViewer and CustomizableTestGroupForm.
(AnalysisTaskResultsPane.prototype.setPoints): Added.
(AnalysisTaskResultsPane.prototype.setTestGroups): Added.
(AnalysisTaskResultsPane.prototype.setAnalysisResultsView): Added.
(AnalysisTaskResultsPane.prototype.setShowForm): Added.
(AnalysisTaskResultsPane.prototype.didConstructShadowTree): Added. Dispatches "newTestGroup" action
when the user presses the button to start a new A/B testing from the chart.
(AnalysisTaskResultsPane.prototype.render): Added.
(AnalysisTaskResultsPane.htmlTemplate): Added.
(AnalysisTaskResultsPane.cssTemplate): Added.

(AnalysisTaskTestGroupPane): Added. Encapsulates TestGroupResultsTable and CustomizableTestGroupForm.
(AnalysisTaskTestGroupPane.prototype.didConstructShadowTree): Added.
(AnalysisTaskTestGroupPane.prototype.setTestGroups): Added.
(AnalysisTaskTestGroupPane.prototype.setAnalysisResultsView): Added.
(AnalysisTaskTestGroupPane.prototype.render): Added.
(AnalysisTaskTestGroupPane.prototype._renderTestGroups): Added. Updates the list of test groups. Hide
the hidden groups unless showHiddenGroups is set. Updates this._testGroupMap so that the visibility of
groups and their names can be updated without having to re-render the entire list.
(AnalysisTaskTestGroupPane.prototype._renderTestGroupVisibility): Added.
(AnalysisTaskTestGroupPane.prototype._renderTestGroupNames): Added.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup): Added. Update TestGroupResultsTable with
the selected test group. Also highlight the list view, and update the hide-unhide toggle button's label
as needed.
(AnalysisTaskTestGroupPane.htmlTemplate): Added.
(AnalysisTaskTestGroupPane.cssTemplate): Added.

(AnalysisTaskPage): Deleted a massive number of instance variables. They are now manged by newly added
AnalysisTaskChartPane, AnalysisTaskResultsPane, and AnalysisTaskTestGroupPane
(AnalysisTaskPage.prototype.didConstructShadowTree): Added. Attach various event handlers here to avoid
eagerly creating the shadow tree in the constructor.
(AnalysisTaskPage.prototype._fetchRelatedInfoForTaskId):
(AnalysisTaskPage.prototype._didFetchTask): No longer sets the value formatter to the results viewer
and the results table as they now recieve AnalysisResultsView later in _assignTestResultsIfPossible.
(AnalysisTaskPage.prototype._didFetchMeasurement): Set the metric to the results viewer.
(AnalysisTaskPage.prototype._didUpdateTestGroupHiddenState):
(AnalysisTaskPage.prototype._assignTestResultsIfPossible): Create AnalysisResultsView from the newly
retrieved AnalysisResults and pass it to AnalysisTaskResultsPane and AnalysisTaskTestGroupPane.
(AnalysisTaskPage.prototype.render): Dramatically simplified.
(AnalysisTaskPage.prototype._renderTaskNameAndStatus): Extracted from render.
(AnalysisTaskPage.prototype._renderRelatedTasks): Ditto.
(AnalysisTaskPage.prototype._renderCauseAndFixes): Ditto.
(AnalysisTaskPage.prototype._showTestGroup):
(AnalysisTaskPage.prototype._updateTaskName): Now takes the new name as an argument.
(AnalysisTaskPage.prototype._updateTestGroupName): Now takes the new name as the second argument.
(AnalysisTaskPage.prototype._hideCurrentTestGroup): Now takes the test group to hide.
(AnalysisTaskPage.prototype._associateCommit): Moved to AnalysisTaskBugList.
(AnalysisTaskPage.prototype._dissociateCommit): Ditto.
(AnalysisTaskPage.prototype._retryCurrentTestGroup): Now takes the test group as the first argument.
(AnalysisTaskPage.prototype._chartSelectionDidChange): Deleted.
(AnalysisTaskPage.prototype._createNewTestGroupFromChart): Deleted.
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): Deleted.
(AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Deleted.
(AnalysisTaskPage.htmlTemplate):
(AnalysisTaskPage.cssTemplate):

* unit-tests/test-groups-tests.js: Updated a test case which was expecting BuildReqeust's result, which
has been removed, to exist.


Canonical link: https://commits.webkit.org/187127@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-28 23:00:36 +00:00
David Kilzer ef0eeb8605 [Bugzilla] Add a checkbox to add self to the CC list when creating or editing an attachment
<https://webkit.org/b/124047>

Original patch by Csaba Osztrogonác.

Reviewed by Daniel Bates.

* template/en/default/attachment/reviewform.html.tmpl:
Add template for "Add me to CC list" by default.  This
adds the reviewer to the CC list whether the "Preview"
or "Publish" button is used.  Only the "Preview" button
allows the checkbox to be unchecked, though.

Canonical link: https://commits.webkit.org/187026@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-25 18:25:47 +00:00
David Kilzer a332e4d961 Fix Apache::SizeLimit unshared size limit in mod_perl.pl for bugs.webkit.org
<https://webkit.org/b/169926>

Reviewed by Brent Fulgham.

* mod_perl.pl: Update syntax for setting unshared size
limit, and bump it up another 100 Mb so children don't
respawn as quickly.

Canonical link: https://commits.webkit.org/186957@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-24 02:28:33 +00:00
Ryosuke Niwa 4477d29301 Share more code between ManifestGenerator and /api/triggerables
https://bugs.webkit.org/show_bug.cgi?id=169993

Reviewed by Chris Dumez.

Shared the code to fetch the list of triggerables from the database between ManifestGenerator
and /api/triggerables.

* public/api/triggerables.php:
(main):
* public/include/manifest-generator.php:
(ManifestGenerator::fetch_triggerables): Extracted as a static function. Also include the ID
in the triggerable data.


Canonical link: https://commits.webkit.org/186941@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-23 20:56:36 +00:00
Ryosuke Niwa 564c076ca4 create-test-group should allow a different set of repositories to be used in each configuration
https://bugs.webkit.org/show_bug.cgi?id=169992

Rubber-stamped by Antti Koivisto.

Added the support for new POST parameter, revisionSets, to /privileged-api/create-test-group.
This new parameter now specifies an array of repository id to revision dictionaries, and allows
different set of repositories' revisions to be specified in each dictionary.

We keep the old API for v2 UI and detect-changes.js compatibility for now.

* public/privileged-api/create-test-group.php:
(main):
(commit_sets_from_revision_sets): Added.
(ensure_commit_sets): Only fetch the top-level repository per r213788 and r213976.

* public/v3/models/test-group.js:
(TestGroup.createAndRefetchTestGroups): Use the newly added revisionSets parameter instead of
the now depreacted commitSets parameter.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList): Simplified this code
by simply verifying the consistency of commit sets now that createAndRefetchTestGroups takes
an array of commit sets instead of a dictionary of repository name to a list of revisions.

* server-tests/privileged-api-create-test-group-tests.js: Added test cases for new parameter.


Canonical link: https://commits.webkit.org/186940@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-23 20:54:39 +00:00
Ryosuke Niwa 4bd8d9eb49 /api/uploaded-file should return createdAt as a POSIX timestamp
https://bugs.webkit.org/show_bug.cgi?id=169980

Rubber-stamped by Antti Koivisto.

Call Database::to_js_time on createdAt to return it as a POSIX timestamp.

* public/include/uploaded-file-helpers.php:
(format_uploaded_file): Fixed the bug.
* server-tests/api-manifest-tests.js: Renamed from api-manifest.js.
* server-tests/api-uploaded-file-tests.js: Renamed from api-uploaded-file.js. Added a test case.


Canonical link: https://commits.webkit.org/186914@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-23 00:27:01 +00:00
Ryosuke Niwa 4ff46a1f70 UploadedFile should support a callback for upload progress
https://bugs.webkit.org/show_bug.cgi?id=169977

Reviewed by Andreas Kling.

Added a new option dictionary to CommonRemoteAPI.sendHttpRequest with uploadProgressCallback

Moved request headers and responseHandler callback in NodeRemoteAPI to this dictionary,
and updated the tests which relied on this code.

* public/shared/common-remote.js:
(CommonRemoteAPI.prototype.postJSON):
(CommonRemoteAPI.prototype.postJSONWithStatus):
(CommonRemoteAPI.prototype.postFormData):
(CommonRemoteAPI.prototype.postFormDataWithStatus):
* public/v3/privileged-api.js:
(PrivilegedAPI.prototype.sendRequest):
* public/v3/remote.js:
(BrowserRemoteAPI.prototype.sendHttpRequest):
(BrowserRemoteAPI.prototype.sendHttpRequestWithFormData):
(BrowserRemoteAPI):
* server-tests/api-uploaded-file.js:
* tools/js/remote.js:
(NodeRemoteAPI.prototype.sendHttpRequest):
(NodeRemoteAPI.prototype.sendHttpRequestWithFormData):
(NodeRemoteAPI):


Canonical link: https://commits.webkit.org/186912@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-22 23:43:32 +00:00
Ryosuke Niwa 8912ebfbd7 ComponentBase should enqueue itself to render when it becomes connected
https://bugs.webkit.org/show_bug.cgi?id=169905

Reviewed by Antti Koivisto.

When a component becomes connected to a document, enqueue itself to render automatically.
Also added the support for boolean attribute to ComponentBase.createElement.

* ReadMe.md: Added an instruction to raise the upload limit per r214065.
* browser-tests/component-base-tests.js: Added tests for the new behavior and createElement. Also moved
the tests related to enqueueToRenderOnResize out of defineElement tests.

* browser-tests/index.html:
(BrowsingContext.prototype.constructor): Override requestAnimationFrame so that the callback would be
involved immediately durign testing.

* public/v3/components/base.js:
(ComponentBase): Enqueue itself to render during construction if custom elements is not available.
(ComponentBase.defineElement):
(ComponentBase.defineElement.elementClass.prototype.connectedCallback): Enqueue itself to render when
the component's element became connected.
(ComponentBase.createElement): Use Array.isArray instead of instanceof to make it work with arrays made
in other realms (global objects) during testing. Added the support for boolean attributes. Setting an
attribute value to true would set the attribute, and setting it to false would not set the attribute.
(ComponentBase.useNativeCustomElements): Added. True iff window.customElements is defined.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.render): No longer need to call enqueueToRender on the commit log viewer.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype.render): No longer need to call enqueueToRender on the spinner icon.

* public/v3/models/time-series.js:
(TimeSeries): Made this a proper class declaration now that we don't include data.js after r213300.

* public/v3/pages/chart-pane.js:
(ChartPane.prototype._renderActionToolbar): No longer need to call enqueueToRender on the close icon.

* public/v3/pages/summary-page.js:
(SummaryPage.prototype._renderCell): No longer need to call enqueueToRender on the spinner icon.


Canonical link: https://commits.webkit.org/186907@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-22 22:50:57 +00:00
David Kilzer be1b9641cb Commit local changes for Bugzilla 5.0.3
* images/favicon.ico: Update favicon from Dec 11, 2015.
* data/params.json: Deleted.

Canonical link: https://commits.webkit.org/186857@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-21 16:54:04 +00:00
David Kilzer fecbec0087 Upgrade to Bugzilla 5.0.3.
Canonical link: https://commits.webkit.org/186856@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-21 16:27:49 +00:00
Manuel Rego Casasnovas 9d061ae95b [Planet WebKit] Use HTTPS instead of HTTP for Igalia blog
Unreviewed patch just updating the Igalia WebKit blog configuration.

* config.ini:

Canonical link: https://commits.webkit.org/186854@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-21 14:34:36 +00:00
Ryosuke Niwa a0df31e2c3 Delete another function that was supposed to be removed in the previous commit.
* public/v3/models/build-request.js:
(BuildRequest.cachedRequestsForTriggerableID): Deleted.

Canonical link: https://commits.webkit.org/186838@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-21 02:15:59 +00:00
Ryosuke Niwa deeaf6997d Modernize BuildRequestQueuePage
https://bugs.webkit.org/show_bug.cgi?id=169903

Reviewed by Antti Koivisto.

Modernized the code for /v3/#/analysis/queue.

* public/v3/models/build-request.js:
(BuildRequest.fetchTriggerables): Deleted since the manifest JSON now contains all the triggerables.

* public/v3/pages/build-request-queue-page.js:
(BuildRequestQueuePage): Deleted this._triggerables. Added this._buildRequestsByTriggerable.
(BuildRequestQueuePage.prototype.open): Modernized the code.
(BuildRequestQueuePage.prototype.render): Ditto.
(BuildRequestQueuePage.prototype._constructBuildRequestTable): Ditto.

Canonical link: https://commits.webkit.org/186837@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-21 02:13:00 +00:00
Ryosuke Niwa 7da9412382 Charts page show an inconsistent list of revisions for Git and Subversion
https://bugs.webkit.org/show_bug.cgi?id=169888

Reviewed by Andreas Kling.

With Git, CommitLogViewer was showing the list of revisions including the starting hash,
which was the last data point's revision instead of all revisions after the last data point.

Fixed the bug by always specifying the revision at the last data point in both Subversion
and Git and then making /api/commits/<repository>/?from=X&to=Y exclude the first revision.
For clarity, "from" and "to" query parameters have been renamed to "precedingRevision" and
"lastRevision" respectively.

We also no longer adds 1 to the starting revision of Subversion-like starting revisions. e.g.
when the last data point was at r1234, new data point is at r1250, the label is now "r1234-r1250"
instead of "r1235-r1250".

* browser-tests/chart-revision-range-tests.js: Fixed the tests since revisionList no longer
specifies from/to revisions.
* browser-tests/commit-log-viewer-tests.js: Added. Added tests for CommitLogViewer.
* browser-tests/index.html: Include the new test. Also use a local copy of mocha.js/css.

* public/api/commits.php:
(main): Renamed "from" and "to" query parameters.

* public/include/commit-log-fetcher.php:
(CommitLogFetcher::fetch_between): Added a check that commit time should either be specified
in both rows or not specified in either. Also reject when before_first_revision is identical
or after last_revision instead of re-ordering them since it no longer makes sense to do so with
new query parameter names.

* public/v3/components/base.js:
(ComponentBase._addContentToElement): Use Array.isArray instead of instanceof. It's resilient
againt realm (global object) differences.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype._updateCommitLogViewer): No longer calls enqueueToRender on this since
CommitLogViewer does that on its own now.
(ChartPaneBase.prototype.render): Juse use this._openRepository instead of relying on CommitLogViewer
to remember which repository is current. This was the only use of currentRepository.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer):
(CommitLogViewer.prototype.currentRepository): Deleted.
(CommitLogViewer.prototype.view):
(CommitLogViewer.prototype._fetchCommitLogs): Modernized and extracted from view to make it lazy.
Call fetchForSingleRevision when precedingRevision is not specified or it's identical to lastRevision
since the generic JSON API no longer supports being called with the identical revisions.
(CommitLogViewer.prototype.render): Modernized & simplified the code.
(CommitLogViewer.prototype._renderCommitList): Extracted from render to make it lazy.
(CommitLogViewer.htmlTemplate): Add ID on caption & tbody so that they're more easily addressable.
(CommitLogViewer.cssTemplate):

* public/v3/models/commit-log.js:
(CommitLog.prototype.diff): No longer includes from/to revisions in the result. Also avoid adding
1 to a Subversion-like starting revision for creating the label. See above. But we still do this
for forming URLs due to the way tools like Trac work with Subversion revisions.
(CommitLog.fetchBetweenRevisions): Rewritten using DataModel.prototype.cachedFetch with FIXME for
what this function is supposed to be doing.
(CommitLog._cachedCommitLogs): Deleted.
(CommitLog.fetchForSingleRevision): Added.
(CommitLog._constructFromRawData): Added.

* public/v3/models/data-model.js:
(DataModelObject.cachedFetch): Don't parse query values as an integer. Just URL-escape them.

* public/v3/remote.js:
(BrowserRemoteAPI.prototype.sendHttpRequest): Fixed a typo.

* server-tests/api-commits-tests.js: Renamed from api-commits.js. Updated the existing tests to
use new query parameters and added more test cases.

* unit-tests/commit-log-tests.js: Updated the test cases now that CommitLog.prototype.diff no longer
includes from/to values. They're computed in ChartRevisionRange instead.

Canonical link: https://commits.webkit.org/186834@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-21 01:19:39 +00:00
Ryosuke Niwa f3c25d7a4d Fix os-build-fetcher.js and subprocess.js to make them work
https://bugs.webkit.org/show_bug.cgi?id=169844

Reviewed by Antti Koivisto.

The script added in r213976 has a bug that it can execute commands to fetch subcommits in parallel.
Some commands to poll the lsit of system components is not desirable to be ran in parallel.

* server-tests/resources/mock-subprocess.js:
(MockSubprocess): Use const declaration.
(MockSubprocess.resetAndWaitForInvocation): Added.
(MockSubprocess.waitForInvocation): Renamed from waitingForInvocation. A function name must be a verb.
See https://webkit.org/code-style-guidelines/#names-verb
(MockSubprocess.reset): Set invocations.length to 0 so that tests can store a reference to the array
regardless of whether reset is called or when it's called.

* server-tests/tools-os-build-fetcher-tests.js: Updated tests per the code change. Most of codes now
expect each command to be ran seprately. e.g. if there were two commands to run, instead of expecting
them to be both ran, and resolving invocation promises, we'd wait for one command to run, resolve,
its subcommand to run, and then move onto the second top-level command. Also use a local reference
to MockSubprocess.invocations instead of using the fully qualified name.

* tools/js/os-build-fetcher.js:
(mapInSerialPromiseChain): Added. Calling a closure that returns a promise on each item in an array
in serial (not asynchronous) is a very common pattern in this class.
(OSBuildFetcher.fetchAndReportAllInOrder): Added.
(OSBuildFetcher.prototype.fetchAndReportNewBuilds): Log what the number of builds being submitted.
(OSBuildFetcher.prototype._fetchAvailableBuilds): Fixed the main bug. Using Promise.all would result
in each top-level command to be execued in parallel. Since each subcommand is executed as soon as
its parent command is executed, this results in commands to be executed in parallel.
Added a whole bunch of logging so that we can at least detect a bug like this in the future.
(OSBuildFetcher.prototype._commitsForAvailableBuilds): Cleanup the coding style.
(OSBuildFetcher.prototype._addSubCommitsForBuild): Use mapInSerialPromiseChain. Tightened the assertion
about the content returned by a subcommand.

* tools/js/subprocess.js: Fixed the bug that we were importing require('child_process').ChildProcess.
execFile is defined on require('child_process') itself.
(Subprocess.prototype.execute): Fixed a typo. this._childProcess doesn't exist.
(Subprocess):

* tools/sync-os-versions.js: Renamed from tools/pull-os-versions.js.
(syncLoop): Cleaned up the coding style a little. Also added logging about how long we're about to sleep.


Canonical link: https://commits.webkit.org/186826@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-20 22:36:40 +00:00
Ryosuke Niwa e51524a82b Add the file uploading capability to the perf dashboard.
https://bugs.webkit.org/show_bug.cgi?id=169737

Reviewed by Chris Dumez.

Added /privileged-api/upload-file to upload a file, and /api/uploaded-file/ to download the file
and retrieve its meta data based on its SHA256. We treat two files with the identical SHA256 as
identical since anyone who can upload a file using this mechanism can execute arbitrary code in
our bots anyway. This is important for avoiding uploading a large darwinup roots multiple times
to the server, saving both user's time/bandwidth and server's disk space.

* config.json: Added uploadDirectory, uploadFileLimitInMB, and uploadUserQuotaInMB as options.
* init-database.sql: Added uploaded_files table.

* public/api/uploaded-file.php: Added.
(main): /api/uploaded-file/N would download uploaded_file with id=N. /api/uploaded-file/?sha256=X
would return the meta data for uploaded_file with sha256=X.
(stream_file_content): Streams the file content in 64KB chunks. We support Range & If-Range HTTP
request headers so that browsers can pause and resume downloading of a large root file.
(parse_range_header): Parses Range HTTP request header.

* public/include/json-header.php:
(remote_user_name): Use the default argument of NULL.

* public/include/manifest-generator.php:
(ManifestGenerator::generate): Include the maximum upload size in the manifest file to let the
frontend code preemptively check the file size before attempting to submit a file.

* public/include/uploaded-file-helpers.php: Added.
(format_uploaded_file):
(uploaded_file_path_for_row):

* public/privileged-api/upload-file-form.html: Added. For debugging purposes.
(fetchCSRFfToken):
(upload):

* public/privileged-api/upload-file.php: Added.
(main):
(query_total_file_size):
(create_uploaded_file_from_form_data):

* public/shared/common-remote.js:
(CommonRemoteAPI.prototype.postFormData): Added.
(CommonRemoteAPI.prototype.postFormDataWithStatus): Added.
(CommonRemoteAPI.prototype.sendHttpRequestWithFormData): Added.
(CommonRemoteAPI.prototype._asJSON): Throw an exception instead of calling a non-existent reject.

* public/v3/models/uploaded-file.js: Added.
(UploadedFile): Added.
(UploadedFile.uploadFile): Added.
(UploadedFile.fetchUnloadedFileWithIdenticalHash): Added. Finds the file with the same SHA256 in
the server to avoid uploading a large custom root multiple times.
(UploadedFile._computeSHA256Hash): Added.

* public/v3/privileged-api.js:
(PrivilegedAPI.prototype.sendRequest): Added the options dictionary as a third argument. For now,
only support useFormData boolean.

* public/v3/remote.js:
(BrowserRemoteAPI.prototype.sendHttpRequestWithFormData): Added.

* server-tests/api-manifest.js: Updated per the inclusion of fileUploadSizeLimit in the manifest.
* server-tests/api-uploaded-file.js: Added.
* server-tests/privileged-api-upload-file-tests.js: Added.

* server-tests/resources/temporary-file.js: Added.
(TemporaryFile): Added. A helper class for creating a temporary file to upload.
(TemporaryFile.makeTemporaryFileOfSizeInMB):
(TemporaryFile.makeTemporaryFile):
(TemporaryFile.inject):

* server-tests/resources/test-server.conf: Set upload_max_filesize and post_max_size for testing.
* server-tests/resources/test-server.js:
(TestServer.prototype.testConfig): Use uploadFileLimitInMB and uploadUserQuotaInMB of 2MB and 5MB.
(TestServer.prototype._ensureDataDirectory): Create a directory to store uploaded files inside
the data directory. In a production server, we can place it outside ServerRoot / DocumentRoot.
(TestServer.prototype.cleanDataDirectory): Delete the aforementioned directory as needed.

* tools/js/database.js:
(tableToPrefixMap): Added uploaded_files.

* tools/js/remote.js:
(NodeRemoteAPI.prototype.sendHttpRequest): Added a dictionary to specify request headers and
a callback to process the response as arguments. Fixed the bug that any 2xx code other than 200
was resulting in a rejected promise. Also include the response headers in the result for tests.
Finally, when content is a function, call that instead of writing the content since FormData
requires a custom logic.
(NodeRemoteAPI.prototype.sendHttpRequestWithFormData): Added.

* tools/js/v3-models.js: Include uploaded-file.js.

* tools/run-tests.py:
(main): Add form-data as a new dependency.


Canonical link: https://commits.webkit.org/186730@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-16 20:53:35 +00:00
Dewei Zhu 7dfa02dcb0 Fix unit test and bug fix for 'pull-os-versions.js' script.
https://bugs.webkit.org/show_bug.cgi?id=169701

Reviewed by Ryosuke Niwa.

Fix unit tests warnings on node-6.10.0.
Fix 'pull-os-versions.js' does not fetch new builds and report.

* server-tests/tools-os-build-fetcher-tests.js:
(then):
(beforeEach):
(afterEach):
* tools/pull-os-versions.js:
(syncLoop):


Canonical link: https://commits.webkit.org/186703@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-16 06:29:02 +00:00
Ryosuke Niwa 608e67eb45 In-browser and node.js implementations of RemoteAPI should share some code
https://bugs.webkit.org/show_bug.cgi?id=169695

Rubber-stamped by Antti Koivisto.

Extracted CommonRemoteAPI out of RemoteAPI implementations for node.js and browser.

* public/shared/common-remote.js: Added.
(CommonRemoteAPI): Added.
(CommonRemoteAPI.prototype.postJSON): Extracted from RemoteAPI.
(CommonRemoteAPI.prototype.postJSONWithStatus): Ditto.
(CommonRemoteAPI.prototype.getJSON): Ditto.
(CommonRemoteAPI.prototype.getJSONWithStatus): Ditto.
(CommonRemoteAPI.prototype.sendHttpRequest): Added. Needs to implemented by a subclass.
(CommonRemoteAPI.prototype._asJSON): Added.
(CommonRemoteAPI.prototype._checkStatus): Added.

* public/v3/index.html: Include common-remote.js.

* public/v3/privileged-api.js:
(PrivilegedAPI): Use class now that we don't include data.js.
(PrivilegedAPI.sendRequest): Modernized the code.
(PrivilegedAPI.requestCSRFToken): Ditto.

* public/v3/remote.js:
(BrowserRemoteAPI): Renamed from RemoteAPI. window.RemoteAPI is now an instance of this class.
(BrowserRemoteAPI.prototype.sendHttpRequest): Moved from RemoteAPI.sendHttpRequest.
(BrowserRemoteAPI.prototype.sendHttpRequest):

* server-tests/privileged-api-create-analysis-task-tests.js: Updated tests since NodeJSRemoteAPI
now throws the JSON status as an error to be consistent with BrowserRemoteAPI.
* server-tests/privileged-api-create-test-group-tests.js: Ditto.
* server-tests/privileged-api-upate-run-status.js: Ditto.

* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.syncOnce): Just use postJSONWithStatus instead of manually
checking the status.

* tools/js/remote.js:
(NodeRemoteAPI): Renamed from RemoteAPI. Still exported as RemoteAPI.
(NodeRemoteAPI.prototype.constructor):
(NodeRemoteAPI.prototype.sendHttpRequest): Modernized the code.


Canonical link: https://commits.webkit.org/186683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-15 21:59:12 +00:00
Ryosuke Niwa e5f9c4228a Fix server tests after r213998 and r213969
https://bugs.webkit.org/show_bug.cgi?id=169690

Reviewed by Antti Koivisto.

Fixed the existing server tests.

* public/v3/models/analysis-task.js:
(AnalysisTask.prototype._updateRemoteState): Use the relative path from the root so that it works inside tests.
(AnalysisTask.prototype.associateBug): Ditto.
(AnalysisTask.prototype.dissociateBug): Ditto.
(AnalysisTask.prototype.associateCommit): Ditto.
(AnalysisTask.prototype.dissociateCommit): Ditto.
(AnalysisTask._fetchSubset): Ditto.
(AnalysisTask.fetchAll): Ditto.
* public/v3/models/test-group.js:
(TestGroup.prototype.updateName): Ditto.
(TestGroup.prototype.updateHiddenFlag): Ditto.
(TestGroup.createAndRefetchTestGroups): Ditto.
(TestGroup.cachedFetch): Ditto.
* server-tests/api-manifest.js: Reverted an inadvertant change in r213969.
* tools/js/database.js:
(tableToPrefixMap): Added analysis_strategies.
* unit-tests/analysis-task-tests.js: Updated expectations per changes to AnalysisTask.


Canonical link: https://commits.webkit.org/186675@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-15 19:34:00 +00:00
Ryosuke Niwa 834bae10aa Add tests for privileged-api/create-analysis-task and privileged-api/create-test-group
https://bugs.webkit.org/show_bug.cgi?id=169688

Rubber-stamped by Antti Koivisto.

Added tests for privileged-api/create-analysis-task and privileged-api/create-test-group, and fixed newly found bugs.

* public/privileged-api/create-analysis-task.php:
(main): Fixed the bug that we were not explicitly checking whether start_run and end_run were integers or not.
Also return InvalidTimeRange when start and end times are identical as that makes no sense for an analysis task.

* public/privileged-api/create-test-group.php:
(main): Fixed a bug that we were not explicitly checking task and repetitionCount to be an integer.
(ensure_commit_sets): Fixed the bug that the number of commit sets weren't checked.

* server-tests/privileged-api-create-analysis-task-tests.js: Added.
* server-tests/privileged-api-create-test-group-tests.js: Added.

* server-tests/resources/common-operations.js:
(prepareServerTest): Increase the timeout from 1s to 5s.

* server-tests/resources/mock-data.js:
(MockData.addMockData): Use a higher database ID of 20 for a mock build_slave to avoid a conflict with auto-generated IDs.


Canonical link: https://commits.webkit.org/186673@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-15 19:15:02 +00:00
Ryosuke Niwa 3358386933 Make unit tests return a promise instead of manually calling done
https://bugs.webkit.org/show_bug.cgi?id=169663

Reviewed by Antti Koivisto.

Make the existing unit tests always reutrn a promise instead of manually calling "done" callback as done
in r213969. The promise tests are a lot more stable and less error prone.

Also use MockRemoteAPI.waitForRequest() instead of chaining two resolved promises where appropriate.

* unit-tests/analysis-task-tests.js:
* unit-tests/buildbot-syncer-tests.js:
* unit-tests/checkconfig.js:
* unit-tests/privileged-api-tests.js:


Canonical link: https://commits.webkit.org/186668@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-15 18:15:33 +00:00
Dewei Zhu d94d62b902 Rewrite 'pull-os-versions' script in Javascript to add support for reporting os revisions with sub commits.
https://bugs.webkit.org/show_bug.cgi?id=169542

Reviewed by Ryosuke Niwa.

Extend '/api/commits/<repository>/last-reported' to accept a range and return last reported commits in given range.
Rewrite 'pull-os-versions' in JavaScript and add unit tests for it.
Instead of writing query manually while searching criteria contains null columns, use the methods provided in 'db.php'.
Add '.gitignore' file to ommit files generated by while running tests/instances locally.

* .gitignore: Added.
* public/api/commits.php:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/include/db.php: 'null_columns' of prepare_params should be a reference.
* public/include/report-processor.php:
* server-tests/api-commits.js:
(then):
* server-tests/api-report-commits-tests.js:
* server-tests/resources/mock-logger.js: Added.
(MockLogger):
(MockLogger.prototype.log):
(MockLogger.prototype.error):
* server-tests/resources/mock-subprocess.js: Added.
(MockSubprocess.call):
(MockSubprocess.waitingForInvocation):
(MockSubprocess.inject):
(MockSubprocess.reset):
* server-tests/tools-buildbot-triggerable-tests.js:
(MockLogger): Deleted.
(MockLogger.prototype.log): Deleted.
(MockLogger.prototype.error): Deleted.
* server-tests/tools-os-build-fetcher-tests.js: Added.
(beforeEach):
(return.waitingForInvocationPromise.then):
(then):
(string_appeared_here.return.waitingForInvocationPromise.then):
(return.addSlaveForReport.emptyReport.then):
* tools/js/os-build-fetcher.js: Added.
(OSBuildFetcher):
(OSBuildFetcher.prototype._fetchAvailableBuilds):
(OSBuildFetcher.prototype._computeOrder):
(OSBuildFetcher.prototype._commitsForAvailableBuilds.return.this._subprocess.call.then.):
(OSBuildFetcher.prototype._commitsForAvailableBuilds):
(OSBuildFetcher.prototype._addSubCommitsForBuild):
(OSBuildFetcher.prototype._submitCommits):
(OSBuildFetcher.prototype.fetchAndReportNewBuilds):
* tools/js/subprocess.js: Added.
(const.childProcess.require.string_appeared_here.Subprocess.prototype.call):
(const.childProcess.require.string_appeared_here.Subprocess):
* tools/pull-os-versions.js: Added.
(main):
(syncLoop):
* tools/sync-commits.py:
(Repository.fetch_commits_and_submit):


Canonical link: https://commits.webkit.org/186651@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-15 08:35:07 +00:00
Ryosuke Niwa ce44d63675 Make server tests return a promise instead of manually calling done
https://bugs.webkit.org/show_bug.cgi?id=169648

Rubber-stamped by Chris Dumez.

Make the existing server tests always reutrn a promise instead of manually calling "done" callback.
The promise tests are a lot more stable and less error prone.

Also use arrow functions everywhere and use prepareServerTest, renamed from connectToDatabaseInEveryTest,
in more tests instead of manually connecting to database in every test, and reset v3 models.

* server-tests/admin-platforms-tests.js:
* server-tests/admin-reprocess-report-tests.js:
* server-tests/api-build-requests-tests.js:
* server-tests/api-manifest.js:
* server-tests/api-measurement-set-tests.js:
(.postReports): Deleted. Not used in any test.
* server-tests/api-report-commits-tests.js:
* server-tests/api-report-tests.js:
* server-tests/api-update-triggerable.js:
* server-tests/privileged-api-upate-run-status.js:
* server-tests/resources/common-operations.js:
(prepareServerTest): Renamed from connectToDatabaseInEveryTest. Increase the timeout and reset v3 models.
* server-tests/tools-buildbot-triggerable-tests.js:


Canonical link: https://commits.webkit.org/186644@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-15 03:19:02 +00:00
Ryosuke Niwa 174649807a Rename RootSet to CommitSet
https://bugs.webkit.org/show_bug.cgi?id=169580

Rubber-stamped by Chris Dumez.

Renamed root_sets to commit_sets and roots to commit_set_relationships in the database schema, and renamed
related classes in public/v3/ and tools accordingly.

RootSet, MeasurementRootSet, and CustomRootSet are respectively renamed to CommitSet, MeasurementCommitSet,
and CustomCommitSet.

In order to migrate the database, run:
```
BEGIN;
ALTER TABLE root_sets RENAME TO commit_sets;
ALTER TABLE commit_sets RENAME COLUMN rootset_id TO commitset_id;
ALTER TABLE roots RENAME TO commit_set_relationships;
ALTER TABLE commit_set_relationships RENAME COLUMN root_set TO commitset_set;
ALTER TABLE commit_set_relationships RENAME COLUMN root_commit TO commitset_commit;
ALTER TABLE build_requests RENAME COLUMN request_root_set TO request_commit_set;
END;
```

* browser-tests/index.html:
* init-database.sql:
* public/api/build-requests.php:
(main):
* public/api/test-groups.php:
(main):
(format_test_group):
* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::__construct):
(BuildRequestsFetcher::results_internal):
(BuildRequestsFetcher::commit_sets): Renamed from root_sets.
(BuildRequestsFetcher::commits): Renamed from roots.
(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Renamed from fetch_roots_for_set_if_needed.
* public/privileged-api/create-test-group.php:
(main):
(ensure_commit_sets): Renamed from commit_sets_from_root_sets.
* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype.buildRowGroups):
(AnalysisResultsViewer.prototype._collectCommitSetsInTestGroups): Renamed from _collectRootSetsInTestGroups.
(AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
(AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
(AnalysisResultsViewer.CommitSetInTestGroup): Renamed from RootSetInTestGroup.
(AnalysisResultsViewer.CommitSetInTestGroup.prototype.constructor):
(AnalysisResultsViewer.CommitSetInTestGroup.prototype.commitSet): Renamed from rootSet.
(AnalysisResultsViewer.CommitSetInTestGroup.prototype.succeedingCommitSet): Renamed from succeedingRootSet.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.constructor):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.isComplete):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.startRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.endRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
* public/v3/components/chart-revision-range.js:
(ChartRevisionRange.prototype._revisionForPoint):
(ChartRevisionRange.prototype._computeRevisionList):
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype.constructor):
(CustomizableTestGroupForm.prototype.setCommitSetMap): Renamed from setRootSetMap.
(CustomizableTestGroupForm.prototype._submitted):
(CustomizableTestGroupForm.prototype._computeCommitSetMap): Renamed from _computeRootSetMap.
(CustomizableTestGroupForm.prototype.render): Renamed from render.
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
* public/v3/components/results-table.js:
(ResultsTable.prototype.render):
(ResultsTable.prototype._createRevisionListCells):
(ResultsTable.prototype._computeRepositoryList):
(ResultsTableRow.prototype.constructor):
(ResultsTableRow.prototype.commitSet): Renamed from rootSet.
* public/v3/components/test-group-results-table.js:
(TestGroupResultsTable.prototype.buildRowGroups):
* public/v3/index.html:
* public/v3/models/build-request.js:
(BuildRequest.prototype.constructor):
(BuildRequest.prototype.updateSingleton):
(BuildRequest.prototype.commitSet): Renamed from rootSet.
(BuildRequest.constructBuildRequestsFromData):
* public/v3/models/commit-set.js: Renamed from public/v3/models/root-set.js.
(CommitSet): Renamed from RootSet.
(CommitSet.containsMultipleCommitsForRepository):
(MeasurementCommitSet): Renamed from MeasurementRootSet.
(MeasurementCommitSet.prototype.namedStaticMap):
(MeasurementCommitSet.prototype.ensureNamedStaticMap):
(MeasurementCommitSet.namedStaticMap):
(MeasurementCommitSet.ensureNamedStaticMap):
(MeasurementCommitSet.ensureSingleton):
(CustomCommitSet): Renamed from CustomRootSet.
* public/v3/models/measurement-adaptor.js:
(MeasurementAdaptor.prototype.applyTo):
* public/v3/models/test-group.js:
(TestGroup.prototype.constructor):
(TestGroup.prototype.addBuildRequest):
(TestGroup.prototype.repetitionCount):
(TestGroup.prototype.requestedCommitSets): Renamed from requestedRootSets.
(TestGroup.prototype.requestsForCommitSet): Renamed from requestsForRootSet.
(TestGroup.prototype.labelForCommitSet): Renamed from labelForRootSet.
(TestGroup.prototype.didSetResult):
(TestGroup.prototype.compareTestResults):
(TestGroup.prototype._valuesForCommitSet): Renamed from _valuesForRootSet.
(TestGroup.prototype.createAndRefetchTestGroups):
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._retryCurrentTestGroup):
(AnalysisTaskPage.prototype._createNewTestGroupFromChart):
(AnalysisTaskPage.prototype._createNewTestGroupFromViewer):
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList):
* server-tests/api-build-requests-tests.js:
* server-tests/resources/mock-data.js:
(MockData.resetV3Models):
(MockData.addMockData):
(MockData.addAnotherMockTestGroup):
* tools/detect-changes.js:
(createAnalysisTaskAndNotify):
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
(BuildbotSyncer.prototype._revisionSetFromCommitSetWithExclusionList):
* tools/js/database.js:
(tableToPrefixMap):
* tools/js/v3-models.js:
* tools/sync-buildbot.js:
(syncLoop):
* tools/sync-with-buildbot.py: Deleted. No longer used.
* unit-tests/analysis-task-tests.js:
* unit-tests/build-request-tests.js:
(sampleBuildRequestData):
* unit-tests/buildbot-syncer-tests.js:
(sampleCommitSetData):
* unit-tests/measurement-adaptor-tests.js:
* unit-tests/measurement-set-tests.js:
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject):
* unit-tests/test-groups-tests.js:
(sampleTestGroup):


Canonical link: https://commits.webkit.org/186635@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-14 23:06:40 +00:00
Ryosuke Niwa b898d27e1b Database's query functions should support querying for a row with NULL value
https://bugs.webkit.org/show_bug.cgi?id=169504

Reviewed by Antti Koivisto.

Add the support for calling select_* with one of column values set to NULL.
This feature is useful in webkit.org/b/146374 and webkit.org/b/168962.

* public/include/db.php:
(Database::prepare_params): Added $null_columns as an optional argument.
(Database::select_conditions_with_null_columns): Added. Builds up a query string by appending AND x is NULL
to match columns whose value must be NULL.
(Database::_select_update_or_insert_row):
(Database::select_rows):


Canonical link: https://commits.webkit.org/186567@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-13 21:44:32 +00:00
Dewei Zhu 849ae629e1 Add the ability to report a commit with sub-commits.
https://bugs.webkit.org/show_bug.cgi?id=168962

Reviewed by Ryosuke Niwa.

Introduce 'commit_ownerships' which records ownership between commits.
On existing production server, run ```
    CREATE TABLE commit_ownerships (
        commit_owner integer NOT NULL REFERENCES commits ON DELETE CASCADE,
        commit_ownee integer NOT NULL REFERENCES commits ON DELETE CASCADE,
        PRIMARY KEY (commit_owner, commit_ownee)
    );
    ALTER TABLE repositories RENAME repository_parent TO repository_owner;
    ALTER TABLE repositories DROP repository_name_must_be_unique;
    CREATE UNIQUE INDEX repository_name_owner_unique_index ON repositories (repository_owner, repository_name) WHERE repository_owner IS NOT NULL;
    CREATE UNIQUE INDEX repository_name_unique_index ON repositories (repository_name) WHERE repository_owner IS NULL;
``` to update database.
Add unit-tests to cover this change.

* init-database.sql:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/include/db.php:
* public/include/manifest-generator.php:
* public/include/report-processor.php:
* public/v3/models/repository.js:
(Repository):
(Repository.prototype.owner):
* server-tests/admin-reprocess-report-tests.js:
(addBuilderForReport.simpleReportWithRevisions.0.then):
(then):
* server-tests/api-manifest.js:
(then):
* server-tests/api-report-commits-tests.js:
(addSlaveForReport.sameRepositoryNameInSubCommitAndMajorCommit.then):
(then):
(addSlaveForReport.systemVersionCommitWithSubcommits.then):
(addSlaveForReport.multipleSystemVersionCommitsWithSubcommits.then):
(addSlaveForReport.systemVersionCommitWithEmptySubcommits.then):
(addSlaveForReport.systemVersionCommitAndSubcommitWithTimestamp.then):
* tools/js/database.js:


Canonical link: https://commits.webkit.org/186535@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-13 09:10:29 +00:00
Jonathan Davis 79deaf36aa Add Swift syntax highlighting to webkit.org
https://bugs.webkit.org/show_bug.cgi?id=163672

Reviewed by Matt Baker.

* wp-content/plugins/hyperlight/hyperlight/languages/swift.php: Added.


Canonical link: https://commits.webkit.org/186508@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-11 19:59:30 +00:00
Jonathan Davis bf163e5dbe Switch back to the Twitter API for the Tweet widget
https://bugs.webkit.org/show_bug.cgi?id=168749

Reviewed by Lucas Forschler.

Updates the Twitter widget tile implementation to prefer the Twitter API to populate tweets
displayed through the widget. If the API fails for any reason, it falls back to using the
Tweet listener for updated tweets.

The Twitter API provides the benefit of embedding media and being able to display the full
URLs rather than Twitter-shortened URLs.

* wp-content/plugins/tweet-listener.php:
* wp-content/themes/webkit/style.css:
(.twitter-tile .tile-content):
(.twitter-tile.text-only):
(.twitter-tile .media):
(.twitter-tile img):
* wp-content/themes/webkit/widgets/twitter.php:


Canonical link: https://commits.webkit.org/186492@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-11 01:01:19 +00:00
Filip Pizlo 662de29537 B3 should have comprehensive support for atomic operations
https://bugs.webkit.org/show_bug.cgi?id=162349

Reviewed by Keith Miller.

Source/JavaScriptCore:

This adds the following capabilities to B3:

- Atomic weak/strong unfenced/fenced compare-and-swap
- Atomic add/sub/or/and/xor/xchg
- Acquire/release fencing on loads/stores
- Fenceless load-load dependencies

This adds lowering to the following instructions on x86:

- lock cmpxchg
- lock xadd
- lock add/sub/or/and/xor/xchg

This adds lowering to the following instructions on ARM64:

- ldar and friends
- stlr and friends
- ldxr and friends (unfenced LL)
- stxr and friends (unfended SC)
- ldaxr and friends (fenced LL)
- stlxr and friends (fenced SC)
- eor as a fenceless load-load dependency

This does instruction selection pattern matching to ensure that weak/strong CAS and all of the
variants of fences and atomic math ops get lowered to the best possible instruction sequence.
For example, we support the Equal(AtomicStrongCAS(expected, ...), expected) pattern and a bunch
of its friends. You can say Branch(Equal(AtomicStrongCAS(expected, ...), expected)) and it will
generate the best possible branch sequence on x86 and ARM64.

B3 now knows how to model all of the kinds of fencing. It knows that acq loads are ordered with
respect to each other and with respect to rel stores, creating sequential consistency that
transcends just the acq/rel fences themselves (see Effects::fence). It knows that the phantom
fence effects may only target some abstract heaps but not others, so that load elimination and
store sinking can still operate across fences if you just tell B3 that the fence does not alias
those accesses. This makes it super easy to teach B3 that some of your heap is thread-local.
Even better, it lets you express fine-grained dependencies where the atomics that affect one
property in shared memory do not clobber non-atomics that ffect some other property in shared
memory.

One of my favorite features is Depend, which allows you to express load-load dependencies. On
x86 it lowers to nothing, while on ARM64 it lowers to eor.

This also exposes a common atomicWeakCAS API to the x86_64/ARM64 MacroAssemblers. Same for
acq/rel. JSC's 64-bit JITs are now a happy concurrency playground.

This doesn't yet expose the functionality to JS or wasm. SAB still uses the non-intrinsic
implementations of the Atomics object, for now.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::ldar):
(JSC::ARM64Assembler::ldxr):
(JSC::ARM64Assembler::ldaxr):
(JSC::ARM64Assembler::stxr):
(JSC::ARM64Assembler::stlr):
(JSC::ARM64Assembler::stlxr):
(JSC::ARM64Assembler::excepnGenerationImmMask):
(JSC::ARM64Assembler::exoticLoad):
(JSC::ARM64Assembler::storeRelease):
(JSC::ARM64Assembler::exoticStore):
* assembler/AbstractMacroAssembler.cpp: Added.
(WTF::printInternal):
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssemblerBase::invert):
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::loadAcq8SignedExtendTo32):
(JSC::MacroAssemblerARM64::loadAcq8):
(JSC::MacroAssemblerARM64::storeRel8):
(JSC::MacroAssemblerARM64::loadAcq16SignedExtendTo32):
(JSC::MacroAssemblerARM64::loadAcq16):
(JSC::MacroAssemblerARM64::storeRel16):
(JSC::MacroAssemblerARM64::loadAcq32):
(JSC::MacroAssemblerARM64::loadAcq64):
(JSC::MacroAssemblerARM64::storeRel32):
(JSC::MacroAssemblerARM64::storeRel64):
(JSC::MacroAssemblerARM64::loadLink8):
(JSC::MacroAssemblerARM64::loadLinkAcq8):
(JSC::MacroAssemblerARM64::storeCond8):
(JSC::MacroAssemblerARM64::storeCondRel8):
(JSC::MacroAssemblerARM64::loadLink16):
(JSC::MacroAssemblerARM64::loadLinkAcq16):
(JSC::MacroAssemblerARM64::storeCond16):
(JSC::MacroAssemblerARM64::storeCondRel16):
(JSC::MacroAssemblerARM64::loadLink32):
(JSC::MacroAssemblerARM64::loadLinkAcq32):
(JSC::MacroAssemblerARM64::storeCond32):
(JSC::MacroAssemblerARM64::storeCondRel32):
(JSC::MacroAssemblerARM64::loadLink64):
(JSC::MacroAssemblerARM64::loadLinkAcq64):
(JSC::MacroAssemblerARM64::storeCond64):
(JSC::MacroAssemblerARM64::storeCondRel64):
(JSC::MacroAssemblerARM64::atomicStrongCAS8):
(JSC::MacroAssemblerARM64::atomicStrongCAS16):
(JSC::MacroAssemblerARM64::atomicStrongCAS32):
(JSC::MacroAssemblerARM64::atomicStrongCAS64):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS8):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS16):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS32):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS64):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS8):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS16):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS32):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS64):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS8):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS16):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS32):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS64):
(JSC::MacroAssemblerARM64::depend32):
(JSC::MacroAssemblerARM64::depend64):
(JSC::MacroAssemblerARM64::loadLink):
(JSC::MacroAssemblerARM64::loadLinkAcq):
(JSC::MacroAssemblerARM64::storeCond):
(JSC::MacroAssemblerARM64::storeCondRel):
(JSC::MacroAssemblerARM64::signExtend):
(JSC::MacroAssemblerARM64::branch):
(JSC::MacroAssemblerARM64::atomicStrongCAS):
(JSC::MacroAssemblerARM64::atomicRelaxedStrongCAS):
(JSC::MacroAssemblerARM64::branchAtomicWeakCAS):
(JSC::MacroAssemblerARM64::branchAtomicRelaxedWeakCAS):
(JSC::MacroAssemblerARM64::extractSimpleAddress):
(JSC::MacroAssemblerARM64::signExtend<8>):
(JSC::MacroAssemblerARM64::signExtend<16>):
(JSC::MacroAssemblerARM64::branch<64>):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::add32):
(JSC::MacroAssemblerX86Common::and32):
(JSC::MacroAssemblerX86Common::and16):
(JSC::MacroAssemblerX86Common::and8):
(JSC::MacroAssemblerX86Common::neg32):
(JSC::MacroAssemblerX86Common::neg16):
(JSC::MacroAssemblerX86Common::neg8):
(JSC::MacroAssemblerX86Common::or32):
(JSC::MacroAssemblerX86Common::or16):
(JSC::MacroAssemblerX86Common::or8):
(JSC::MacroAssemblerX86Common::sub16):
(JSC::MacroAssemblerX86Common::sub8):
(JSC::MacroAssemblerX86Common::sub32):
(JSC::MacroAssemblerX86Common::xor32):
(JSC::MacroAssemblerX86Common::xor16):
(JSC::MacroAssemblerX86Common::xor8):
(JSC::MacroAssemblerX86Common::not32):
(JSC::MacroAssemblerX86Common::not16):
(JSC::MacroAssemblerX86Common::not8):
(JSC::MacroAssemblerX86Common::store16):
(JSC::MacroAssemblerX86Common::atomicStrongCAS8):
(JSC::MacroAssemblerX86Common::atomicStrongCAS16):
(JSC::MacroAssemblerX86Common::atomicStrongCAS32):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS8):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS16):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS32):
(JSC::MacroAssemblerX86Common::atomicWeakCAS8):
(JSC::MacroAssemblerX86Common::atomicWeakCAS16):
(JSC::MacroAssemblerX86Common::atomicWeakCAS32):
(JSC::MacroAssemblerX86Common::branchAtomicWeakCAS8):
(JSC::MacroAssemblerX86Common::branchAtomicWeakCAS16):
(JSC::MacroAssemblerX86Common::branchAtomicWeakCAS32):
(JSC::MacroAssemblerX86Common::atomicRelaxedWeakCAS8):
(JSC::MacroAssemblerX86Common::atomicRelaxedWeakCAS16):
(JSC::MacroAssemblerX86Common::atomicRelaxedWeakCAS32):
(JSC::MacroAssemblerX86Common::branchAtomicRelaxedWeakCAS8):
(JSC::MacroAssemblerX86Common::branchAtomicRelaxedWeakCAS16):
(JSC::MacroAssemblerX86Common::branchAtomicRelaxedWeakCAS32):
(JSC::MacroAssemblerX86Common::atomicAdd8):
(JSC::MacroAssemblerX86Common::atomicAdd16):
(JSC::MacroAssemblerX86Common::atomicAdd32):
(JSC::MacroAssemblerX86Common::atomicSub8):
(JSC::MacroAssemblerX86Common::atomicSub16):
(JSC::MacroAssemblerX86Common::atomicSub32):
(JSC::MacroAssemblerX86Common::atomicAnd8):
(JSC::MacroAssemblerX86Common::atomicAnd16):
(JSC::MacroAssemblerX86Common::atomicAnd32):
(JSC::MacroAssemblerX86Common::atomicOr8):
(JSC::MacroAssemblerX86Common::atomicOr16):
(JSC::MacroAssemblerX86Common::atomicOr32):
(JSC::MacroAssemblerX86Common::atomicXor8):
(JSC::MacroAssemblerX86Common::atomicXor16):
(JSC::MacroAssemblerX86Common::atomicXor32):
(JSC::MacroAssemblerX86Common::atomicNeg8):
(JSC::MacroAssemblerX86Common::atomicNeg16):
(JSC::MacroAssemblerX86Common::atomicNeg32):
(JSC::MacroAssemblerX86Common::atomicNot8):
(JSC::MacroAssemblerX86Common::atomicNot16):
(JSC::MacroAssemblerX86Common::atomicNot32):
(JSC::MacroAssemblerX86Common::atomicXchgAdd8):
(JSC::MacroAssemblerX86Common::atomicXchgAdd16):
(JSC::MacroAssemblerX86Common::atomicXchgAdd32):
(JSC::MacroAssemblerX86Common::atomicXchg8):
(JSC::MacroAssemblerX86Common::atomicXchg16):
(JSC::MacroAssemblerX86Common::atomicXchg32):
(JSC::MacroAssemblerX86Common::loadAcq8):
(JSC::MacroAssemblerX86Common::loadAcq8SignedExtendTo32):
(JSC::MacroAssemblerX86Common::loadAcq16):
(JSC::MacroAssemblerX86Common::loadAcq16SignedExtendTo32):
(JSC::MacroAssemblerX86Common::loadAcq32):
(JSC::MacroAssemblerX86Common::storeRel8):
(JSC::MacroAssemblerX86Common::storeRel16):
(JSC::MacroAssemblerX86Common::storeRel32):
(JSC::MacroAssemblerX86Common::storeFence):
(JSC::MacroAssemblerX86Common::loadFence):
(JSC::MacroAssemblerX86Common::replaceWithJump):
(JSC::MacroAssemblerX86Common::maxJumpReplacementSize):
(JSC::MacroAssemblerX86Common::patchableJumpSize):
(JSC::MacroAssemblerX86Common::supportsFloatingPointRounding):
(JSC::MacroAssemblerX86Common::supportsAVX):
(JSC::MacroAssemblerX86Common::updateEax1EcxFlags):
(JSC::MacroAssemblerX86Common::x86Condition):
(JSC::MacroAssemblerX86Common::atomicStrongCAS):
(JSC::MacroAssemblerX86Common::branchAtomicStrongCAS):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::add64):
(JSC::MacroAssemblerX86_64::and64):
(JSC::MacroAssemblerX86_64::neg64):
(JSC::MacroAssemblerX86_64::or64):
(JSC::MacroAssemblerX86_64::sub64):
(JSC::MacroAssemblerX86_64::xor64):
(JSC::MacroAssemblerX86_64::not64):
(JSC::MacroAssemblerX86_64::store64):
(JSC::MacroAssemblerX86_64::atomicStrongCAS64):
(JSC::MacroAssemblerX86_64::branchAtomicStrongCAS64):
(JSC::MacroAssemblerX86_64::atomicWeakCAS64):
(JSC::MacroAssemblerX86_64::branchAtomicWeakCAS64):
(JSC::MacroAssemblerX86_64::atomicRelaxedWeakCAS64):
(JSC::MacroAssemblerX86_64::branchAtomicRelaxedWeakCAS64):
(JSC::MacroAssemblerX86_64::atomicAdd64):
(JSC::MacroAssemblerX86_64::atomicSub64):
(JSC::MacroAssemblerX86_64::atomicAnd64):
(JSC::MacroAssemblerX86_64::atomicOr64):
(JSC::MacroAssemblerX86_64::atomicXor64):
(JSC::MacroAssemblerX86_64::atomicNeg64):
(JSC::MacroAssemblerX86_64::atomicNot64):
(JSC::MacroAssemblerX86_64::atomicXchgAdd64):
(JSC::MacroAssemblerX86_64::atomicXchg64):
(JSC::MacroAssemblerX86_64::loadAcq64):
(JSC::MacroAssemblerX86_64::storeRel64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::addl_mr):
(JSC::X86Assembler::addq_mr):
(JSC::X86Assembler::addq_rm):
(JSC::X86Assembler::addq_im):
(JSC::X86Assembler::andl_mr):
(JSC::X86Assembler::andl_rm):
(JSC::X86Assembler::andw_rm):
(JSC::X86Assembler::andb_rm):
(JSC::X86Assembler::andl_im):
(JSC::X86Assembler::andw_im):
(JSC::X86Assembler::andb_im):
(JSC::X86Assembler::andq_mr):
(JSC::X86Assembler::andq_rm):
(JSC::X86Assembler::andq_im):
(JSC::X86Assembler::incq_m):
(JSC::X86Assembler::negq_m):
(JSC::X86Assembler::negl_m):
(JSC::X86Assembler::negw_m):
(JSC::X86Assembler::negb_m):
(JSC::X86Assembler::notl_m):
(JSC::X86Assembler::notw_m):
(JSC::X86Assembler::notb_m):
(JSC::X86Assembler::notq_m):
(JSC::X86Assembler::orl_mr):
(JSC::X86Assembler::orl_rm):
(JSC::X86Assembler::orw_rm):
(JSC::X86Assembler::orb_rm):
(JSC::X86Assembler::orl_im):
(JSC::X86Assembler::orw_im):
(JSC::X86Assembler::orb_im):
(JSC::X86Assembler::orq_mr):
(JSC::X86Assembler::orq_rm):
(JSC::X86Assembler::orq_im):
(JSC::X86Assembler::subl_mr):
(JSC::X86Assembler::subl_rm):
(JSC::X86Assembler::subw_rm):
(JSC::X86Assembler::subb_rm):
(JSC::X86Assembler::subl_im):
(JSC::X86Assembler::subw_im):
(JSC::X86Assembler::subb_im):
(JSC::X86Assembler::subq_mr):
(JSC::X86Assembler::subq_rm):
(JSC::X86Assembler::subq_im):
(JSC::X86Assembler::xorl_mr):
(JSC::X86Assembler::xorl_rm):
(JSC::X86Assembler::xorl_im):
(JSC::X86Assembler::xorw_rm):
(JSC::X86Assembler::xorw_im):
(JSC::X86Assembler::xorb_rm):
(JSC::X86Assembler::xorb_im):
(JSC::X86Assembler::xorq_im):
(JSC::X86Assembler::xorq_rm):
(JSC::X86Assembler::xorq_mr):
(JSC::X86Assembler::xchgb_rm):
(JSC::X86Assembler::xchgw_rm):
(JSC::X86Assembler::xchgl_rm):
(JSC::X86Assembler::xchgq_rm):
(JSC::X86Assembler::movw_im):
(JSC::X86Assembler::movq_i32m):
(JSC::X86Assembler::cmpxchgb_rm):
(JSC::X86Assembler::cmpxchgw_rm):
(JSC::X86Assembler::cmpxchgl_rm):
(JSC::X86Assembler::cmpxchgq_rm):
(JSC::X86Assembler::xaddb_rm):
(JSC::X86Assembler::xaddw_rm):
(JSC::X86Assembler::xaddl_rm):
(JSC::X86Assembler::xaddq_rm):
(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):
* b3/B3AtomicValue.cpp: Added.
(JSC::B3::AtomicValue::~AtomicValue):
(JSC::B3::AtomicValue::dumpMeta):
(JSC::B3::AtomicValue::cloneImpl):
(JSC::B3::AtomicValue::AtomicValue):
* b3/B3AtomicValue.h: Added.
* b3/B3BasicBlock.h:
* b3/B3BlockInsertionSet.cpp:
(JSC::B3::BlockInsertionSet::BlockInsertionSet):
(JSC::B3::BlockInsertionSet::insert): Deleted.
(JSC::B3::BlockInsertionSet::insertBefore): Deleted.
(JSC::B3::BlockInsertionSet::insertAfter): Deleted.
(JSC::B3::BlockInsertionSet::execute): Deleted.
* b3/B3BlockInsertionSet.h:
* b3/B3Effects.cpp:
(JSC::B3::Effects::interferes):
(JSC::B3::Effects::operator==):
(JSC::B3::Effects::dump):
* b3/B3Effects.h:
(JSC::B3::Effects::forCall):
(JSC::B3::Effects::mustExecute):
* b3/B3EliminateCommonSubexpressions.cpp:
* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3GenericBlockInsertionSet.h: Added.
(JSC::B3::GenericBlockInsertionSet::GenericBlockInsertionSet):
(JSC::B3::GenericBlockInsertionSet::insert):
(JSC::B3::GenericBlockInsertionSet::insertBefore):
(JSC::B3::GenericBlockInsertionSet::insertAfter):
(JSC::B3::GenericBlockInsertionSet::execute):
* b3/B3HeapRange.h:
(JSC::B3::HeapRange::operator|):
* b3/B3InsertionSet.cpp:
(JSC::B3::InsertionSet::insertClone):
* b3/B3InsertionSet.h:
* b3/B3LegalizeMemoryOffsets.cpp:
* b3/B3LowerMacros.cpp:
(JSC::B3::lowerMacros):
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::loadPromiseAnyOpcode):
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::storeOpcode):
(JSC::B3::Air::LowerToAir::createStore):
(JSC::B3::Air::LowerToAir::finishAppendingInstructions):
(JSC::B3::Air::LowerToAir::newBlock):
(JSC::B3::Air::LowerToAir::splitBlock):
(JSC::B3::Air::LowerToAir::fillStackmap):
(JSC::B3::Air::LowerToAir::appendX86Div):
(JSC::B3::Air::LowerToAir::appendX86UDiv):
(JSC::B3::Air::LowerToAir::loadLinkOpcode):
(JSC::B3::Air::LowerToAir::storeCondOpcode):
(JSC::B3::Air::LowerToAir::appendCAS):
(JSC::B3::Air::LowerToAir::appendVoidAtomic):
(JSC::B3::Air::LowerToAir::appendGeneralAtomic):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::lowerX86Div): Deleted.
(JSC::B3::Air::LowerToAir::lowerX86UDiv): Deleted.
* b3/B3LowerToAir.h:
* b3/B3MemoryValue.cpp:
(JSC::B3::MemoryValue::isLegalOffset):
(JSC::B3::MemoryValue::accessType):
(JSC::B3::MemoryValue::accessBank):
(JSC::B3::MemoryValue::accessByteSize):
(JSC::B3::MemoryValue::dumpMeta):
(JSC::B3::MemoryValue::MemoryValue):
(JSC::B3::MemoryValue::accessWidth): Deleted.
* b3/B3MemoryValue.h:
* b3/B3MemoryValueInlines.h: Added.
(JSC::B3::MemoryValue::isLegalOffset):
(JSC::B3::MemoryValue::requiresSimpleAddr):
(JSC::B3::MemoryValue::accessWidth):
* b3/B3MoveConstants.cpp:
* b3/B3NativeTraits.h: Added.
* b3/B3Opcode.cpp:
(JSC::B3::storeOpcode):
(WTF::printInternal):
* b3/B3Opcode.h:
(JSC::B3::isLoad):
(JSC::B3::isStore):
(JSC::B3::isLoadStore):
(JSC::B3::isAtomic):
(JSC::B3::isAtomicCAS):
(JSC::B3::isAtomicXchg):
(JSC::B3::isMemoryAccess):
(JSC::B3::signExtendOpcode):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::dump):
* b3/B3Procedure.h:
(JSC::B3::Procedure::hasQuirks):
(JSC::B3::Procedure::setHasQuirks):
* b3/B3PureCSE.cpp:
(JSC::B3::pureCSE):
* b3/B3PureCSE.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::returnsBool):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::performSubstitution):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/B3Width.cpp:
(JSC::B3::bestType):
* b3/B3Width.h:
(JSC::B3::canonicalWidth):
(JSC::B3::isCanonicalWidth):
(JSC::B3::mask):
* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::jsHash):
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::cooled):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isLateUse):
(JSC::B3::Air::Arg::isAnyDef):
(JSC::B3::Air::Arg::isEarlyDef):
(JSC::B3::Air::Arg::isLateDef):
(JSC::B3::Air::Arg::isZDef):
(JSC::B3::Air::Arg::simpleAddr):
(JSC::B3::Air::Arg::statusCond):
(JSC::B3::Air::Arg::isSimpleAddr):
(JSC::B3::Air::Arg::isMemory):
(JSC::B3::Air::Arg::isStatusCond):
(JSC::B3::Air::Arg::isCondition):
(JSC::B3::Air::Arg::ptr):
(JSC::B3::Air::Arg::base):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::forEachTmpFast):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::asStatusCondition):
(JSC::B3::Air::Arg::isInvertible):
(JSC::B3::Air::Arg::inverted):
* b3/air/AirBasicBlock.cpp:
(JSC::B3::Air::BasicBlock::setSuccessors):
* b3/air/AirBasicBlock.h:
* b3/air/AirBlockInsertionSet.cpp: Added.
(JSC::B3::Air::BlockInsertionSet::BlockInsertionSet):
(JSC::B3::Air::BlockInsertionSet::~BlockInsertionSet):
* b3/air/AirBlockInsertionSet.h: Added.
* b3/air/AirDumpAsJS.cpp: Removed.
* b3/air/AirDumpAsJS.h: Removed.
* b3/air/AirEliminateDeadCode.cpp:
(JSC::B3::Air::eliminateDeadCode):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::prepareForGeneration):
* b3/air/AirInstInlines.h:
(JSC::B3::Air::isAtomicStrongCASValid):
(JSC::B3::Air::isBranchAtomicStrongCASValid):
(JSC::B3::Air::isAtomicStrongCAS8Valid):
(JSC::B3::Air::isAtomicStrongCAS16Valid):
(JSC::B3::Air::isAtomicStrongCAS32Valid):
(JSC::B3::Air::isAtomicStrongCAS64Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS8Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS16Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS32Valid):
(JSC::B3::Air::isBranchAtomicStrongCAS64Valid):
* b3/air/AirOpcode.opcodes:
* b3/air/AirOptimizeBlockOrder.cpp:
(JSC::B3::Air::optimizeBlockOrder):
* b3/air/AirPadInterference.cpp:
(JSC::B3::Air::padInterference):
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/air/opcode_generator.rb:
* b3/testb3.cpp:
(JSC::B3::testLoadAcq42):
(JSC::B3::testStoreRelAddLoadAcq32):
(JSC::B3::testStoreRelAddLoadAcq8):
(JSC::B3::testStoreRelAddFenceLoadAcq8):
(JSC::B3::testStoreRelAddLoadAcq16):
(JSC::B3::testStoreRelAddLoadAcq64):
(JSC::B3::testTrappingStoreElimination):
(JSC::B3::testX86LeaAddAdd):
(JSC::B3::testX86LeaAddShlLeftScale1):
(JSC::B3::testAtomicWeakCAS):
(JSC::B3::testAtomicStrongCAS):
(JSC::B3::testAtomicXchg):
(JSC::B3::testDepend32):
(JSC::B3::testDepend64):
(JSC::B3::run):
* runtime/Options.h:

Websites/webkit.org:

Document the new opcodes!

* docs/b3/intermediate-representation.html:



Canonical link: https://commits.webkit.org/186470@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-10 17:49:42 +00:00
Jonathan Davis 6492f18140 Prevent HTML in rich link previews
https://bugs.webkit.org/show_bug.cgi?id=169435

Reviewed by Tim Horton.

* wp-content/plugins/social-meta.php:


Canonical link: https://commits.webkit.org/186424@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-09 22:07:46 +00:00
Ryosuke Niwa 353401f605 Update ReadMe.md to use directory format for backing up & restoring the database
https://bugs.webkit.org/show_bug.cgi?id=169263

Reviewed by Joseph Pecoraro.

Update ReadMe.md's instruction to backup and restore the database to use directory format instead of
piping it to gzip. The new command will backup and restore the database with multiple concurrent processes
with a custom compression level.

* ReadMe.md:

Canonical link: https://commits.webkit.org/186308@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-07 23:21:49 +00:00
Manuel Rego Casasnovas eb8361573d Unreviewed, minor updates on CSS Grid Layout examples.
* demos/css-grid/index.html:
* demos/css-grid/responsive-grid.html:

Canonical link: https://commits.webkit.org/186147@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-03 13:02:49 +00:00
Ryosuke Niwa 679c646d97 Make baseline data points selectable
https://bugs.webkit.org/show_bug.cgi?id=169069
<rdar://problem/29209427>

Reviewed by Antti Koivisto.

Add the capability to select data points other than "current" configuration type.

This patch refactors the way the "chart status" is computed. Before this patch, ChartStatusView was
responsible for determining two data points for which to compute the status, and computing the status
between two data points. ChartPaneStatusView which inherits from ChartStatusView and used in the charts
page relied upon ChartStatusView to compute these values, and computed the list of revision ranges for
each relevant repository between the data points. ChartPane then had callbacks on ChartPaneStatusView
to know whenever these values changed. Because of this entangled mess, ChartStatusView had to be aware
of InteractiveTimeSeriesChart even though only ChartPaneStatusView could be used with it.

This patch dramatically simplifies the situation by adding referencePoints() on TimeSeriesChart and
InteractiveTimeSeriesChart which returns the current point, the previous point if there is any, and
their time series view. It also extracts ChartStatusEvaluator which computes the current status values
and ChartRevisionRange which computes a list of revision differences both based on the referencePoints.
As a result, ChartPaneStatusView no longer inherits from ChartStatusView, and ChartStatusView has been
renamed to DashboardChartStatusView to reflect its purpose. Furthermore, ChartPane which used to rely on
ChartPaneStatusView's revisionCallback to update the commit log viewer simply uses another instance of
ChartRevisionRange, eliminating the need for the callback.

To implement these classes easily, this patch also introduces a new class, LazilyEvaluatedFunction to
memoize the return value of a function when called with the same arguments. Delaying the computation of
a value and avoiding the work when the values are the same is a very common pattern in the perf dashboard
so I expect this class would be used in a lot more places in the future.

* browser-tests/chart-revision-range-tests.js: Added. Tests for ChartRevisionRange.
* browser-tests/chart-status-evaluator-tests.js: Added. Tests for ChartStatusEvaluator.

* browser-tests/index.html:
(BrowsingContext):
(BrowsingContext.importScripts): Fixed the bug that calling importScripts twice results in MockRemoteAPI
being loaded twice.
(ChartTest.importChartScripts): Import more model objects.
(ChartTest.sampleCluster): Made this a getter.
(ChartTest.makeModelObjectsForSampleCluster):
(ChartTest.makeSampleCluster): Added. Cutomizes the valus of baseline / target based on options.
(ChartTest.respondWithSampleCluster): Now takes an options argument for makeSampleCluster.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase): Added _openRepository to keep track of the currently open repository instead of relying
on _mainChartStatus or _commitLogViewer to keep track of it.
(ChartPaneBase.prototype.configure):  The callback for when the user clicked on a repository name in
ChartPaneStatusView has been replaced by "openRepository" action.
(ChartPaneBase.prototype.setOpenRepository): Moved from ChartPane.
(ChartPaneBase.prototype._mainSelectionDidChange):
(ChartPaneBase.prototype._indicatorDidChange):
(ChartPaneBase.prototype._didFetchData):
(ChartPaneBase.prototype._updateCommitLogViewer): Renamed from _updateStatus.
(ChartPaneBase.prototype.openNewRepository): Renamed from _requestOpeningCommitViewer. Fixed a bug that
clicking on the repository name inside ChartPaneStatusView would not focus the pane, which resulted in
arrow keys to be ignored instead of moving the main chart's indicator or the currently open repository.
(ChartPaneBase.prototype._keyup):
(ChartPaneBase.prototype._moveOpenRepository): Moved from ChartPaneStatusView's
moveRepositoryWithNotification. Used when changing the open repository by up/down arrow keys.

* public/v3/components/chart-revision-range.js: Added. Extracted from ChartPaneStatusView.
(ChartRevisionRange): Added.
(ChartRevisionRange.prototype.revisionList): Added.
(ChartRevisionRange.prototype.rangeForRepository): Added.
(ChartRevisionRange._revisionForPoint): Added. Extracted from ChartPaneStatusView's
_updateRevisionListForNewCurrentRepository.
(ChartRevisionRange._computeRevisionList): Ditto from computeChartStatusLabels.

* public/v3/components/chart-status-evaluator.js: Added.
(ChartStatusEvaluator): Added.
(ChartStatusEvaluator.prototype.status): Added.
(ChartStatusEvaluator.computeChartStatus): Added. Extracted from ChartStatusView's updateStatusIfNeeded.

* public/v3/components/chart-status-view.js: Removed.
(ChartStatusView): Deleted. Split into ChartStatusEvaluator and DashboardChartStatusView.

* public/v3/components/chart-styles.js:
(ChartStyles.baselineStyle): Make baseline data points interactive. This single line change is what
enables the user to interact with the data points. The rest of changes in this patch mostly deals with
the status text such as "5% worse than baseline" and the list of revisions shown in the commit log viewer
which would have shown the wrong range without these changes.

* public/v3/components/dashboard-chart-status-view.js: Added. Extracted from ChartStatusView.
(DashboardChartStatusView): Added.
(DashboardChartStatusView.prototype.render): Added.
(DashboardChartStatusView.htmlTemplate): Added.
(DashboardChartStatusView.cssTemplate): Added.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype.referencePoints): Added. Return the first point and the last point
as the reference points when there is a selection. Only report the previous point if they are distinct as
showing a range of revisions from a data point to itself makes no sense. When there is a indicator simply
return it and its previous point as reference points. Otherwise return null unlike TimeSeriesChart's
referencePoints which always returns the latest point as the reference point.

* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype.referencePoints): Added. Return the latest point as the reference point. It
never returns the previous point even if there were more data points as there is no way for the user to
specify which data points to compare.

* public/v3/index.html: Include newly added files.

* public/v3/lazily-evaluated-function.js: Added.
(LazilyEvaluatedFunction): Added.
(LazilyEvaluatedFunction.prototype.evaluate): Added.

* public/v3/models/commit-log.js:
(CommitLog.prototype.diff): Fixed a bug that computing the diff of two Subversion-like revisions results
in "from" field to be unexpectedly an integer instead of a string.

* public/v3/models/metric.js:
(Metric): Moved the code to compute the unit from the metric name from v2's RunsData class. This makes
writing tests easier since it eliminates the need to load v2's data.js.
(Metric.prototype.unit):
(Metric.prototype.isSmallerBetter): Ditto for determining whether the unit is smaller-is-better.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype._updateStatus): Deleted the unused code.

* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView): No longer inherits from ChartStatusView. Uses ChartStatusEvaluator and
ChartRevisionRange to to compute the chart status and the list of revision changes.
(ChartPaneStatusView.prototype.pointsRangeForAnalysis): Deleted.
(ChartPaneStatusView.prototype.render): Split it into _renderStatus and _renderBuildRevisionTable using
LazilyEvaluatedFunction.
(ChartPaneStatusView.prototype._renderStatus): Added.
(ChartPaneStatusView.prototype._renderBuildRevisionTable): Added.
(ChartPaneStatusView.prototype.setCurrentRepository): _updateRevisionListForNewCurrentRepository has been
moved into ChartRevisionRange. Just enqueue itself to re-render.
(ChartPaneStatusView.prototype._setRevisionRange): Deleted.
(ChartPaneStatusView.prototype.moveRepositoryWithNotification): Deleted.
(ChartPaneStatusView.prototype.updateRevisionList): Deleted.
(ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Deleted.
(ChartPaneStatusView.prototype.computeChartStatusLabels): Deleted.
(ChartPaneStatusView.htmlTemplate):
(ChartPaneStatusView.cssTemplate):

* public/v3/pages/chart-pane.js:
(ChartPane.prototype.openNewRepository): Overrides the one in ChartPaneBase, which has been renamed from
_requestOpeningCommitViewer.
(ChartPane.prototype._analyzeRange):
(ChartPane.prototype._renderActionToolbar): Use the main chart's selection directly to determine whether
an analysis task can be created for the currenty selected range.

* public/v3/pages/dashboard-page.js:
(DashboardPage.prototype._createChartForCell):

* unit-tests/lazily-evaluated-function-tests.js: Added. Tests for LazilyEvaluatedFunction.


Canonical link: https://commits.webkit.org/186092@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-02 21:23:07 +00:00
Ryosuke Niwa 966c03aa33 Build fix after r212853. Make creating an analysis task work again.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.render):


Canonical link: https://commits.webkit.org/186050@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-02 02:40:59 +00:00
Ryosuke Niwa 5ce947afb2 Fix tests after r213119 and r213120.
* browser-tests/time-series-chart-tests.js:
(return.ChartTest.importChartScripts.context.then):
(string_appeared_here.then): Deleted.


Canonical link: https://commits.webkit.org/185953@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-28 05:01:45 +00:00
Simon Fraser 1f175d617c Add css-status page on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=168921

Reviewed by Sam Weinig.

Add a page that shows the status of CSS properties and values, scraped from Source/WebCore/css/CSSProperties.json.

This is modeled after the feature status page. Properties can be filtered by status
and the spec they belong to.

* wp-content/themes/webkit/css-status.php: Added.

Canonical link: https://commits.webkit.org/185952@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-28 05:00:28 +00:00
Ryosuke Niwa 7e52699977 Removed the unused code that was supposed to be removed in the previous commit.
* browser-tests/time-series-chart-tests.js:


Canonical link: https://commits.webkit.org/185951@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-28 04:52:17 +00:00
Ryosuke Niwa 34f3e806b5 Split tests for InteractiveTimeSeriesChart into a separate test file.
https://bugs.webkit.org/show_bug.cgi?id=168960

Reviewed by Joseph Pecoraro.

Extracted the test cases for InteractiveTimeSeriesChart charts from time-series-chart-tests.js
into interactive-time-series-chart-tests.js now that the former file has gotten really big over time.

Also extracted a bunch of helper functions time-series-chart-tests.js as ChartTest in index.html.
Any test which instantiates a time series chart can use this helper class.

* browser-tests/index.html:
(ChartTest.importChartScripts): Ditto.
(ChartTest.posixTime): Moved from time-series-chart-tests.js.
(ChartTest.sampleCluster): Ditto.
(ChartTest.createChartWithSampleCluster): Ditto.
(ChartTest.createInteractiveChartWithSampleCluster): Ditto.
(ChartTest.respondWithSampleCluster):
* browser-tests/interactive-time-series-chart-tests.js: Extracted from time-series-chart-tests.js.
* browser-tests/time-series-chart-tests.js:
(posixTime): Moved.
(dayInMilliseconds): Moved.
(sampleCluster): Moved.
(createChartWithSampleCluster): Moved.
(createInteractiveChartWithSampleCluster): Moved.
(respondWithSampleCluster): Moved.
* unit-tests/analysis-task-tests.js: Fixed a typo. s/adopter/adapter/.


Canonical link: https://commits.webkit.org/185950@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-28 04:48:36 +00:00
Ryosuke Niwa 5d5f5c41d4 Calling build() on a baseline point results in an exception
https://bugs.webkit.org/show_bug.cgi?id=168959

Reviewed by Joseph Pecoraro.

Some baseline points may lack the build information. e.g. A custom data point made by an user.
Only instantiate Build object in a point object returned by MeasurementAdaptor when the builder id
is available so that we don't hit an assertion inside Build's constructor.

* public/v3/models/measurement-adaptor.js:
(MeasurementAdaptor.prototype.applyTo..build): Only instantiate Build when builderId is set.
* unit-tests/measurement-adaptor-tests.js: Added a test case.


Canonical link: https://commits.webkit.org/185948@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-28 04:07:05 +00:00
Ryosuke Niwa 972a4d01db Arrow key shouldn't move the indicator beyond the visible points
https://bugs.webkit.org/show_bug.cgi?id=168956

Reviewed by Joseph Pecoraro.

The bug was caused by moveLockedIndicatorWithNotification using the full sampled time series view
instead of the one constrained by the domain. Since the time series chart expands the visible domain
to include at least one point before the start time and one point after the end tiem to draw lines
extending beyond the visible region (otherwise it looks as though the graph ends there), we need to
use a view constrained by the start time and the end time before looking for a next/previous point.

* browser-tests/time-series-chart-tests.js: Added test cases for moveLockedIndicatorWithNotification.
* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype.moveLockedIndicatorWithNotification): Fixed the bug. Also
enqueue itself to render instead of relying on a parent component to do it.


Canonical link: https://commits.webkit.org/185947@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-28 03:30:33 +00:00
Ryosuke Niwa 0ca23f2488 A Locked indicator should be visually distinct from an unlocked indicator
https://bugs.webkit.org/show_bug.cgi?id=168868
<rdar://problem/29666054>

Reviewed by Antti Koivisto.

Added the support for specifying options.lockedIndicator in addition to options.indicator to style
an locked indicator differently from an unlocked one.

* browser-tests/time-series-chart-tests.js: Added new test cases for indicators.
(createChartWithSampleCluster): Renamed and swapped the order of arguments to better match
TimeSeriesChart's constructor. Now the second argument is an array of source as is in the constructor.
(createInteractiveChartWithSampleCluster): Added.

* public/v3/components/chart-styles.js:
(ChartStyles.overviewChartOptions): Changed the color of a selection to blue.
(ChartStyles.mainChartOptions): Ditto. Also use a different style for a locked indicator.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._layout): Removed the unused variable.
(InteractiveTimeSeriesChart.prototype._renderChartContent): Use options.lockedIndicator when rendering
a locked indicator. Also stroke the circle in addition to filling it so that we can use a blue circle
with a white hole for a locked indicator to make it even more visually distinctive from an unlocked one.


Canonical link: https://commits.webkit.org/185892@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-27 09:45:10 +00:00
Dewei Zhu a419729fad Commit should order by 'commit_order' as secondary key.
https://bugs.webkit.org/show_bug.cgi?id=168866

Reviewed by Ryosuke Niwa.

Currently, commits are sorted by 'commit_time' only.
We should use 'commit_order' as secondary key when 'commit_time' is equal or null.

* public/include/commit-log-fetcher.php:
* public/include/db.php:
* server-tests/api-commits.js:
(return.addSlaveForReport.subversionCommits.then):
(then):


Canonical link: https://commits.webkit.org/185864@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-25 08:58:18 +00:00
Ryosuke Niwa c2905753a2 REGRESSION(r212853): Comparisons to baseline no longer shows up
https://bugs.webkit.org/show_bug.cgi?id=168863

Reviewed by Joseph Pecoraro.

The bug was caused by ChartStatusView's code not being updated to use TimeSeriesView's.
Updated the code to use TimeSeriesView's methods to fix the bug.

Also made InteractiveTimeSeriesChart's currentPoint to return a (TimeSeriesView, point, isLocked) tuple
to consolidate it with lockedIndicator() to work towards making the baseline data points selectable.

* browser-tests/time-series-chart-tests.js: Updated the test cases to use currentIndicator, and added
test cases for newly added lastPointInTimeRange.

* public/v3/components/chart-pane.js:
(ChartPane.prototype.serializeState): Updated to use currentIndicator.
(ChartPane.prototype._renderFilteringPopover): Ditto.

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype.updateStatusIfNeeded): Use currentIndicator for an interative time series.
Fixed the non-interactive chart's code path for TimeSeriesView.
(ChartStatusView.prototype._computeChartStatus): Modernized the code.
(ChartStatusView.prototype._findLastPointPriorToTime): Deleted. Replaced by TimeSeriesView's
lastPointInTimeRange.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype.currentIndicator):
(InteractiveTimeSeriesChart.prototype.moveLockedIndicatorWithNotification):
(InteractiveTimeSeriesChart.prototype._renderChartContent):
(InteractiveTimeSeriesChart):

* public/v3/models/time-series.js:
(TimeSeriesView.prototype.lastPointInTimeRange): Added.
(TimeSeriesView.prototype._reverse): Added. Traverses the view in the reverse order.
* unit-tests/time-series-tests.js:


Canonical link: https://commits.webkit.org/185858@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-25 08:02:02 +00:00
Dewei Zhu 942ee86287 Rename 'commit_parent' in 'commits' table to 'commit_previous_commit'.
https://bugs.webkit.org/show_bug.cgi?id=168816

Reviewed by Ryosuke Niwa.

Rename 'commit_parent' to avoid ambiguity in the coming feature.
For exisiting database, run
    "ALTER TABLE commits RENAME commit_parent TO commit_previous_commit;"
to update the database.

* init-database.sql:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* server-tests/api-commits.js:
(then):
* server-tests/api-report-commits-tests.js:
(then):
* tools/sync-commits.py:
(main):
(Repository.fetch_commits_and_submit):
(GitRepository._revision_from_tokens):
* unit-tests/analysis-task-tests.js:
(sampleAnalysisTask):


Canonical link: https://commits.webkit.org/185819@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-24 07:17:48 +00:00
Ryosuke Niwa abc9be73b1 New sampling algorithm shows very few points when zoomed out
https://bugs.webkit.org/show_bug.cgi?id=168813

Reviewed by Saam Barati.

When a chart is zoomed out to a large time interval, the new sampling algorithm introduced in r212853 can
hide most of the data points because the difference between the preceding point's time and the succeeding
point's time of most points will be below the threshold we computed.

Instead, rank each data point based on the aforementioned time interval difference, and pick the first M data
points when M data points are to be shown.

This makes the new algorithm behave like our old algorithm while keeping it stable still. Note that this
algorithm still biases data points without a close neighboring point but this seems to work out in practice
because such a point tends to be an important sample anyway, and we don't have a lot of space between
data points since we aim to show about one point per pixel.

* browser-tests/index.html:
(CanvasTest.canvasContainsColor): Extracted from one of the test cases and generalized. Returns true when
the specified region of the canvas contains a specified color (alpha is optional).
* browser-tests/time-series-chart-tests.js: Added a test case for sampling. It checks that sampling happens
and that we always show some data point even when zoomed out to a large time interval.
(createChartWithSampleCluster):

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._sampleTimeSeries):
* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype._ensureSampledTimeSeries): M, the number of data points we pick must be computed
based on the width of data points we're about to draw constrained by the canvas size. e.g. when the canvas
is only half filled, we shouldn't be showing two points per pixel in the filled region.
(TimeSeriesChart.prototype._sampleTimeSeries): Refined the algorithm. First, compute the time difference or
the rank for each N data points. Sort those ranks in descending order (in the order we prefer), and include
all data points above the M-th rank in the sample.
(TimeSeriesChart.prototype.computeTimeGrid): Revert the inadvertent change in r212935.

* public/v3/models/time-series.js:
(TimeSeriesView.prototype.filter): Fixed a bug that the indices passed onto the callback were shifted by the
starting index.
* unit-tests/time-series-tests.js: Added a test case to ensure callbacks are called with correct data points
and indices.


Canonical link: https://commits.webkit.org/185818@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-24 06:57:04 +00:00
Joseph Pecoraro cc6c8d309b [Resource Timing] Add Experimental Feature Flag
https://bugs.webkit.org/show_bug.cgi?id=167147

Reviewed by Ryosuke Niwa.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
Move ResourceTiming to experimental section.
Disable it for El Capitan due to known issues.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
Put experimental flags in the experimental section.

Websites/webkit.org:

* experimental-features.html:
Test for Resource Timing.

Canonical link: https://commits.webkit.org/185817@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-24 06:52:02 +00:00
Ryosuke Niwa 327cc38016 REGRESSION(r212542): Make TimeSeriesChart.computeTimeGrid stops x-axis grid prematurely
https://bugs.webkit.org/show_bug.cgi?id=168812

Reviewed by Joseph Pecoraro.

Add time iterator of two months, three months, and four months with some tests.

Also for one-month time iterator, round the day of month to 1 or 15 whichever is closer.

* browser-tests/time-series-chart-tests.js: Added more tests.
* public/v3/components/time-series-chart.js:
(TimeSeriesChart._timeIterators.next):
(TimeSeriesChart._timeIterators):


Canonical link: https://commits.webkit.org/185809@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-24 03:12:37 +00:00
Ryosuke Niwa 1f76391a56 Add tests for InteractiveTimeSeriesChart and adopt actions
https://bugs.webkit.org/show_bug.cgi?id=168750

Reviewed by Chris Dumez.

Added tests for InteractiveTimeSeriesChart.

Also replaced selection.onchange, selection.onzoom, indicator.onchange, annotations.onclick callbacks
by "selectionChange", "zoom", "indicatorChange", and "annotationClick" actions respectively.

Also fixed various bugs and bad code I encountered while writing these tests.

* browser-tests/index.html:
(waitForComponentsToRender): Delay the call to enqueueToRender until the next run loop because there
might be outstanding promises that just got resolved. e.g. for fetching measurement sets JSONs. Let
all those promises get resolved first. Otherwise, some tests become racy.
(canvasImageData): Extracted from time-series-chart-tests.js.
(canvasRefTest): Ditto.
(CanvasTest): Ditto.
(CanvasTest.fillCanvasBeforeRedrawCheck): Ditto.
(CanvasTest.hasCanvasBeenRedrawn): Ditto.
(CanvasTest.canvasImageData): Ditto.
(CanvasTest.expectCanvasesMatch): Ditto.
(CanvasTest.expectCanvasesMismatch): Ditto.

* browser-tests/time-series-chart-tests.js: Fixed some test cases where dpr multipler was not doing
the right thing anymore in Safari under a high DPI screen. Also added a lot of test cases for interactive
time series chart and one for rendering annotations.
(scripts): Moved.
(posixTime): Added. A helper function for sampleCluster.
(dayInMilliseconds): Ditto.
(sampleCluster): Moved here. Made the same cluster more artifical for an easier testing.
(createChartWithSampleCluster): Moved out of one of the tests.
(respondWithSampleCluster): Ditto.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure): Adopted new actions in InteractiveTimeSeriesChart.

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype.updateStatusIfNeeded): Removed a superflous console.log.

* public/v3/components/chart-styles.js:
(ChartStyles.mainChartOptions): Set zoomButton to true. InteractiveTimeSeriesChart used to determine
whether to show the zoom button or not based on the precense of the zoom callback. We made it explicit.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype.setIndicator): Explicitly call _notifySelectionChanged with false
instead of relying on undefined to be treated as falsey.
(InteractiveTimeSeriesChart.prototype._createCanvas): Use id instead of selector to find elements.
(InteractiveTimeSeriesChart.htmlTemplate):
(InteractiveTimeSeriesChart.cssTemplate):
(InteractiveTimeSeriesChart.prototype._mouseMove): Explicitly call _startOrContinueDragging with false
instead of relying on undefined treated as falsey. Also added the missing call to enqueueToRender found
by new tests. This was working fine on the dashboard due to other components invoking enqueueToRender
but won't work in a standalone instance of InteractiveTimeSeriesChart.
(InteractiveTimeSeriesChart.prototype._mouseLeave): Ditto, adding the missing call to enqueueToRender.
(InteractiveTimeSeriesChart.prototype._click): Removed the assignment to _forceRender when calling
_mouseMove in an early exist, which does set this flag and invokes enqueueToRender, and added the missing
call to enqueueToRender in the other code path.
(InteractiveTimeSeriesChart.prototype._startOrContinueDragging): Replaced annotations.onclick callback
by the newly added "annotationClick" action, and added the missing call to enqueueToRender.
(InteractiveTimeSeriesChart.prototype._endDragging): Use arrow function.
(InteractiveTimeSeriesChart.prototype._notifyIndicatorChanged): Replaced indicator.onchange callback by
the newly added "indicatorChange" action.
(InteractiveTimeSeriesChart.prototype._notifySelectionChanged): Replaced selection.onchange callback by
the newly added "selectionChange" action.
(InteractiveTimeSeriesChart.prototype._renderChartContent): Show the zoom button when options.zoomButton
is set instead of relying on the presence of selection.onzoom especially now that the callback has been
replaced by the "zoom" action.

* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype.setAnnotations): Added the missing call to enqueueToRender.

* public/v3/main.js:


Canonical link: https://commits.webkit.org/185800@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-23 21:39:55 +00:00
Alex Christensen 95c6861ae9 Add WebRTC to experimental-features.html
https://bugs.webkit.org/show_bug.cgi?id=168757

Reviewed by Tim Horton.

* experimental-features.html:



Canonical link: https://commits.webkit.org/185788@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-23 19:25:10 +00:00
Jonathan Davis e3e3c531c2 Fixed saving survey data
https://bugs.webkit.org/show_bug.cgi?id=168730

Reviewed by Joseph Pecoraro.

* wp-content/themes/webkit/functions.php:


Canonical link: https://commits.webkit.org/185780@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-23 18:18:11 +00:00
Ryosuke Niwa 4ec8b89263 Make sampling algorithm more stable and introduce an abstraction for sampled data
https://bugs.webkit.org/show_bug.cgi?id=168693

Reviewed by Chris Dumez.

Before this patch, TimeSeriesChart's resampling resulted in some points poping up and disappearing as
the width of a chart is changed. e.g. when resizing the browser window. The bug was by caused by
the sample for a given width not always including all points for a smaller width so as the width is
expanded, some point may be dropped.

Fixed this by using a much simpler algorithm of always picking a point when the time interval between
the preceding point and the succeeding point is larger than the minimum space we allow for a given width.

Also introduced a new abstraction around the sample data: TimeSeriesView. A TimeSeriesView provides
a similar API to TimeSeries for a subset of the time series filtered by a time range a custom function.
This paves a way to adding the ability to select baseline, etc... on the chart status view.

TimeSeriesView can be in two modes:
Mode 1. The view represents a contiguous subrange of TimeSeries - In this mode, this._data references
        the underlying TimeSeries's _data directly, and we use _startingIndex to adjust index given to
        find the relative index. Finding the next point or the previous point of a given point is done
        via looking up the point's seriesIndex and doing a simple arithmetic. In general, an index is
        converted to the absolute index in the underlying TimeSeries's _data array.

Mode 2. The view represents a filtered non-contiguous subset of TimeSeries -  In this mode, this._data is
        its own array. Finding the next point or the previous point of a given point requires finding
        a sibling point in the underlying TimeSeries which is in this view. Since this may result in O(n)
        traversal and a hash lookup, we lazily build a map of each point to its position in _data instead.

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype.updateStatusIfNeeded): Call selectedPoints instead of sampledDataBetween for
clarity. This function now returns a TimeSeriesView instead of a raw array.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype.currentPoint): Updated now that _sampledTimeSeriesData contains
an array of TimeSeriesView's. Note that diff is either 0, -1, or 1.
(InteractiveTimeSeriesChart.prototype.selectedPoints): Ditto. sampledDataBetween no longer exists since
we can simply call viewTimeRange on TimeSeriesView returned by sampledDataBetween.
(InteractiveTimeSeriesChart.prototype.firstSelectedPoint): Ditto.
(InteractiveTimeSeriesChart.prototype._sampleTimeSeries): Use add since excludedPoints is now a Set.

* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype.sampledDataBetween): Deleted.
(TimeSeriesChart.prototype.firstSampledPointBetweenTime): Deleted.
(TimeSeriesChart.prototype._ensureSampledTimeSeries): Modernized the code. Use the the time interval of
the chart divided by the number of allowed points as the time interval used in the new sampling algorithm.
(TimeSeriesChart.prototype._sampleTimeSeries): Rewritten. We also create TimeSeriesView here.
(TimeSeriesChart.prototype._sampleTimeSeries.findMedian): Deleted.
(TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Fixed a bug that the canvas size wasn't
set to the correct value on Chrome when a high DPI screen is used.

* public/v3/models/time-series.js:
(TimeSeries.prototype.viewBetweenPoints): Renamed from dataBetweenPoints. Now returns a TimeSeriesView.
(TimeSeriesView): Added. This constructor is to be called by viewBetweenPoints, viewTimeRange, and filter.
(TimeSeriesView.prototype._buildPointIndexMap): Added. Used in mode (2).
(TimeSeriesView.prototype.length): Added.
(TimeSeriesView.prototype.firstPoint): Added.
(TimeSeriesView.prototype.lastPoint): Added.
(TimeSeriesView.prototype.nextPoint): Added. Note index is always a position in this._data. In mode (1),
this is the position of the point in the underlying TimeSeries' _data. In mode (2), this is the position
of the point in this._data which is dictinct from the underlying TimeSeries' _data.
(TimeSeriesView.prototype.previousPoint): Ditto.
(TimeSeriesView.prototype.findPointByIndex): Added. Finds the point using the positional index from the
beginning of this view. findPointByIndex(0) on one view may not be same as findPointByIndex(0) of another.
(TimeSeriesView.prototype.findById): Added. This is O(n).
(TimeSeriesView.prototype.values): Added. Returns the value of each point in this view.
(TimeSeriesView.prototype.filter): Added. Creates a new view with a subset of data points the predicate
function returned true.
(TimeSeriesView.prototype.viewTimeRange): Added. Creates a new view with a subset of data points for the
given time ragne. When the resultant view would include all points of this view, it simply returns itself
as an optimization.
(TimeSeriesView.prototype.firstPointInTimeRange): Added. Returns the first point in the view which lies
within the specified time range.
(TimeSeriesView.prototype.Symbol.iterator): Added. Iterates over each point in the view.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype.selectedPoints): Use selectedPoints in lieu of getting selection and then
calling sampledDataBetween with that range.

* public/v3/pages/summary-page.js:
(SummaryPageConfigurationGroup.set _medianForTimeRange): Modernized.

* unit-tests/time-series-tests.js: Added tests for TimeSeries and TimeSeriesView. Already caught bugs!
(addPointsToSeries):


Canonical link: https://commits.webkit.org/185750@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-22 22:07:39 +00:00
Manuel Rego Casasnovas 20184c3de7 Unreviewed, add CSS Grid Layout examples for a blog post.
* demos/css-grid/index.html: Added.
* demos/css-grid/responsive-grid.html: Added.

Canonical link: https://commits.webkit.org/185596@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-20 15:30:24 +00:00
Ryosuke Niwa 531149a6f3 Add tests for the time series chart and fix bugs I found along the way
https://bugs.webkit.org/show_bug.cgi?id=168499

Reviewed by Antti Koivisto.

Add basic tests for the time series chart.

Replaced the "ondata" callback set in the options by "dataChange" action now that ComponentBase provides
a facility for defining event-like actions.

Also fixed bugs I encountered while writing these tests see below for descriptions.

* browser-tests/editable-text-tests.js:
(waitToRender): Moved to index.html
* browser-tests/index.html:
(waitToRender): Moved from editable-text-tests.js.
(wait): Added.
* browser-tests/time-series-chart-tests.js: Added.
* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure):
* public/v3/components/time-series-chart.js:
(TimeSeriesChart): Removed the code to set display and position inline properties. This is now done inside
cssTemplate with :host pseudo class.
(TimeSeriesChart.prototype._ensureCanvas): Don't strech the canvas to 100% of width and height. This was
causing a flush of contents where the canvas is momentarily streched by the browser and the script later
updates with the content with the correct aspect ratio.
(TimeSeriesChart.cssTemplate): Added :host rule to set display: block and position: relative.
(TimeSeriesChart._updateAllCharts): Deleted.
(TimeSeriesChart.prototype.render): Only run the code for axis when options.axis is defined. Also, avoid
setting the fill style because we never fill for axis drawing.
(TimeSeriesChart.prototype._computeHorizontalRenderingMetrics): Ditto. Fallback to sensible values when
options.axis is not defined.
(TimeSeriesChart.prototype._renderYAxis): Now computeValueGrid generates a sequence of {time, label}.
(TimeSeriesChart.prototype._renderTimeSeries): Don't draw the shades for confidence intervals unless its
fill style is defined. Otherwise, we'd end up drawing black shade and mask the actual data points.
(TimeSeriesChart.prototype._ensureSampledTimeSeries): Dispatch newly added "dataChange" action instead of
calling "ondata" callback in options dictionary.
(TimeSeriesChart.computeTimeGrid): Modernized to use const/let. Also fixed the bug that we were emitting
the date even when the entire time range fit within a 24-hour interval.
(TimeSeriesChart.computeValueGrid): Rewritten to make MB/GB use a nice round number instead of 0.98GB.
We were using a power of 10 to round up the stepping value but the value formatter used a power of 1024
to divide byte measurements (e.g. for memory). Use formatter.divisor to find the right scaling factor for
each kind.
* public/v3/models/metric.js:
(Metric.prototype.makeFormatter):
(Metric.makeFormatter): Extracted from the one on the prototype so that tests don't need a metric object
just to test TimeSeriesChart. Added the second argument which specifies the maximum absolute value of the
range we're formatting. This is needed to use the same number of decimal points when the most significant
digit of some value is smaller than that of the biggest one. For example, we were emitting 0.50GB instead
of 0.5G along with 2.0GB. The "adjustment" reduces the number of significant figures in these cases.
* public/v3/pages/dashboard-page.js:
(DashboardPage.prototype._createChartForCell):


Canonical link: https://commits.webkit.org/185522@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-17 09:15:55 +00:00
Ryosuke Niwa edb3ed8bcb Use expect.js instead of expect in browser tests
https://bugs.webkit.org/show_bug.cgi?id=168492

Reviewed by Joseph Pecoraro.

Use expect.js (https://github.com/Automattic/expect.js) instead of expect (https://github.com/mjackson/expect).

* browser-tests/close-button-tests.js:
* browser-tests/component-base-tests.js:
* browser-tests/editable-text-tests.js:
* browser-tests/index.html:


Canonical link: https://commits.webkit.org/185517@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-17 05:36:05 +00:00
Ryosuke Niwa 75f589e62f Modernize and fix measurement-set tests
https://bugs.webkit.org/show_bug.cgi?id=168484

Reviewed by Joseph Pecoraro.

Modernized and fixed the tests in measurement-set-tests.js.

1. Return a promise instead of manually calling done in then/catch hanlders.
2. Use arrow function everywhere.
3. Explicitly assert the number of calls to callbacks instead of asserting never reached.

The test case labled "should return false when the range ends after the fetched cluster"
was incorrectly asserting that hasFetchedRange returns false when the end time is after
the primary cluster's end time. Test an interval before the primary cluster instead.

Added a test case for hasFetchedRange returning true when the end time appears after
the end of the primary cluster and fixed hasFetchedRange to that end. Since there are
no data points after the primary cluster which is chronologically the last cluster,
there is nothing to fetch beyond its end time.

* public/v3/models/measurement-set.js:
(MeasurementSet.prototype.hasFetchedRange): Fixed the bug that this function returned
false when the end time was after the primary cluster's end by truncating the range by
the end of the primary cluster.
* unit-tests/measurement-set-tests.js:
* unit-tests/resources/mock-remote-api.js:
(assert.notReached.assert.notReached): Deleted. It's no longer used by any tests.


Canonical link: https://commits.webkit.org/185513@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-17 03:50:12 +00:00
Ryosuke Niwa a53c5fb26d Update ReadMe.md and merge it with Install.md
https://bugs.webkit.org/show_bug.cgi?id=168405

Reviewed by Michael Catanzaro.

Merged Install.md and ReadMe.md into one file.

* Install.md: Removed.
* ReadMe.md: Merged Install.md at the top and updated the rest of the content.


Canonical link: https://commits.webkit.org/185439@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-16 05:00:25 +00:00
Jonathan Davis a6ef3f4b97 Add a survey to learn how people use WebKit Nightly builds
https://bugs.webkit.org/show_bug.cgi?id=167748

Reviewed by Joseph Pecoraro.

* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/nightly-start.php:
* wp-content/themes/webkit/nightly-survey.php: Added.
* wp-content/themes/webkit/survey.json: Added.


Canonical link: https://commits.webkit.org/184914@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-06 19:13:40 +00:00
Joseph Pecoraro 48611dd402 Patch Details: EWS Bubbles wrap on Patch Details page
https://bugs.webkit.org/show_bug.cgi?id=167709

Reviewed by Ryosuke Niwa.

* template/en/default/attachment/edit.html.tmpl:
Match the iframe size in list.html.tmpl.

Canonical link: https://commits.webkit.org/184742@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-01 22:08:23 +00:00
Yoav Weiss 761e36220b Add Link Preload as an off-by-default experimental feature menu item.
https://bugs.webkit.org/show_bug.cgi?id=167201

Reviewed by Ryosuke Niwa.

Source/WebCore:

Removed the explicit setting of the Link Preload experimental feature,
as it is now on by default for testing.

No new tests as this just removes methods from settings.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences linkPreloadEnabled]):
(-[WebPreferences setLinkPreloadEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::valueForKey):
(WebPreferences::setLinkPreloadEnabled):
(WebPreferences::linkPreloadEnabled):
* WebPreferences.h:
* Interfaces/IWebPreferencesPrivate.idl:

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetLinkPreloadEnabled):
(WKPreferencesGetLinkPreloadEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

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

Websites/webkit.org:

* experimental-features.html: Added Link Preload.

LayoutTests:

Removed code explicitly enabling Link preload from the tests, as it is now
turned on by default for testing. Corrected expectation files accordingly.

* http/tests/fetch/redirectmode-and-preload.html:
* http/tests/preload/delaying_onload_link_preload_after_discovery.html:
* http/tests/preload/delaying_onload_link_preload_after_discovery_image.html:
* http/tests/preload/download_resources-expected.txt:
* http/tests/preload/download_resources.html:
* http/tests/preload/download_resources_from_header_iframe.html:
* http/tests/preload/download_resources_from_invalid_headers.html:
* http/tests/preload/dynamic_adding_preload.html:
* http/tests/preload/dynamic_remove_preload_href-expected.txt:
* http/tests/preload/dynamic_remove_preload_href.html:
* http/tests/preload/not_delaying_window_onload_before_discovery.html:
* http/tests/preload/onerror_event-expected.txt:
* http/tests/preload/onerror_event.html:
* http/tests/preload/onload_event-expected.txt:
* http/tests/preload/onload_event.html:
* http/tests/preload/resources/download_resources_from_header.php:
* http/tests/preload/resources/invalid_resources_from_header.php:
* http/tests/preload/single_download_preload-expected.txt:
* http/tests/preload/single_download_preload.html:
* http/tests/security/cached-cross-origin-preloaded-css-stylesheet.html:
* http/tests/security/cached-cross-origin-preloading-css-stylesheet.html:


Canonical link: https://commits.webkit.org/184585@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-28 22:53:54 +00:00
Joseph Pecoraro e10280fcf5 Add User Timing Experimental Feature
https://bugs.webkit.org/show_bug.cgi?id=167542
<rdar://problem/22746307>

Reviewed by Ryosuke Niwa.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::performanceTimelineEnabled):
* page/Performance.idl:
* page/PerformanceEntry.idl:
Make a better RuntimeEnabledFeature named "PerformanceTiming" which
is enabled if either UserTiming or ResourceTiming is enabled. This
will then expose the APIs that are only useful when at least one of
the APIs are available.

* page/PerformanceEntry.cpp:
(WebCore::PerformanceEntry::name): Deleted.
(WebCore::PerformanceEntry::entryType): Deleted.
(WebCore::PerformanceEntry::startTime): Deleted.
(WebCore::PerformanceEntry::duration): Deleted.
* page/PerformanceEntry.h:
(WebCore::PerformanceEntry::name):
(WebCore::PerformanceEntry::entryType):
(WebCore::PerformanceEntry::startTime):
(WebCore::PerformanceEntry::duration):
Inline simple accessors.

* page/PerformanceUserTiming.cpp:
(WebCore::UserTiming::measure):
Fix a bug introduced by ExceptionOr refactoring.

(WebCore::UserTiming::clearMarks):
(WebCore::UserTiming::clearMeasures):
(WebCore::clearPerformanceEntries):
(WebCore::clearPeformanceEntries): Deleted.
Fix method name typo.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences userTimingEnabled]):
(-[WebPreferences setUserTimingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Add setting for User Timing runtime enabled feature.

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setUserTimingEnabled):
(WebPreferences::userTimingEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
Add setting for User Timing runtime enabled feature.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetUserTimingEnabled):
(WKPreferencesGetUserTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Experimental feature. Off for now while we update ResourceTiming
and NavigationTiming to be compatible with Performance Timing 2.

Tools:

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

Websites/webkit.org:

* experimental-features.html:

LayoutTests:

* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
Update results now that experimental User Timing feature is enabled in tests.

Canonical link: https://commits.webkit.org/184576@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-28 09:26:14 +00:00
Joseph Pecoraro fcec5a9f59 Patch Review: EWS Bubbles wrap to multiple lines but can fit on one line
https://bugs.webkit.org/show_bug.cgi?id=167519

Reviewed by Ryosuke Niwa.

Tools:

* QueueStatusServer/templates/statusbubble.html:
To measure the bubbleContainer's width, it must not be wrapping based
on its parent container. So when measuring the width temporarily set
the parent to a very large width so as to not artificially wrap us.
Restore the parent's width after measuring.

Websites/bugs.webkit.org:

While we do post message to determine the size, the fact that we have
constrained the iframe to a size of 450px meant its body is 450px and
the div containing the bubbles wraps at 450px. Its full size (~458px)
is not returned. Although we solve this artifical constraint problem
inside of the bubble containerMetrics measuring, up this default value
from 450 to 460 to reduce UI jitter (the current measurement on my
machine is 458px).

* PrettyPatch/PrettyPatch.rb:

Canonical link: https://commits.webkit.org/184575@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-28 09:25:59 +00:00
Dean Jackson af8d0c34fc Add a simple demo for Touch stylus events
https://bugs.webkit.org/show_bug.cgi?id=167534

Reviewed by Simon Fraser.

* demos/touch/stylus.html: Added.

Canonical link: https://commits.webkit.org/184560@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-28 00:27:19 +00:00
Wenson Hsieh 8a6d523f83 Unreviewed, update scroll snapping demos to use current Module 1 spec
* demos/scroll-snap/index.html:

Adopt the new CSS properties scroll-snap-type and scroll-snap-align.

Canonical link: https://commits.webkit.org/184536@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-27 15:58:05 +00:00
Wenson Hsieh 1fda26f24c Unreviewed, add a demo page for an input events blog post
* demos/input-events/index.html: Added.

Canonical link: https://commits.webkit.org/184527@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-27 04:22:29 +00:00
Ryosuke Niwa bba084b9db Modernize editable-text component and add tests
https://bugs.webkit.org/show_bug.cgi?id=167398

Reviewed by Yusuke Suzuki.

Modernized EditableText component to use the action feature added in r210938.

* browser-tests/editable-text-tests.js: Added. Added tests for EditableText component.
(.waitToRender):
* browser-tests/index.html:
* public/v3/components/base.js:
(ComponentBase.prototype.dispatchAction): Return the result from the callback.
* public/v3/components/editable-text.js:
(EditableText): Removed a bunch of instance variables that are no longer needed.
(EditableText.prototype.didConstructShadowTree): Added. Add event listeners on the Edit/Save button and the host.
(EditableText.prototype.editedText): Return the text field's value directly.
(EditableText.prototype.text): Added.
(EditableText.prototype.setText): Call enqueueToRender automatically instead of relying on the parent component
to do so in _startedEditingCallback, which has been removed.
(EditableText.prototype.render): Modernized the code.
(EditableText.prototype._didClick): No longer prevents the default action manually since that's automatically done
in createEventHandler. Handle the case where the update action is not handled.
(EditableText.prototype._endEditingMode): Renamed from _didUpdate.
(EditableText.htmlTemplate): Added ids on various elements in the shadow tree.
(EditableText.cssTemplate): Updated the CSS selectors per above change.
* public/v3/main.js:
(main): Fixed a typo.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage): Use the action listener instead of manually setting callbacks.
(AnalysisTaskPage.prototype._createTestGroupListItem): Ditto.
(AnalysisTaskPage.prototype._didStartEditingTaskName): Deleted.


Canonical link: https://commits.webkit.org/184479@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-26 04:00:41 +00:00
Ryosuke Niwa baaa239e61 Build fix after r210783. Didn't mean to require custom elements API.
* public/v3/main.js:
(main):



Canonical link: https://commits.webkit.org/184306@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 22:40:01 +00:00
Ryosuke Niwa 9b056d9585 Make sync-commits.py robust against missing Subversion authors and missing parent Git commits
https://bugs.webkit.org/show_bug.cgi?id=167231

Reviewed by Antti Koivisto.

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

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

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

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


Canonical link: https://commits.webkit.org/184300@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 22:04:23 +00:00
Ryosuke Niwa f95a55876d REGRESSION(r198234): /api/commits/%revision% always fails
https://bugs.webkit.org/show_bug.cgi?id=167235

Reviewed by Antti Koivisto.

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

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

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

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

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

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


Canonical link: https://commits.webkit.org/184299@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 22:02:09 +00:00
Antoine Quint 28472b3771 Web Animations should be off by default and enabled as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=167115
<rdar://problem/30048963>

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

Source/WebCore:

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

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

Source/WebKit2:

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

* Shared/WebPreferencesDefinitions.h:

Tools:

Turn Web Animations on in DRT.

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

Websites/webkit.org:

Add a test for Web Animations feature detection.

* experimental-features.html:

LayoutTests:

No need for an explicit preference anymore.

* webanimations/script-tests/Document.js:

Canonical link: https://commits.webkit.org/184294@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 21:04:24 +00:00
Ryosuke Niwa feb5c541cc measurement-sets API can incorrectly order points with OS version without commit time
https://bugs.webkit.org/show_bug.cgi?id=167227

Reviewed by Chris Dumez.

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

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

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

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

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


Canonical link: https://commits.webkit.org/184281@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 06:42:43 +00:00
Ryosuke Niwa 6b60be65ac Build fix after r210626. We need to clear Triggerable's static map in each iteration.
* tools/sync-buildbot.js:
(syncLoop):



Canonical link: https://commits.webkit.org/184280@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 05:11:01 +00:00
Joseph Pecoraro 68aa5468be Include SubtleCrypto test on experimental-features test page
https://bugs.webkit.org/show_bug.cgi?id=167226

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

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

Canonical link: https://commits.webkit.org/184278@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-20 03:49:37 +00:00
Ryosuke Niwa c04d49d4b5 Add a mechanism to dispatch and listen to an action
https://bugs.webkit.org/show_bug.cgi?id=167191

Reviewed by Antti Koivisto.

Added the notion of an action to components. Like DOM events, it can be dispatched or listen to.

Also added ComponentBase.prototype.part which finds a sub-component inside a component's shadow tree,
and made ComponentBase.prototype.content take an id to find an element that matches it.

* browser-tests/close-button-tests.js: Added. Tests for CloseButton.
* browser-tests/component-base-tests.js: Added tests for ComponentBase's part(~), content(id), dispatchEvent.
* browser-tests/index.html:
* public/v3/components/base.js:
(ComponentBase): Added this._actionCallbacks, which is a map of an action name to a callback to be invoked.
(ComponentBase.prototype.content): Return an element of the given id if one is specified.
(ComponentBase.prototype.part): Find a component whose element has the matching id.
(ComponentBase.prototype.dispatchAction): Added.
(ComponentBase.prototype.listenToAction): Added.
(ComponentBase.prototype._ensureShadowTree): Call didConstructShadowTree.
(ComponentBase.prototype.didConstructShadowTree): Added.
(ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Copy attributes when instantiating
an element for a component when the browser doesn't support custom elements API.
(ComponentBase.createLink):
(ComponentBase.prototype.createEventHandler): Added.
(ComponentBase.createEventHandler): Renamed from createActionHandler.
* public/v3/components/button-base.js:
(ButtonBase.prototype.didConstructShadowTree): Added. Dispatch "activate" action when the button is clicked.
(ButtonBase.prototype.setCallback): Deleted.
(ButtonBase.htmlTemplate): Use id instead of class so that this.content() can find it.
(ButtonBase.cssTemplate): Updated style rules.
* public/v3/pages/chart-pane.js:
(ChartPane):
(ChartPane.prototype.didConstructShadowTree): Added. Listen to "activate" action on the close button.
(ChartPane.prototype.render): Fixed a bug that we were never calling enqueueToRender on the close button.
(ChartPane.htmlTemplate): Add the id on the close button.


Canonical link: https://commits.webkit.org/184266@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-19 22:58:46 +00:00
Timothy Hatcher a4838a5d31 Add Tesla to the domain associations on the team page
https://bugs.webkit.org/show_bug.cgi?id=167202

Reviewed by Brian Burg.

* wp-content/themes/webkit/team.php:

Canonical link: https://commits.webkit.org/184262@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-19 20:21:14 +00:00
Timothy Hatcher 5978954044 Bugzilla email autocomplete does not work on third email field of advanced search page
https://bugs.webkit.org/show_bug.cgi?id=167204

Reviewed by Alexey Proskuryakov.

* committers-autocomplete.js: Added email3 to SINGLE_EMAIL_INPUTS list.


Canonical link: https://commits.webkit.org/184259@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-19 19:16:22 +00:00
Dewei Zhu 9fe4a3e76c 'buildbot-syncer.js' should be able to determine force build argument from a list of possible repositories.
https://bugs.webkit.org/show_bug.cgi?id=167152

Reviewed by Ryosuke Niwa.

Add 'rootOptions' key which maps to a list of possible repositories.
For a build request, only one of the repositories in the list is valid.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
(BuildbotSyncer._validateAndMergeProperties):
(BuildbotSyncer):
* unit-tests/buildbot-syncer-tests.js:
(sampleiOSConfig):
(sampleiOSConfigWithExpansions):
(createSampleBuildRequest):
(Promise.resolve.then):
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject):


Canonical link: https://commits.webkit.org/184238@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-19 03:19:37 +00:00
Ryosuke Niwa 4f16976ac3 Make calls to render() functions async
https://bugs.webkit.org/show_bug.cgi?id=167151

Reviewed by Andreas Kling.

Make calls to render() async by coalescing calls inside enqueueToRender(), which has been renamed from
updateRendering(). We now queue up all the components and wait until the next animation frame to invoke
render() on all those components.

This reduces render() calls in the summary page of our internal dashboard by 15x from ~9400 to ~600 by
eliminating pathological O(n^2) behavior between render() calls.

Consolidated TimeSeriesChart's enqueueRender into this newly added feature of ComponentBase along with
the support to call render() on a resize event. New implementation makes use of connectedCallback and
disconnectedCallback to avoid the work when the component is not in a document tree.

The rest of the patch concerns with renaming updateRendering to enqueueToRender and fixing a few minor bugs
that I encountered while working on this patch.

* browser-tests/component-base-tests.js: Added tests for ComponentBase.enqueueToRender().
* browser-tests/index.html:
(BrowserContext.prototype.importScripts): Renamed from importScript; Now supports loading multiple scripts.
(BrowserContext.prototype.importScript): Added.
(BrowserContext): Removed the unused createWithScripts.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype._expandBetween):
* public/v3/components/bar-graph-group.js:
(BarGraphGroup.prototype.updateGroupRendering):

* public/v3/components/base.js:
(ComponentBase): When the browser doesn't support custom elements and
(ComponentBase.prototype.enqueueToRender): Renamed from updateRendering. Queues up the component to call
render() instead of immediately invoking it.
(ComponentBase.renderingTimerDidFire): Call render(). Since render() function often calls enqueueToRender
on child components, go ahead and invoke render() on any components enqueued during render() calls.
(ComponentBase._connectedComponentToRenderOnResize): Added.
(ComponentBase._disconnectedComponentToRenderOnResize): Added.
(ComponentBase.defineElement.elementClass.prototype.connectedCallback): Added. This is an optimization to
avoid the work when the component is not in the document; e.g. because the entire page component has been
detached from the document. The old implementation in TimeSeriesChart was not doing this.
(ComponentBase.defineElement.elementClass.prototype.disconnectedCallback): Added.
(ComponentBase): Replaced unused static variables with _componentsToRender and _componentsToRenderOnResize.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.fetchAnalysisTasks):
(ChartPaneBase.prototype.didUpdateAnnotations): Added. Addresses the bug that the annotation bars in the
charts shown an an analysis task doesn't update its color when the state is updated in the UI.
(ChartPaneBase.prototype._mainSelectionDidZoom):
(ChartPaneBase.prototype._updateStatus):
(ChartPaneBase.prototype._requestOpeningCommitViewer):
(ChartPaneBase.prototype._keyup):
(ChartPaneBase.prototype.render):
* public/v3/components/commit-log-viewer.js:
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype._customize):
* public/v3/components/editable-text.js:
(EditableText.prototype._didUpdate):
* public/v3/components/interactive-time-series-chart.js:
* public/v3/components/pane-selector.js:
(PaneSelector.prototype._selectedItem):
* public/v3/components/time-series-chart.js:
(TimeSeriesChart): Removed the logic to update upon resize. See _connectedComponentToRenderOnResize above.
(TimeSeriesChart.prototype.get enqueueToRenderOnResize): Added. Returns true.
(TimeSeriesChart.prototype.enqueueToRender): Deleted.
(TimeSeriesChart._renderEnqueuedCharts): Deleted.
(TimeSeriesChart): Call ComponentBase.defineElement to make this a proper component so that the logic in
connectedCallback to update upon resize event would work.
* public/v3/instrumentation.js:
(Instrumentation.dumpStatistics): Sort results by the key names.
* public/v3/models/time-series.js:
(TimeSeries.prototype.values): Added. This method was never ported to v3 in r198462, and broke the feature
to show moving averages, etc... on the charts page.
* public/v3/pages/analysis-category-page.js:
(AnalysisCategoryPage.prototype.open):
(AnalysisCategoryPage.prototype.updateFromSerializedState):
(AnalysisCategoryPage.prototype.filterDidChange):
(AnalysisCategoryPage.prototype.render):
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype._updateStatus):
(AnalysisTaskPage.prototype.updateFromSerializedState):
(AnalysisTaskPage.prototype._didFetchTask):
(AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks):
(AnalysisTaskPage.prototype._didFetchMeasurement):
(AnalysisTaskPage.prototype._didFetchTestGroups):
(AnalysisTaskPage.prototype._showAllTestGroups):
(AnalysisTaskPage.prototype._didFetchAnalysisResults):
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._renderTestGroupList.):
(AnalysisTaskPage.prototype._renderTestGroupList):
(AnalysisTaskPage.prototype._createTestGroupListItem):
(AnalysisTaskPage.prototype._showTestGroup):
(AnalysisTaskPage.prototype._didStartEditingTaskName):
(AnalysisTaskPage.prototype._updateTaskName):
(AnalysisTaskPage.prototype._updateTestGroupName):
(AnalysisTaskPage.prototype._hideCurrentTestGroup):
(AnalysisTaskPage.prototype._updateChangeType): Fixed the bug that we were never updating annotation bars
in the main chart by calling didUpdateAnnotations.
(AnalysisTaskPage.prototype._associateBug):
(AnalysisTaskPage.prototype._dissociateBug):
(AnalysisTaskPage.prototype._associateCommit):
(AnalysisTaskPage.prototype._dissociateCommit):
(AnalysisTaskPage.prototype._chartSelectionDidChange):
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer):
* public/v3/pages/build-request-queue-page.js:
(BuildRequestQueuePage.prototype.open.):
(BuildRequestQueuePage.prototype.open):
* public/v3/pages/chart-pane.js:
(ChartPane.prototype.setOpenRepository):
(ChartPane.prototype._renderTrendLinePopover): Fixed a race condition. Insert a select element as needed
before trying to assign the current value on it.
(ChartPane.prototype._trendLineTypeDidChange):
(ChartPane.prototype._updateTrendLine):
* public/v3/pages/charts-page.js:
(ChartsPage.prototype.updateFromSerializedState):
(ChartsPage.prototype._updateDomainsFromSerializedState):
(ChartsPage.prototype.setNumberOfDaysFromToolbar):
(ChartsPage.prototype._didMutatePaneList):
(ChartsPage.prototype.render):
* public/v3/pages/charts-toolbar.js:
(ChartsToolbar.prototype.render):
* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage.prototype.updateFromSerializedState):
* public/v3/pages/dashboard-page.js:
(DashboardPage.prototype.updateFromSerializedState):
(DashboardPage.prototype._fetchedData):
* public/v3/pages/heading.js:
(Heading.prototype.render):
* public/v3/pages/page-with-heading.js:
(PageWithHeading.prototype.render):
* public/v3/pages/page.js:
(Page.prototype.open):
* public/v3/pages/summary-page.js:
(SummaryPage.prototype.open):
(SummaryPage.prototype.this._renderQueue.push):
(SummaryPage):
(SummaryPage.prototype._renderCell):


Canonical link: https://commits.webkit.org/184216@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-18 21:22:39 +00:00
Ryosuke Niwa d825eb6f6a Add the build fix for browsers that don't yet support custom elements SPI.
It was supposedly to be a part of the previous commit.

* public/v3/components/base.js:
(ComponentBase.defineElement):



Canonical link: https://commits.webkit.org/184157@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-16 00:14:40 +00:00
Ryosuke Niwa 077c950470 Adopt custom elements API in perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=167045

Reviewed by Darin Adler.

Adopt custom elements API in ComponentBase, and create the shadow tree lazily in content() and render()
instead of eagerly creating it inside the constructor.

For now, create a separate element class for each component in ComponentBase.defineElement instead of
making ComponentBase inherit from HTMLElement to preserve the semantics we have as well as to test
the boundaries of what custom elements API allows for framework authors.

In order to ensure one-to-one correspondence between elements and their components, we use a static map,
ComponentBase._currentlyConstructedByInterface, to remember which element or component is being created
and use that in custom element's constructor to update element.component() and this._element.

Also dropped the support for not having attachShadow as we've shipped this feature in Safari 10.

Finally, added tests to be ran inside a browser to test the front end code in browser-tests.

* browser-tests/component-base-tests.js: Added. Basic tests for ComponentBase.
* browser-tests/index.html: Added.

* public/v3/components/base.js:
(ComponentBase): Don't create the shadow tree. Use the currently constructed element as this._element if
there is one (the custom element's constructor is getting called). Otherwise create a new element but
store this component in the map to avoid creating a new component in the custom element's constructor.
(ComponentBase.prototype.content): Lazily create the shadow tree now.
(ComponentBase.prototype.render): Ditto.
(ComponentBase.prototype._ensureShadowTree): Renamed from _constructShadowTree. Dropped the support for
not having shadow DOM API. This is now required. Also use importNode instead of cloneNode in cloning
the template content since the latter would not get upgraded.
(ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Modernized the code. Don't
re-create a component if its element had already been upgraded by its custom element constructor.
(ComponentBase.defineElement): Add this component to the static maps. _componentByName is used by
_recursivelyReplaceUnknownElementsByComponents to instantiate new components in the browsers that don't
support custom elements API and _componentByClass is used by ComponentBase's constructor to lookup the
element name. The latter should go away once all components fully adopt ComponentBase.defineElement.
(ComponentBase.defineElement.elementClass): A class to define a custom element for the component.
We need to reconfigure the property since class's name is not writable but configurable.

* public/v3/components/button-base.js:
(ButtonBase.htmlTemplate): Added. Extracted the common code from CloseButton and WarningIcon.
(ButtonBase.buttonContent): Added. An abstract method overridden by CloseButton and WarningIcon.
(ButtonBase.sizeFactor): Added. Overridden by WarningIcon.
(ButtonBase.cssTemplate): Updated to use :host.
* public/v3/components/close-button.js:
(CloseButton.buttonContent): Renamed from htmlTemplate.
* public/v3/components/spinner-icon.js:
(SpinnerIcon.cssTemplate): Removed webkit prefixed properties, and updated it to animate stroke instead
of opacity to reduce the power usage.
(SpinnerIcon.htmlTemplate): Factored stroke, stroke-width, and stroke-linecap into cssTemplate.
* public/v3/components/warning-icon.js:
(WarningIcon.cssTemplate): Deleted.
(WarningIcon.sizeFactor): Added.
(WarningIcon.buttonContent): Renamed from htmlTemplate.
* public/v3/pages/summary-page.js:
(SummaryPage._constructRatioGraph): Fixed a bug that we were not never calling spinner.updateRendering().
(SummaryPage.prototype._renderCell):


Canonical link: https://commits.webkit.org/184156@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-16 00:12:22 +00:00
Ryosuke Niwa 91939c0205 Instrument calls to render()
https://bugs.webkit.org/show_bug.cgi?id=167037

Reviewed by Sam Weinig.

Wrap every call to render() by newly added ComponentBase.updateRendering() to instrument it.
Also, use arrow functions instead of this.render.bind or regular closures for simplicity.

Currently, we're making 5100 calls to render() while opening the summary page, and that's way too high.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype._expandBetween):
* public/v3/components/bar-graph-group.js:
(BarGraphGroup.prototype.updateGroupRendering): Renamed form render() as BarGraphGroup is not a component.
* public/v3/components/base.js:
(ComponentBase.prototype.updateRendering): Added. Instruments render() call.
* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.fetchAnalysisTasks):
(ChartPaneBase.prototype._mainSelectionDidZoom):
(ChartPaneBase.prototype._updateStatus):
(ChartPaneBase.prototype._requestOpeningCommitViewer):
(ChartPaneBase.prototype._keyup):
(ChartPaneBase.prototype.render):
* public/v3/components/commit-log-viewer.js:
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype._customize):
* public/v3/components/editable-text.js:
(EditableText.prototype._didUpdate):
* public/v3/components/pane-selector.js:
(PaneSelector.prototype._selectedItem):
* public/v3/components/results-table.js:
(ResultsTable.prototype.render):
* public/v3/components/time-series-chart.js:
(TimeSeriesChart._renderEnqueuedCharts):
* public/v3/pages/analysis-category-page.js:
(AnalysisCategoryPage.prototype.open):
(AnalysisCategoryPage.prototype.updateFromSerializedState):
(AnalysisCategoryPage.prototype.filterDidChange):
(AnalysisCategoryPage.prototype.render):
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype._updateStatus):
(AnalysisTaskPage.prototype.updateFromSerializedState):
(AnalysisTaskPage.prototype._didFetchTask):
(AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks):
(AnalysisTaskPage.prototype._didFetchMeasurement):
(AnalysisTaskPage.prototype._didFetchTestGroups):
(AnalysisTaskPage.prototype._showAllTestGroups):
(AnalysisTaskPage.prototype._didFetchAnalysisResults):
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._renderTestGroupList.):
(AnalysisTaskPage.prototype._renderTestGroupList):
(AnalysisTaskPage.prototype._createTestGroupListItem):
(AnalysisTaskPage.prototype._showTestGroup):
(AnalysisTaskPage.prototype._didStartEditingTaskName):
(AnalysisTaskPage.prototype._updateTaskName):
(AnalysisTaskPage.prototype._updateTestGroupName):
(AnalysisTaskPage.prototype._hideCurrentTestGroup):
(AnalysisTaskPage.prototype._updateChangeType):
(AnalysisTaskPage.prototype._associateBug):
(AnalysisTaskPage.prototype._dissociateBug):
(AnalysisTaskPage.prototype._associateCommit):
(AnalysisTaskPage.prototype._dissociateCommit):
(AnalysisTaskPage.prototype._chartSelectionDidChange):
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer):
* public/v3/pages/build-request-queue-page.js:
(BuildRequestQueuePage.prototype.open.):
(BuildRequestQueuePage.prototype.open):
* public/v3/pages/chart-pane.js:
(ChartPane.prototype.setOpenRepository):
(ChartPane.prototype._trendLineTypeDidChange):
(ChartPane.prototype._updateTrendLine):
* public/v3/pages/charts-page.js:
(ChartsPage.prototype.updateFromSerializedState):
(ChartsPage.prototype._updateDomainsFromSerializedState):
(ChartsPage.prototype.setNumberOfDaysFromToolbar):
(ChartsPage.prototype._didMutatePaneList):
(ChartsPage.prototype.render):
* public/v3/pages/charts-toolbar.js:
(ChartsToolbar.prototype.render):
* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage.prototype.updateFromSerializedState):
* public/v3/pages/dashboard-page.js:
(DashboardPage.prototype.updateFromSerializedState):
(DashboardPage.prototype._fetchedData):
* public/v3/pages/heading.js:
(Heading.prototype.render):
* public/v3/pages/page-with-heading.js:
(PageWithHeading.prototype.render):
* public/v3/pages/page.js:
(Page.prototype.open):
* public/v3/pages/summary-page.js:
(SummaryPage.prototype.open):
(SummaryPage.prototype.this._renderQueue.push):
(SummaryPage):
(SummaryPage.prototype._renderCell):


Canonical link: https://commits.webkit.org/184128@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-14 02:53:57 +00:00
Ryosuke Niwa 5da79b5484 Outliers are not hidden in v3 UI
https://bugs.webkit.org/show_bug.cgi?id=166966

Reviewed by Andreas Kling.

Fixed the typo in addToSeries. An outlier has markedOutlier set to true, not isOutlier.

Also fixed a bug unveiled by new tests in MeasurementRootSet.ensureSingleton. It was was creating
a new MeasurementRootSet each time it was called instead of finding an existing instance. Fixed the bug
by merging the static maps of MeasurementRootSet and RootSet.

* public/v3/models/measurement-cluster.js:
(MeasurementCluster.prototype.addToSeries): Fixed the bug.
* public/v3/models/root-set.js:
(MeasurementRootSet.prototype.namedStaticMap): Added.
(MeasurementRootSet.prototype.ensureNamedStaticMap): Added.
(MeasurementRootSet.namedStaticMap): Added.
(MeasurementRootSet.ensureNamedStaticMap): Added.
* unit-tests/measurement-set-tests.js: Added tests for adopting time series data from a cluster.


Canonical link: https://commits.webkit.org/184081@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-12 19:32:20 +00:00
Ryosuke Niwa 507402567f Hide the UI to trigger an A/B testing when there are no triggerables
https://bugs.webkit.org/show_bug.cgi?id=166964

Reviewed by Yusuke Suzuki.

Hide the "Start A/B Testing" button on analysis task pages instead of showing it and failing later
when the user tries to create one it with a TriggerableNotFound error.

Added the list of triggerables to the manifest JSON so that we can determine this condition without
having to fetch /api/triggerable for each analysis task as done in v2 UI.

* public/admin/reprocess-report.php:
* public/api/manifest.php:
* public/api/report.php:
* public/include/admin-header.php:
* public/include/manifest-generator.php: Moved from public/include/manifest.php.
(ManifestGenerator::generate):
(ManifestGenerator::triggerables): Added. Include the list of repositories this triggerable accepts
as well as the list of (test, platform) pairs on which this triggerable is available.
Use [testId, platformId] instead of a dictionary to reduce the file size.
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm): Removed this._disabled. This variable was used in TestGroupFrom to
disable the "Start A/B Testing" button when no range is selected but this ended up racy. Compute
the visibility of the button in render() function instead.
(CustomizableTestGroupForm.prototype.setRootSetMap):
(CustomizableTestGroupForm.prototype._submitted):
(CustomizableTestGroupForm.prototype.render): Hide the customize link and the button as needed.
The "Start A/B Testing" button must be hidden when either no range is selected or no title is typed.
"Customize" button must be hidden when no range is selected.
* public/v3/components/test-group-form.js:
(TestGroupForm): Removed _disabled since it's no longer used.
(TestGroupForm.prototype.setDisabled): Ditto.
(TestGroupForm.prototype.render): Ditto.
* public/v3/index.html: Include triggerable.js.
* public/v3/models/manifest.js:
(Manifest._didFetchManifest): Modernized. Create Triggerable objects from the manifest JSON.
* public/v3/models/triggerable.js: Added.
(Triggerable): Add this triggerable object to the static map of (test id, platform id) pair.
(Triggerable.prototype.acceptedRepositories): Added.
(Triggerable.findByTestConfiguration): Added. Finds a triggerable in the aforementioned static map.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype._updateStatus): Added. Re-render the page since time series data
points that were previously not available may have become available. The lack of this update was
causing a race condition in which the "Start A/B Testing" button for the charts is disabled even
after a group name had been specified because setRootSetMap was never called with a valid set.
(AnalysisTaskPage): Added this._triggerable.
(AnalysisTaskPage.prototype._didFetchTask): Find the triggerable now that we've fetched the task.
(AnalysisTaskPage.prototype.render): Hide the group view (the table of A/B testing results) entirely
when there are no groups to show. Also hide the forms to start A/B testing when there are no matching
triggerable, which is the main feature of this patch.
* server-tests/api-manifest.js: Added a test for including a list of triggerables in the manifest JSON.
* server-tests/resources/mock-data.js:
(MockData.resetV3Models): Reset Triggerable's static map.
* server-tests/tools-buildbot-triggerable-tests.js: Assert that Triggerable objects are  constructed
with appropriate list of repositories and (test, platform) associations.
* tools/js/database.js:
(tableToPrefixMap): Added triggerable_repositories's prefix.
* tools/js/remote.js:
(RemoteAPI.prototype.getJSON): Log the entire response to stderr when JSON.parse fails to aid debugging.
* tools/js/v3-models.js: Import triggerable.js.


Canonical link: https://commits.webkit.org/184066@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-12 07:18:28 +00:00
Ryosuke Niwa 39ab12b6b7 fetch-from-remote doesn’t work with some websites
https://bugs.webkit.org/show_bug.cgi?id=166963

Reviewed by Yusuke Suzuki.

Apparently file_get_contents is not compatible with some SSL/TLS connections.
Use curl_* functions to access remote servers instead.

* public/admin/fetch-from-remote.php:
(fetch_remote):


Canonical link: https://commits.webkit.org/184065@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-12 06:50:16 +00:00
Ryosuke Niwa 4b1fd06daf Another build fix. Always use UTC when expressing commit times in UNIX-epoch timestamps.
* public/api/measurement-set.php:



Canonical link: https://commits.webkit.org/184022@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-11 07:53:17 +00:00
Ryosuke Niwa d2b590e090 Fix a typo in the previous commit.
* public/api/measurement-set.php:



Canonical link: https://commits.webkit.org/184021@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-11 04:53:53 +00:00
Ryosuke Niwa ac820c0869 Build fixes for older versions of Postgres.
Also redirect / and /# to /v3/ as intended in r200820.

* public/api/measurement-set.php:
* public/api/runs.php:
* public/index.html:



Canonical link: https://commits.webkit.org/184020@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-11 04:51:12 +00:00
Keith Miller 074f2efb2a Add BitOr for floating points to B3
https://bugs.webkit.org/show_bug.cgi?id=166446

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch does some slight refactoring to the ARM assembler,
which groups all the vector floating point instructions together.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::vand):
(JSC::ARM64Assembler::vorr):
(JSC::ARM64Assembler::vectorDataProcessingLogical):
(JSC::ARM64Assembler::vectorDataProcessing2Source): Deleted.
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::orDouble):
(JSC::MacroAssemblerARM64::orFloat):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::orDouble):
(JSC::MacroAssemblerX86Common::orFloat):
* assembler/X86Assembler.h:
(JSC::X86Assembler::orps_rr):
* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::bitOrConstant):
(JSC::B3::ConstDoubleValue::bitXorConstant):
* b3/B3ConstDoubleValue.h:
* b3/B3ConstFloatValue.cpp:
(JSC::B3::ConstFloatValue::bitOrConstant):
(JSC::B3::ConstFloatValue::bitXorConstant):
* b3/B3ConstFloatValue.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Validate.cpp:
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::shouldTryAliasingDef):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::bitOrDouble):
(JSC::B3::testBitOrArgDouble):
(JSC::B3::testBitOrArgsDouble):
(JSC::B3::testBitOrArgImmDouble):
(JSC::B3::testBitOrImmsDouble):
(JSC::B3::bitOrFloat):
(JSC::B3::testBitOrArgFloat):
(JSC::B3::testBitOrArgsFloat):
(JSC::B3::testBitOrArgImmFloat):
(JSC::B3::testBitOrImmsFloat):
(JSC::B3::testBitOrArgsFloatWithUselessDoubleConversion):
(JSC::B3::run):

Websites/webkit.org:

Update docs to indicate it's cool to use bit ops with floating point.

* docs/b3/intermediate-representation.html:

Canonical link: https://commits.webkit.org/183728@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-23 01:19:55 +00:00
Dean Jackson fd1eaeea1d Remove runtime toggle for pointer-lock
https://bugs.webkit.org/show_bug.cgi?id=165577
<rdar://problems/29566996>

Reviewed by Jon Lee.

Source/WebCore:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

Covered by existing tests.

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled): Deleted.
* dom/Document.idl:
* dom/Element.idl:
* page/Page.h:
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
(WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):

Source/WebKit/mac:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences pointerLockEnabled]): Deleted.
(-[WebPreferences setPointerLockEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPointerLockEnabled): Deleted.
(WKPreferencesGetPointerLockEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

Websites/webkit.org:

No need to have pointer-lock tested.

* experimental-features.html: Also sort the list alphabetically.

LayoutTests:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

* platform/mac/TestExpectations: Enable the pointer-lock tests that should work.
* pointer-lock/pointer-lock-api.html: Fix a bad DOM call.
* pointer-lock/pointerlock-interface-disabled-expected.txt: Removed.
* pointer-lock/pointerlock-interface-disabled.html: Removed.

Canonical link: https://commits.webkit.org/183176@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-08 02:53:41 +00:00
Dean Jackson 0c21467a38 pointer lock needs to be feature detectable
https://bugs.webkit.org/show_bug.cgi?id=165426
<rdar://problem/29486715>

Reviewed by Antoine Quint.

Source/WebCore:

Annotate the public-facing API for pointer-lock, so
that it is hidden when not available.

Also move the Setting to a RuntimeEnabledFeature, since
pointer-lock is exposed from WebKit as a feature.

Tests: pointer-lock/pointerlock-interface-disabled.html
       pointer-lock/pointerlock-interface.html

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
* dom/Document.idl:
* dom/Element.idl:
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
* page/Settings.in:

Source/WebKit/mac:

Set the RuntimeEnabledFeature as preferences
change.

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

Source/WebKit2:

Set the RuntimeEnabledFeature as preferences
change.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPointerLockEnabled):
(WKPreferencesGetPointerLockEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Expose the comment line to turn on/off pointer lock.

* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::viewSupportsOptions):

Websites/webkit.org:

We can now accurately detect pointer-lock.

* experimental-features.html:

LayoutTests:

Checks that the API is hidden when the feature is turned off.

* pointer-lock/pointerlock-interface-disabled-expected.txt: Added.
* pointer-lock/pointerlock-interface-disabled.html: Added.
* pointer-lock/pointerlock-interface-expected.txt: Added.
* pointer-lock/pointerlock-interface.html: Added.

Canonical link: https://commits.webkit.org/183034@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-05 23:48:15 +00:00
Dean Jackson 50299403c9 Make a public facing page to check for WebKit features
https://bugs.webkit.org/show_bug.cgi?id=165331
<rdar://problem/29488535>

Reviewed by Antoine Quint.

Add a web page to webkit.org that allows us to live
detect our experimental features. This is mostly for
internal debugging, but also provides simple examples
of how real content would do such detection.

* experimental-features.html: Added.

Canonical link: https://commits.webkit.org/182963@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-03 01:20:48 +00:00
Keith Miller 8313660f4f Add rotate to Wasm
https://bugs.webkit.org/show_bug.cgi?id=164871

Reviewed by Filip Pizlo.

JSTests:

* wasm/wasm.json:

Source/JavaScriptCore:

Add rotate left and rotate right to Wasm. These directly map to B3 opcodes.
This also moves arm specific transformations of rotate left to lower macros
after optimization. It's a bad idea to have platform specific canonicalizations
in reduce strength since other optimizations may not be aware of it.

Add a bug to do pure CSE after lower macros after optimization since we want to
clean up RotL(value, Neg(Neg(shift))).

* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3LowerMacrosAfterOptimizations.cpp:
* b3/B3ReduceStrength.cpp:
* wasm/wasm.json:

Websites/webkit.org:

Update docs for new rotate instructions.

* docs/b3/intermediate-representation.html:


Canonical link: https://commits.webkit.org/182566@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-17 19:21:42 +00:00
Keith Miller 2ea19e682e Expand Trunc in B3 to support Double to Float
https://bugs.webkit.org/show_bug.cgi?id=163809

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

This feature is useful for passing floating point arguments via registers.
Currently, ArgumentRegValue returns a the full 64-bit register. Thus, we
need a way to indicate to B3 that we only want the low 32-bits.

* b3/B3Common.h:
(JSC::B3::isIdentical):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::typeFor):
* b3/testb3.cpp:
(JSC::B3::testAddFPRArgsFloat):
(JSC::B3::testCeilArgWithEffectfulDoubleConversion):
(JSC::B3::testFloorArgWithEffectfulDoubleConversion):
(JSC::B3::testDoubleProducerPhiToFloatConversionWithDoubleConsumer):
(JSC::B3::run):

Websites/webkit.org:

Update the docs to explain that Trunc now works with fleating point numbers.

Reviewed by Geoffrey Garen.

* docs/b3/intermediate-representation.html:


Canonical link: https://commits.webkit.org/181575@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-21 22:20:05 +00:00
Dewei Zhu 2b64a7cd8d Update test cases for change r206465.
https://bugs.webkit.org/show_bug.cgi?id=163618

Reviewed by Ryosuke Niwa.

Update test case for change r206465 which added support for multiple summary pages.
Use deepStrictEqual instead of deepEqual as deepEqual will not complain in the case like 'deepEqual([],{})'.
Fix a test failure in tools-buildbot-triggerable-tests.js.
Fix a bug in generating manifest.

* config.json:
* public/include/manifest.php:
* server-tests/api-manifest.js:
(TestServer.remoteAPI.getJSON.string_appeared_here.then):
* server-tests/tools-buildbot-triggerable-tests.js:
(then):


Canonical link: https://commits.webkit.org/181405@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-18 22:22:55 +00:00
Keith Miller fac30d4219 B3 needs a special WasmAddress Opcode
https://bugs.webkit.org/show_bug.cgi?id=163394

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch adds support for WasmAddress. WasmAddress will be used by
Wasm to compute the address of a memory operation from the pinned
base pointer. WasmAddress takes an IntPtr so we can avoid emitting
unnecessary Move32s in Air. This could happen in the following case:

@ptr = Trunc(...)
WasmAddress(@ptr, pinnedGPR)
...
PatchPoint(...) // Do Wasm call
WasmAddress(@ptr, pinnedGPR)
...

In this case we will not be able to CSE the WasmAddresses since the
call writes to pinnedGPR. Thus if WasmAddress took an Int32 we would need
to emit an extra Move32 at the second WasmAddress to ensure it saw a proper
32-bit value. If Wasm ensures that there there is a leading ZExt32 then
the duplicated moves become unnecessary.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
* b3/B3WasmAddressValue.cpp: Added.
(JSC::B3::WasmAddressValue::~WasmAddressValue):
(JSC::B3::WasmAddressValue::dumpMeta):
(JSC::B3::WasmAddressValue::cloneImpl):
(JSC::B3::WasmAddressValue::WasmAddressValue):
* b3/B3WasmAddressValue.h: Added.
* b3/testb3.cpp:
(JSC::B3::testWasmAddress):
(JSC::B3::run):

Websites/webkit.org:

Update the b3 docs for the new WasmAddress opcode.

* docs/b3/intermediate-representation.html:

Canonical link: https://commits.webkit.org/181278@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-14 23:22:07 +00:00
Simon Fraser 8dbb05f31e Annotate bots in contributors.json and don't show them on webkit.org/team
https://bugs.webkit.org/show_bug.cgi?id=163317

Reviewed by Daniel Bates.

Tools:

Add "class" : "bot" for non-humans in contributors.json and round-trip it.

* Scripts/webkitpy/common/config/committers.py:
(Contributor.__init__):
(Contributor.as_dict):
(Bot):
(Bot.__init__):
(CommitterList.load_json):
* Scripts/webkitpy/common/config/contributors.json:

Websites/webkit.org:

Don't show bots.

* wp-content/themes/webkit/team.php:

Canonical link: https://commits.webkit.org/181269@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-14 18:26:44 +00:00
Keith Miller 334482d9f9 B3 needs a special WasmBoundsCheck Opcode
https://bugs.webkit.org/show_bug.cgi?id=163246

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch adds a new Opcode, WasmBoundsCheck, as well as a B3::Value subclass for it,
WasmBoundsCheckValue. WasmBoundsCheckValue takes three pieces of information. The first is
the Int32 pointer value used to be used by the Load.  Next is the pinned register. The
pinned register must be pinned by calling proc.setPinned() prior to compiling the
Procedure. Lastly, the WasmBoundsCheckValue takes an offset. The WasmBoundsCheckValue is
will then emit code that side-exits if the Int64 sum of the offset and pointer is greater
than or equal to the value in the pinnedRegister. Instead of taking a generator for each
value like Check/Patchpoint, WasmBoundsCheck gets its generator directly off Air::Code. In
Air this patch adds a new Custom opcode, WasmBoundsCheck.

In the future we should add WasmBoundsCheck to CSE so it can eliminate redundant bounds
checks. At the first cut, we can remove any WasmBoundsCheck dominated by another
WasmBoundsCheck with the same pointer and pinnedGPR, and a larger offset.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::setWasmBoundsCheckGenerator):
* b3/B3Procedure.h:
(JSC::B3::Procedure::setWasmBoundsCheckGenerator):
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::typeFor):
* b3/B3WasmBoundsCheckValue.cpp: Added.
(JSC::B3::WasmBoundsCheckValue::~WasmBoundsCheckValue):
(JSC::B3::WasmBoundsCheckValue::WasmBoundsCheckValue):
(JSC::B3::WasmBoundsCheckValue::dumpMeta):
* b3/B3WasmBoundsCheckValue.h: Added.
(JSC::B3::WasmBoundsCheckValue::accepts):
(JSC::B3::WasmBoundsCheckValue::pinnedGPR):
(JSC::B3::WasmBoundsCheckValue::offset):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::setWasmBoundsCheckGenerator):
(JSC::B3::Air::Code::wasmBoundsCheckGenerator):
* b3/air/AirCustom.cpp:
(JSC::B3::Air::WasmBoundsCheckCustom::isValidForm):
* b3/air/AirCustom.h:
(JSC::B3::Air::WasmBoundsCheckCustom::forEachArg):
(JSC::B3::Air::WasmBoundsCheckCustom::isValidFormStatic):
(JSC::B3::Air::WasmBoundsCheckCustom::admitsStack):
(JSC::B3::Air::WasmBoundsCheckCustom::isTerminal):
(JSC::B3::Air::WasmBoundsCheckCustom::hasNonArgNonControlEffects):
(JSC::B3::Air::WasmBoundsCheckCustom::generate):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testWasmBoundsCheck):
(JSC::B3::run):

Websites/webkit.org:

Update the docs for the new WasmBoundsCheck opcode.

* docs/b3/intermediate-representation.html:


Canonical link: https://commits.webkit.org/181195@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-13 01:42:53 +00:00
Simon Fraser