| 31 |
31 |
|
// `Tone::token` is the trait method, and `data-tone` is spelled from it rather
|
| 32 |
32 |
|
// than from a match here, so a tone added upstream cannot be named two ways.
|
| 33 |
33 |
|
use makeover_layout::Intent as _;
|
| 34 |
|
- |
use makeover_webview::figure::figure_html;
|
| 35 |
|
- |
use makeover_webview::form::{Filling, Markup, Value, escape_into, field_html};
|
|
34 |
+ |
use makeover_webview::figure::figure_html_into;
|
|
35 |
+ |
use makeover_webview::form::{Filling, Markup, Value, escape_into, field_html_into};
|
| 36 |
36 |
|
// `class`, `option_class` and the two part-class mappings below are makeover's,
|
| 37 |
37 |
|
// not copies of it. They were copies until makeover-webview 0.27.0 made them
|
| 38 |
38 |
|
// public: the prefix helper was byte-identical, and the row and cell part names
|
| 44 |
44 |
|
// is the described one. Aliased rather than qualified at the call site, so the
|
| 45 |
45 |
|
// two never read as the same type.
|
| 46 |
46 |
|
use makeover_webview::list::{
|
| 47 |
|
- |
Cell as Emitted, cell_part_class, cells_html, column_classes, part_class,
|
|
47 |
+ |
Cell as Emitted, cell_part_class, cells_html_into, part_class, push_column_classes,
|
| 48 |
48 |
|
};
|
| 49 |
|
- |
use makeover_webview::meter::meter_html;
|
| 50 |
|
- |
use makeover_webview::placeholder::placeholder_html;
|
|
49 |
+ |
use makeover_webview::meter::meter_html_into;
|
|
50 |
+ |
use makeover_webview::placeholder::placeholder_html_into;
|
| 51 |
51 |
|
use quasi_router::screen::{Act, Cell, Cells, Destination, Field, Node, Row, Slot, Tag};
|
| 52 |
52 |
|
use quasi_router::{Action, Method, Params};
|
| 53 |
53 |
|
|
| 170 |
170 |
|
}
|
| 171 |
171 |
|
|
| 172 |
172 |
|
field.with_layout(|borrowed| {
|
| 173 |
|
- |
out.push_str(&field_html(&borrowed, &filling, opts));
|
|
173 |
+ |
field_html_into(&borrowed, &filling, opts, out);
|
| 174 |
174 |
|
});
|
| 175 |
175 |
|
|
| 176 |
176 |
|
if writes.is_some() {
|
| 719 |
719 |
|
Node::Rich { source } => out.push_str(&docengine::render_phrase(source)),
|
| 720 |
720 |
|
Node::Token(tag) => tag_html(tag, morphs, opts, out),
|
| 721 |
721 |
|
Node::Act(act) => act_html(act, morphs, opts, out),
|
| 722 |
|
- |
Node::Meter(meter) => out.push_str(&meter_html(&meter.as_layout(), opts)),
|
|
722 |
+ |
Node::Meter(meter) => meter_html_into(&meter.as_layout(), opts, out),
|
| 723 |
723 |
|
// Every other leaf the model admits into a run. A link in a row and a
|
| 724 |
724 |
|
// figure in a row were the two gaps the enumeration left open and could
|
| 725 |
725 |
|
// not close without a `RowPart` variant each; here they arrive by
|
| 933 |
933 |
|
content: Markup(value),
|
| 934 |
934 |
|
})
|
| 935 |
935 |
|
.collect();
|
| 936 |
|
- |
out.push_str(&cells_html(columns, &emitted, opts));
|
|
936 |
+ |
cells_html_into(columns, &emitted, opts, out);
|
| 937 |
937 |
|
|
| 938 |
938 |
|
out.push_str("</div>");
|
| 939 |
939 |
|
}
|
| 985 |
985 |
|
if let Some(act) = act {
|
| 986 |
986 |
|
act_html(act, morphs, opts, &mut way_out);
|
| 987 |
987 |
|
}
|
| 988 |
|
- |
out.push_str(&placeholder_html(
|
|
988 |
+ |
placeholder_html_into(
|
| 989 |
989 |
|
*state,
|
| 990 |
990 |
|
message,
|
| 991 |
991 |
|
(!way_out.is_empty()).then_some(Markup(way_out.as_str())),
|
| 992 |
992 |
|
opts,
|
| 993 |
|
- |
));
|
|
993 |
+ |
out,
|
|
994 |
+ |
);
|
| 994 |
995 |
|
}
|
| 995 |
996 |
|
|
| 996 |
997 |
|
Node::Rich { source } => {
|
| 1022 |
1023 |
|
// One figure, through the same emitter the strip uses. What differs is
|
| 1023 |
1024 |
|
// that nothing wraps it: the run it sits in is already the grouping.
|
| 1024 |
1025 |
|
Node::Figure(figure) => {
|
| 1025 |
|
- |
out.push_str(&figure_html(&figure.as_layout(), opts));
|
|
1026 |
+ |
figure_html_into(&figure.as_layout(), opts, out);
|
| 1026 |
1027 |
|
}
|
| 1027 |
1028 |
|
|
| 1028 |
1029 |
|
Node::Image(picture) => {
|
| 1193 |
1194 |
|
out.push_str(" class=\"");
|
| 1194 |
1195 |
|
class_into("table-heading", opts, out);
|
| 1195 |
1196 |
|
out.push(' ');
|
| 1196 |
|
- |
escape_into(&column_classes(column, opts), out);
|
|
1197 |
+ |
// Not escaped, unlike every other app-supplied string here.
|
|
1198 |
+ |
// makeover reduces a column name to identifier characters
|
|
1199 |
+ |
// rather than escaping it (0.41.0), because the same name is
|
|
1200 |
+ |
// written into a CSS selector by `narrowing_css` and an escaped
|
|
1201 |
+ |
// one would be safe in the attribute and unmatchable from the
|
|
1202 |
+ |
// stylesheet. Escaping the result again would encode nothing
|
|
1203 |
+ |
// and is the one way this heading could stop matching the cells
|
|
1204 |
+ |
// below it.
|
|
1205 |
+ |
push_column_classes(out, column, opts);
|
| 1197 |
1206 |
|
out.push('"');
|
| 1198 |
1207 |
|
// `aria-sort` is what a table actually says about its order;
|
| 1199 |
1208 |
|
// the caret in `state_rules` is this renderer's expression of
|
| 1253 |
1262 |
|
// same reason the field markup is: a second emitter here would be the
|
| 1254 |
1263 |
|
// same anatomy with a different escaping story, and the CSS it has to
|
| 1255 |
1264 |
|
// match is emitted there too.
|
| 1256 |
|
- |
Node::Meter(meter) => out.push_str(&meter_html(&meter.as_layout(), opts)),
|
|
1265 |
+ |
Node::Meter(meter) => meter_html_into(&meter.as_layout(), opts, out),
|
| 1257 |
1266 |
|
|
| 1258 |
1267 |
|
// The strip and its tones are makeover-webview's too, and the actions
|
| 1259 |
1268 |
|
// are this crate's: a figure that answers a click becomes a control
|
| 1271 |
1280 |
|
class_attr(&["figure-act"], opts, out);
|
| 1272 |
1281 |
|
action_attrs(action, Fires::Click, None, morphs, None, out);
|
| 1273 |
1282 |
|
out.push('>');
|
| 1274 |
|
- |
out.push_str(&figure_html(&figure.as_layout(), opts));
|
|
1283 |
+ |
figure_html_into(&figure.as_layout(), opts, out);
|
| 1275 |
1284 |
|
out.push_str(close);
|
| 1276 |
1285 |
|
}
|
| 1277 |
|
- |
None => out.push_str(&figure_html(&figure.as_layout(), opts)),
|
|
1286 |
+ |
None => figure_html_into(&figure.as_layout(), opts, out),
|
| 1278 |
1287 |
|
}
|
| 1279 |
1288 |
|
}
|
| 1280 |
1289 |
|
out.push_str("</div>");
|