Skip to content

Commit 8f4a575

Browse files
committed
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
1 parent 1920b51 commit 8f4a575

15 files changed

Lines changed: 5719 additions & 64 deletions

File tree

Websites/browserbench.org/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2017-08-23 Ryosuke Niwa <rniwa@webkit.org>
2+
3+
Merge the latest version of Speedometer 2.0 to browserbench.org against at r221126.
4+
5+
Rubber-stamped by Yusuke Suzuki.
6+
7+
* Speedometer2.0: Replaced with PerformanceTests/Speedometer.
8+
* Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/app.js:
9+
* Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/todomvc.css:
10+
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/footer.js:
11+
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/index.js:
12+
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/item.js:
13+
* Speedometer2.0/resources/todomvc/architecture-examples/preact/src/app/util.js:
14+
(export.uuid):
15+
116
2017-08-23 Ryosuke Niwa <rniwa@webkit.org>
217

318
Merge the latest version of Speedometer 2.0 to browserbench.org against at r221119.

Websites/browserbench.org/Speedometer2.0/resources/todomvc/architecture-examples/preact/README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
# Preact TodoMVC
1+
# Speedometer 2.0: Preact TodoMVC example
22

3-
[**Demo**](https://preact-todomvc.surge.sh)
3+
## Test locally
44

5-
TodoMVC done in [Preact]. The app is 6kb of minified + gzipped JavaScript.
5+
1. `npm install`
6+
2. `npm start`
67

7-
This is an ES6 + Preact port of the [ES5 + React TodoMVC example](https://github.com/tastejs/todomvc/tree/gh-pages/examples/react).
8+
## Build
89

9-
[preact]: https://github.com/developit/preact
10+
1. `npm run build`
1011

11-
## Building
12-
13-
Run `npm install` followed by `npm run build` to build the project.
14-
15-
## Speedometer instructions
12+
## Notes
1613

1714
The compiled version of the application can be found in the `build` directory.
1815
This is what the benchmark runner uses when running the Preact TodoMVC as part

Websites/browserbench.org/Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Websites/browserbench.org/Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/app.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Websites/browserbench.org/Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
<html lang="en" data-framework="preact">
33
<head>
44
<meta charset="utf-8">
5-
<title>Preact TodoMVC</title>
5+
<title>Preact TodoMVC example</title>
66
<link rel="stylesheet" href="todomvc-common/base.css">
77
<link rel="stylesheet" href="todomvc.css">
88
</head>
99
<body>
1010
<section class="todoapp"></section>
1111
<footer class="info">
1212
<p>Double-click to edit a todo</p>
13-
<p>Created by <a href="http://github.com/petehunt/">petehunt</a></p>
1413
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
1514
</footer>
1615
<script src="app.js"></script>

Websites/browserbench.org/Speedometer2.0/resources/todomvc/architecture-examples/preact/dist/todomvc.css

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -112,28 +112,32 @@ body {
112112
border-top: 1px solid #e6e6e6;
113113
}
114114

115-
label[for='toggle-all'] {
116-
display: none;
117-
}
118-
119115
.toggle-all {
116+
text-align: center;
117+
border: none; /* Mobile Safari */
118+
opacity: 0;
120119
position: absolute;
121-
top: -55px;
122-
left: -12px;
120+
}
121+
122+
.toggle-all + label {
123123
width: 60px;
124124
height: 34px;
125-
text-align: center;
126-
border: none; /* Mobile Safari */
125+
font-size: 0;
126+
position: absolute;
127+
top: -52px;
128+
left: -13px;
129+
-webkit-transform: rotate(90deg);
130+
transform: rotate(90deg);
127131
}
128132

129-
.toggle-all:before {
133+
.toggle-all + label:before {
130134
content: '❯';
131135
font-size: 22px;
132136
color: #e6e6e6;
133137
padding: 10px 27px 10px 27px;
134138
}
135139

136-
.toggle-all:checked:before {
140+
.toggle-all:checked + label:before {
137141
color: #737373;
138142
}
139143

@@ -183,18 +187,27 @@ label[for='toggle-all'] {
183187
appearance: none;
184188
}
185189

186-
.todo-list li .toggle:after {
187-
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#ededed" stroke-width="3"/></svg>');
190+
.todo-list li .toggle {
191+
opacity: 0;
188192
}
189193

190-
.todo-list li .toggle:checked:after {
191-
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="-10 -18 100 135"><circle cx="50" cy="50" r="50" fill="none" stroke="#bddad5" stroke-width="3"/><path fill="#5dc2af" d="M72 25L42 71 27 56l-4 4 20 20 34-52z"/></svg>');
194+
.todo-list li .toggle + label {
195+
/*
196+
Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433
197+
IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/
198+
*/
199+
background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E');
200+
background-repeat: no-repeat;
201+
background-position: center left;
202+
}
203+
204+
.todo-list li .toggle:checked + label {
205+
background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E');
192206
}
193207

194208
.todo-list li label {
195209
word-break: break-all;
196-
padding: 15px 60px 15px 15px;
197-
margin-left: 45px;
210+
padding: 15px 15px 15px 60px;
198211
display: block;
199212
line-height: 1.2;
200213
transition: color 0.4s;
@@ -350,13 +363,6 @@ html .clear-completed:active {
350363
.todo-list li .toggle {
351364
height: 40px;
352365
}
353-
354-
.toggle-all {
355-
-webkit-transform: rotate(90deg);
356-
transform: rotate(90deg);
357-
-webkit-appearance: none;
358-
appearance: none;
359-
}
360366
}
361367

362368
@media (max-width: 430px) {

0 commit comments

Comments
 (0)