@react-x11/components 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/code-editor/node.d.ts +13 -0
- package/dist/code-editor/node.d.ts.map +1 -1
- package/dist/code-editor/node.js +23 -5
- package/dist/code-editor/node.js.map +1 -1
- package/dist/html/css/cascade.d.ts +171 -26
- package/dist/html/css/cascade.d.ts.map +1 -1
- package/dist/html/css/cascade.js +616 -216
- package/dist/html/css/cascade.js.map +1 -1
- package/dist/html/css/color.d.ts +25 -0
- package/dist/html/css/color.d.ts.map +1 -1
- package/dist/html/css/color.js +307 -19
- package/dist/html/css/color.js.map +1 -1
- package/dist/html/css/content.d.ts +11 -6
- package/dist/html/css/content.d.ts.map +1 -1
- package/dist/html/css/content.js +171 -12
- package/dist/html/css/content.js.map +1 -1
- package/dist/html/css/parse.d.ts.map +1 -1
- package/dist/html/css/parse.js +62 -9
- package/dist/html/css/parse.js.map +1 -1
- package/dist/html/css/shapes.d.ts +18 -0
- package/dist/html/css/shapes.d.ts.map +1 -1
- package/dist/html/css/shapes.js +21 -1
- package/dist/html/css/shapes.js.map +1 -1
- package/dist/html/css/style.d.ts +42 -5
- package/dist/html/css/style.d.ts.map +1 -1
- package/dist/html/css/style.js +74 -12
- package/dist/html/css/style.js.map +1 -1
- package/dist/html/css/ua.js +15 -0
- package/dist/html/css/ua.js.map +1 -1
- package/dist/html/css/values.d.ts +5 -0
- package/dist/html/css/values.d.ts.map +1 -1
- package/dist/html/css/values.js +18 -9
- package/dist/html/css/values.js.map +1 -1
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +7 -0
- package/dist/html/index.js.map +1 -1
- package/dist/html/layout/block.d.ts +29 -9
- package/dist/html/layout/block.d.ts.map +1 -1
- package/dist/html/layout/block.js +141 -52
- package/dist/html/layout/block.js.map +1 -1
- package/dist/html/layout/boxes.d.ts +16 -2
- package/dist/html/layout/boxes.d.ts.map +1 -1
- package/dist/html/layout/boxes.js +144 -23
- package/dist/html/layout/boxes.js.map +1 -1
- package/dist/html/layout/css-grid.d.ts.map +1 -1
- package/dist/html/layout/css-grid.js +11 -9
- package/dist/html/layout/css-grid.js.map +1 -1
- package/dist/html/layout/flex.d.ts.map +1 -1
- package/dist/html/layout/flex.js +1631 -221
- package/dist/html/layout/flex.js.map +1 -1
- package/dist/html/layout/inline.d.ts +15 -3
- package/dist/html/layout/inline.d.ts.map +1 -1
- package/dist/html/layout/inline.js +23 -8
- package/dist/html/layout/inline.js.map +1 -1
- package/dist/html/layout/table.d.ts +27 -1
- package/dist/html/layout/table.d.ts.map +1 -1
- package/dist/html/layout/table.js +886 -324
- package/dist/html/layout/table.js.map +1 -1
- package/dist/html/node.d.ts +35 -4
- package/dist/html/node.d.ts.map +1 -1
- package/dist/html/node.js +118 -26
- package/dist/html/node.js.map +1 -1
- package/dist/html/paint.d.ts.map +1 -1
- package/dist/html/paint.js +558 -178
- package/dist/html/paint.js.map +1 -1
- package/dist/html/resources.js +14 -1
- package/dist/html/resources.js.map +1 -1
- package/dist/html/svg.d.ts +23 -7
- package/dist/html/svg.d.ts.map +1 -1
- package/dist/html/svg.js +264 -59
- package/dist/html/svg.js.map +1 -1
- package/dist/html/widgets.d.ts.map +1 -1
- package/dist/html/widgets.js +57 -4
- package/dist/html/widgets.js.map +1 -1
- package/package.json +3 -3
- package/src/code-editor/node.ts +24 -5
- package/src/html/css/cascade.ts +697 -221
- package/src/html/css/color.ts +345 -18
- package/src/html/css/content.ts +173 -15
- package/src/html/css/parse.ts +60 -8
- package/src/html/css/shapes.ts +35 -1
- package/src/html/css/style.ts +122 -17
- package/src/html/css/ua.ts +15 -0
- package/src/html/css/values.ts +23 -9
- package/src/html/index.ts +7 -0
- package/src/html/layout/block.ts +149 -58
- package/src/html/layout/boxes.ts +171 -27
- package/src/html/layout/css-grid.ts +12 -9
- package/src/html/layout/flex.ts +1843 -212
- package/src/html/layout/inline.ts +27 -7
- package/src/html/layout/table.ts +961 -332
- package/src/html/node.ts +151 -27
- package/src/html/paint.ts +692 -234
- package/src/html/resources.ts +13 -1
- package/src/html/svg.ts +299 -56
- package/src/html/widgets.ts +61 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Element } from 'domhandler';
|
|
2
2
|
import type { TextRun } from '../../richtext/index.js';
|
|
3
|
+
import { ShapeCopies } from '../css/cascade.js';
|
|
3
4
|
import type { Cascade, KeptStyles, SelectionStyle } from '../css/cascade.js';
|
|
4
5
|
import type { CollapsedTable } from './collapse.js';
|
|
5
6
|
import type { ShapeStyles } from '../css/shapes.js';
|
|
@@ -17,12 +18,16 @@ export interface Marker {
|
|
|
17
18
|
/** Its own style where a `::marker` rule gives it one; the item's where
|
|
18
19
|
* none does. */
|
|
19
20
|
style: ComputedStyle | null;
|
|
20
|
-
/** The image it is, `list-style-image`'s,
|
|
21
|
-
*
|
|
21
|
+
/** The image it is, `list-style-image`'s, where that has arrived, at its
|
|
22
|
+
* size in device pixels — its own, or the one a marker image with none
|
|
23
|
+
* is given (`Builder._markerImageSize`); its text is then not drawn.
|
|
24
|
+
* `gap` is the room between it and the content, in device pixels
|
|
25
|
+
* (`MARKER_IMAGE_GAP`). */
|
|
22
26
|
image?: {
|
|
23
27
|
url: string;
|
|
24
28
|
width: number;
|
|
25
29
|
height: number;
|
|
30
|
+
gap: number;
|
|
26
31
|
};
|
|
27
32
|
/** Its text is its own — a string `list-style-type`, a `::marker`'s
|
|
28
33
|
* `content` — and ends at the content's edge, with no gap a number
|
|
@@ -657,6 +662,11 @@ export interface BoxTree {
|
|
|
657
662
|
* could reach one: worked out as a drawing is first painted, since a
|
|
658
663
|
* page of icons shows few of them at once. */
|
|
659
664
|
shapeStyler: ShapeStyler | null;
|
|
665
|
+
/** What the drawings of this build share in `Cascade.shapeStyles`: the
|
|
666
|
+
* document's elements by their ids, indexed when first asked, where a
|
|
667
|
+
* `<use>` finds the icon a sprite has for it; and what the rules matched
|
|
668
|
+
* in each copy a `<use>` makes. Null where `shapeStyler` is. */
|
|
669
|
+
shapeCopies: ShapeCopies | null;
|
|
660
670
|
/** Whether a float or an out-of-flow box sits in an inline box: where
|
|
661
671
|
* none does, layout looks for them among a block's own children and
|
|
662
672
|
* goes through no inline box to find them. */
|
|
@@ -693,6 +703,10 @@ export interface BuildOptions {
|
|
|
693
703
|
imageSize(el: Element): IntrinsicSize | null;
|
|
694
704
|
/** The same for an image named by url — generated content's. */
|
|
695
705
|
urlSize?(url: string): IntrinsicSize | null;
|
|
706
|
+
/** How far a style's first face reaches above its baseline, in device
|
|
707
|
+
* pixels: what a list marker's image with no size of its own is sized
|
|
708
|
+
* by (`_markerImageSize`). Where it is not known, 0.8em. */
|
|
709
|
+
faceAscent?(style: ComputedStyle): number | undefined;
|
|
696
710
|
/** The size a real widget wants, so the box in the flow is the size the
|
|
697
711
|
* control will be drawn at. */
|
|
698
712
|
controlSize(el: Element, kind: ReplacedKind, style: ComputedStyle): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boxes.d.ts","sourceRoot":"","sources":["../../../src/html/layout/boxes.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAUvD,OAAO,KAAK,EACV,OAAO,EAEP,UAAU,EACV,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAWpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,OAAO,GACf,OAAO,GACP,QAAQ,GACR,MAA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KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;IACtD;oCACgC;IAChC,WAAW,CACT,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,aAAa,GACnB;QACD,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,yCAAyC;AACzC,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,EACrC,OAAO,EAAE,YAAY,GACpB,OAAO,CAGT;AAg6CD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,eAAe,CAAC,EACzC,QAAQ,UAAQ,GACf,MAAM,CAWR;AAoED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAyBtE;AA0gBD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,KAC9B,aAAa,CAAC;AA0InB;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7C;AAYD;;;+DAG+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAQtD"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { attr, childrenOf, isElement, isText, inImpliedHead, NON_RENDERED, tagOf, } from '../dom.js';
|
|
2
|
+
import { ShapeCopies, languageOf, metaColorScheme } from '../css/cascade.js';
|
|
2
3
|
import { quoteAt } from '../css/content.js';
|
|
3
4
|
import { CONTAIN_STYLE, FIRST_LINE_INHERITED, NO_MASK, copyStyle, firstLineParent, inherit, } from '../css/style.js';
|
|
4
5
|
import { AUTO } from '../css/values.js';
|
|
5
|
-
import { svgIntrinsics } from '../svg.js';
|
|
6
|
+
import { concreteSize, svgIntrinsics } from '../svg.js';
|
|
7
|
+
/**
|
|
8
|
+
* The room between a list marker's image and the item's content, in CSS
|
|
9
|
+
* pixels: between the image and the content's edge outside the item, and
|
|
10
|
+
* after the image inside it. CSS 2.1 (12.5.1) leaves where a marker goes
|
|
11
|
+
* to the user agent, and this is Blink's `kCMarkerPaddingPx`
|
|
12
|
+
* (`ListMarker::InlineMarginsForOutside` and `…ForInside`), which WebKit
|
|
13
|
+
* has too. Outside, ours was the gap a bullet has, 0.4em — 16 pixels at
|
|
14
|
+
* 40px text where Chrome has 7 — and inside the space a marker's text ends
|
|
15
|
+
* in, a space's width. Blink writes it into the marker's margins unzoomed,
|
|
16
|
+
* so at a device scale of 2 Chrome's is 7 device pixels; here it is 7 CSS
|
|
17
|
+
* pixels at any scale, so that a page at 2x is the page at 1x doubled.
|
|
18
|
+
*/
|
|
19
|
+
const MARKER_IMAGE_GAP = 7;
|
|
6
20
|
/**
|
|
7
21
|
* One box. Fields are assigned rather than passed so the shape stays
|
|
8
22
|
* monomorphic — every box has every field, which is what keeps the property
|
|
@@ -314,6 +328,29 @@ export function buildBoxes(root, options) {
|
|
|
314
328
|
const builder = new Builder(options);
|
|
315
329
|
return builder.run(root);
|
|
316
330
|
}
|
|
331
|
+
/** A document's first element with an id: one walk of it, the first time
|
|
332
|
+
* an id is asked for (`ShapeCopies`). */
|
|
333
|
+
function idIndex(root) {
|
|
334
|
+
let index = null;
|
|
335
|
+
return (id) => {
|
|
336
|
+
if (!index) {
|
|
337
|
+
index = new Map();
|
|
338
|
+
const stack = [...root.children].reverse();
|
|
339
|
+
for (let node = stack.pop(); node; node = stack.pop()) {
|
|
340
|
+
if (!isElement(node))
|
|
341
|
+
continue;
|
|
342
|
+
const own = node.attribs.id;
|
|
343
|
+
if (own && !index.has(own))
|
|
344
|
+
index.set(own, node);
|
|
345
|
+
const children = node.children;
|
|
346
|
+
for (let i = children.length - 1; i >= 0; i -= 1) {
|
|
347
|
+
stack.push(children[i]);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return index.get(id) ?? null;
|
|
352
|
+
};
|
|
353
|
+
}
|
|
317
354
|
/**
|
|
318
355
|
* How deep the box tree may go. Everything downstream of the builder — the
|
|
319
356
|
* fix-up pass, layout, paint, the accessor walks — recurses on box depth, so
|
|
@@ -321,8 +358,17 @@ export function buildBoxes(root, options) {
|
|
|
321
358
|
* output, a runaway template) from a stack overflow five phases later.
|
|
322
359
|
* Blink's parser flattens at 512 for the same reason; content past the cap
|
|
323
360
|
* is dropped, which beats the alternative of crashing the application.
|
|
361
|
+
*
|
|
324
362
|
* The parser keeps a document to 256 elements (`dom.ts`), so what reaches
|
|
325
|
-
* this
|
|
363
|
+
* this is the anonymous boxes a table builds round them, which the builder
|
|
364
|
+
* counts as it goes (`wrappersAround`), since the fix-up makes them after
|
|
365
|
+
* it. Counted as elements, a `display: table-cell` box in another was one
|
|
366
|
+
* level where it is four boxes — a table, a row group, a row and the cell
|
|
367
|
+
* — and every pass pays for a box: painting one takes some 800 bytes of
|
|
368
|
+
* the stack. Two hundred and fifty cells deep, a thousand boxes, layout
|
|
369
|
+
* and paint each ran out of the 984 KB V8 gives the main thread, and the
|
|
370
|
+
* document came out blank. 512 boxes paint in under half of it, and are a
|
|
371
|
+
* cell in a cell 128 deep.
|
|
326
372
|
*/
|
|
327
373
|
const MAX_DEPTH = 512;
|
|
328
374
|
/** The sharing key the root box's children share under: one root style per
|
|
@@ -372,8 +418,13 @@ class Builder {
|
|
|
372
418
|
run(root) {
|
|
373
419
|
const cascade = this._options.cascade;
|
|
374
420
|
cascade.beginSharing(this._options.kept ?? null);
|
|
421
|
+
cascade.pageColorScheme = metaColorScheme(root);
|
|
375
422
|
const { style: rootStyle, html: impliedHtml } = cascade.rootStyle(hasBody(root), hasHtml(root));
|
|
376
423
|
const rootBox = new Box('block', null, rootStyle);
|
|
424
|
+
// the root standing in for a `<body>` has its background clipped to
|
|
425
|
+
// the document's text as the body's would be
|
|
426
|
+
if (rootStyle.backgroundClipText)
|
|
427
|
+
this._clipText = true;
|
|
377
428
|
// a fragment's root stands in for a `<body>`, counters and all
|
|
378
429
|
this._scopes.open();
|
|
379
430
|
this._counterChanges(rootStyle, {
|
|
@@ -391,6 +442,7 @@ class Builder {
|
|
|
391
442
|
const anonymous = anonymousStyles(cascade.initial);
|
|
392
443
|
fixUp(rootBox, anonymous);
|
|
393
444
|
assignSubtreeRanges(rootBox);
|
|
445
|
+
const copies = cascade.stylesShapes ? new ShapeCopies(idIndex(root)) : null;
|
|
394
446
|
return {
|
|
395
447
|
root: rootBox,
|
|
396
448
|
anonymous,
|
|
@@ -407,7 +459,8 @@ class Builder {
|
|
|
407
459
|
firstLine: this._firstLine,
|
|
408
460
|
firstLineStyler: this._firstLine ? this._firstLineStyler() : null,
|
|
409
461
|
selectionStyler: cascade.hasSelection ? this._selectionStyler() : null,
|
|
410
|
-
shapeStyler:
|
|
462
|
+
shapeStyler: copies ? this._shapeStyler(copies) : null,
|
|
463
|
+
shapeCopies: copies,
|
|
411
464
|
nestedOutOfLine: this._nestedOutOfLine,
|
|
412
465
|
movedInline: this._movedInline,
|
|
413
466
|
clipText: this._clipText,
|
|
@@ -442,12 +495,12 @@ class Builder {
|
|
|
442
495
|
}
|
|
443
496
|
/** `BoxTree.shapeStyler`, over this build's cascade: each drawing's
|
|
444
497
|
* once, from its box's style as it is when first asked. */
|
|
445
|
-
_shapeStyler() {
|
|
498
|
+
_shapeStyler(copies) {
|
|
446
499
|
const cascade = this._options.cascade;
|
|
447
500
|
return (box) => {
|
|
448
501
|
let shapes = SHAPE_STYLES.get(box);
|
|
449
502
|
if (shapes === undefined) {
|
|
450
|
-
shapes = box.el ? cascade.shapeStyles(box.el, box.style) : null;
|
|
503
|
+
shapes = box.el ? cascade.shapeStyles(box.el, box.style, copies) : null;
|
|
451
504
|
SHAPE_STYLES.set(box, shapes);
|
|
452
505
|
}
|
|
453
506
|
return shapes;
|
|
@@ -617,9 +670,11 @@ class Builder {
|
|
|
617
670
|
this._replaced(el, tag, replaced, style, into);
|
|
618
671
|
return;
|
|
619
672
|
}
|
|
620
|
-
if (this._depth >= MAX_DEPTH)
|
|
621
|
-
return;
|
|
622
673
|
const kind = boxKindFor(style.display);
|
|
674
|
+
// the box, and the anonymous boxes the fix-up will put round it
|
|
675
|
+
const depth = 1 + wrappersAround(into.kind, kind, style);
|
|
676
|
+
if (this._depth + depth > MAX_DEPTH)
|
|
677
|
+
return;
|
|
623
678
|
const box = new Box(kind, el, style);
|
|
624
679
|
into.append(box);
|
|
625
680
|
if ((kind === 'block' || kind === 'table-cell' || kind === 'table-caption') &&
|
|
@@ -681,21 +736,19 @@ class Builder {
|
|
|
681
736
|
flush = true;
|
|
682
737
|
}
|
|
683
738
|
if (markerImage && !ownMarker) {
|
|
739
|
+
const [width, height] = this._markerImageSize(markerImage.size, markerStyle ?? style);
|
|
740
|
+
const gap = MARKER_IMAGE_GAP * (this._options.scale ?? 1);
|
|
741
|
+
const image = { url: markerImage.url, width, height, gap };
|
|
684
742
|
if (style.listStylePosition === 'inside')
|
|
685
|
-
insideImage =
|
|
743
|
+
insideImage = image;
|
|
686
744
|
else {
|
|
687
|
-
const scale = this._options.scale ?? 1;
|
|
688
745
|
box.marker = {
|
|
689
746
|
text: '',
|
|
690
747
|
layout: null,
|
|
691
748
|
x: 0,
|
|
692
749
|
y: 0,
|
|
693
750
|
style: markerStyle,
|
|
694
|
-
image
|
|
695
|
-
url: markerImage.url,
|
|
696
|
-
width: (markerImage.size.width ?? 0) * scale,
|
|
697
|
-
height: (markerImage.size.height ?? 0) * scale,
|
|
698
|
-
},
|
|
751
|
+
image,
|
|
699
752
|
};
|
|
700
753
|
}
|
|
701
754
|
}
|
|
@@ -735,12 +788,18 @@ class Builder {
|
|
|
735
788
|
const ownLetter = ownRules ? { rules: ownRules, punctuation: [] } : null;
|
|
736
789
|
if (ownLetter)
|
|
737
790
|
this._firstLetter = ownLetter;
|
|
738
|
-
this._depth +=
|
|
791
|
+
this._depth += depth;
|
|
739
792
|
if (insideImage) {
|
|
740
793
|
// an inline image at the start of the first line, as a generated
|
|
741
|
-
// image is, and the
|
|
742
|
-
|
|
743
|
-
|
|
794
|
+
// image is, and the room after it Blink gives it rather than a
|
|
795
|
+
// space: the content's own white space after it is kept, as it is
|
|
796
|
+
// after an image (`MARKER_IMAGE_GAP`)
|
|
797
|
+
const { url, gap } = insideImage;
|
|
798
|
+
const image = this._contentImage(url, box, style, el, insideImage);
|
|
799
|
+
if (style.direction === 'rtl')
|
|
800
|
+
image.style.marginLeft = gap;
|
|
801
|
+
else
|
|
802
|
+
image.style.marginRight = gap;
|
|
744
803
|
}
|
|
745
804
|
else if (insideMarker) {
|
|
746
805
|
this._insideMarker(insideMarker, style, markerStyle, box, el);
|
|
@@ -748,7 +807,7 @@ class Builder {
|
|
|
748
807
|
this._pseudo(el, 'before', style, box);
|
|
749
808
|
this._children(el, box, style, childInFlex, el, key);
|
|
750
809
|
this._pseudo(el, 'after', style, box);
|
|
751
|
-
this._depth -=
|
|
810
|
+
this._depth -= depth;
|
|
752
811
|
this._letterAfter(flow, skipped, outerLetter, ownLetter);
|
|
753
812
|
if (flow !== 'inline')
|
|
754
813
|
this._endLine();
|
|
@@ -1135,14 +1194,14 @@ class Builder {
|
|
|
1135
1194
|
.join(item.separator);
|
|
1136
1195
|
break;
|
|
1137
1196
|
case 'open-quote':
|
|
1138
|
-
text += quoteAt(style.quotes, this._quoteDepth, 0);
|
|
1197
|
+
text += quoteAt(style.quotes, this._quoteDepth, 0, languageOf(el));
|
|
1139
1198
|
this._quoteDepth += 1;
|
|
1140
1199
|
break;
|
|
1141
1200
|
case 'close-quote':
|
|
1142
1201
|
// a close with nothing open writes nothing and closes nothing
|
|
1143
1202
|
if (this._quoteDepth > 0) {
|
|
1144
1203
|
this._quoteDepth -= 1;
|
|
1145
|
-
text += quoteAt(style.quotes, this._quoteDepth, 1);
|
|
1204
|
+
text += quoteAt(style.quotes, this._quoteDepth, 1, languageOf(el));
|
|
1146
1205
|
}
|
|
1147
1206
|
break;
|
|
1148
1207
|
case 'no-open-quote':
|
|
@@ -1164,7 +1223,10 @@ class Builder {
|
|
|
1164
1223
|
* the image's size once the host has it and none before. An image that
|
|
1165
1224
|
* never arrives takes no room, as no image does.
|
|
1166
1225
|
*/
|
|
1167
|
-
_contentImage(url, into, style, owner
|
|
1226
|
+
_contentImage(url, into, style, owner,
|
|
1227
|
+
/** Its size where it is a list marker's, which has one whatever the
|
|
1228
|
+
* image says (`_markerImageSize`). */
|
|
1229
|
+
marker) {
|
|
1168
1230
|
const box = new Box('replaced', null, {
|
|
1169
1231
|
...inherit(style, this._options.cascade.initial),
|
|
1170
1232
|
display: 'inline',
|
|
@@ -1174,13 +1236,39 @@ class Builder {
|
|
|
1174
1236
|
CONTENT_IMAGES.set(box, url);
|
|
1175
1237
|
const size = this._options.urlSize?.(url) ?? null;
|
|
1176
1238
|
this._contentImages.push({ url, element: owner, sized: !!size });
|
|
1177
|
-
if (
|
|
1239
|
+
if (marker) {
|
|
1240
|
+
const { width, height } = marker;
|
|
1241
|
+
const ratio = width > 0 && height > 0 ? width / height : 0;
|
|
1242
|
+
box.intrinsic = { width, height, missing: 0, ratio };
|
|
1243
|
+
}
|
|
1244
|
+
else if (size)
|
|
1178
1245
|
setIntrinsics(box, size, this._options.scale ?? 1);
|
|
1179
1246
|
else
|
|
1180
1247
|
box.intrinsic = { width: 0, height: 0, missing: 0, ratio: 0 };
|
|
1181
1248
|
this._ws = after('atomic', this._ws, this._ws);
|
|
1182
1249
|
this._lettered = false;
|
|
1183
1250
|
this._abandonLetter();
|
|
1251
|
+
return box;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* A list marker image's size, in device pixels: its own where it has one,
|
|
1255
|
+
* and where it lacks some — an SVG with only a `viewBox`, or with no size
|
|
1256
|
+
* and no ratio — CSS Images' default sizing in a square half its face's
|
|
1257
|
+
* ascent across. CSS Lists 3 (3.3) makes the square 1em, which both
|
|
1258
|
+
* engines find too large (w3c/csswg-drafts#4207): Blink's is half the
|
|
1259
|
+
* ascent, rounded to a whole pixel first
|
|
1260
|
+
* (`LayoutListMarkerImage::DefaultSize`), Gecko's 0.4em, and this is
|
|
1261
|
+
* Blink's. A `viewBox` alone came to 0 by 0 and drew no marker at all,
|
|
1262
|
+
* and inside the item to the 300 by 150 a generated image defaults to.
|
|
1263
|
+
*/
|
|
1264
|
+
_markerImageSize(size, style) {
|
|
1265
|
+
let side = 0;
|
|
1266
|
+
// CoreText reads a size of 0 as its default twelve points
|
|
1267
|
+
if ((size.width === null || size.height === null) && style.fontSize > 0) {
|
|
1268
|
+
const ascent = this._options.faceAscent?.(style) ?? style.fontSize * 0.8;
|
|
1269
|
+
side = Math.round(ascent) / 2;
|
|
1270
|
+
}
|
|
1271
|
+
return concreteSize(size, side, side, this._options.scale ?? 1);
|
|
1184
1272
|
}
|
|
1185
1273
|
/** A text node, whitespace-processed per the inherited `white-space`. */
|
|
1186
1274
|
_textNode(data, into, style, owner) {
|
|
@@ -1765,6 +1853,39 @@ function after(flow, inside, before) {
|
|
|
1765
1853
|
return 'start';
|
|
1766
1854
|
}
|
|
1767
1855
|
}
|
|
1856
|
+
/**
|
|
1857
|
+
* How many anonymous boxes the fix-up will put between a box of `kind` and
|
|
1858
|
+
* the box it is appended to, `parent` (`fixUpTable`, `wrapOrphans`,
|
|
1859
|
+
* `wrapTableParts`): a table part outside a table is given what it is
|
|
1860
|
+
* missing of one, and what is in a table and no part of it is given a
|
|
1861
|
+
* cell, a row and a row group. A cell in a block is in a table, a row group
|
|
1862
|
+
* and a row of its own, and a block in a row is in a cell. Counted against
|
|
1863
|
+
* `MAX_DEPTH`, which bounds the boxes and not the elements.
|
|
1864
|
+
*/
|
|
1865
|
+
function wrappersAround(parent, kind, style) {
|
|
1866
|
+
const column = style.display === 'table-column' || style.display === 'table-column-group';
|
|
1867
|
+
switch (parent) {
|
|
1868
|
+
case 'table':
|
|
1869
|
+
if (kind === 'table-row-group' || kind === 'table-caption' || column) {
|
|
1870
|
+
return 0;
|
|
1871
|
+
}
|
|
1872
|
+
return kind === 'table-row' ? 1 : kind === 'table-cell' ? 2 : 3;
|
|
1873
|
+
case 'table-row-group':
|
|
1874
|
+
return kind === 'table-row' ? 0 : kind === 'table-cell' ? 1 : 2;
|
|
1875
|
+
case 'table-row':
|
|
1876
|
+
return kind === 'table-cell' ? 0 : 1;
|
|
1877
|
+
}
|
|
1878
|
+
// a part out of flow is no part (`isTablePart`)
|
|
1879
|
+
if (style.position === 'absolute' ||
|
|
1880
|
+
style.position === 'fixed' ||
|
|
1881
|
+
style.float !== 'none') {
|
|
1882
|
+
return 0;
|
|
1883
|
+
}
|
|
1884
|
+
if (kind === 'table-row-group' || kind === 'table-caption' || column) {
|
|
1885
|
+
return 1;
|
|
1886
|
+
}
|
|
1887
|
+
return kind === 'table-row' ? 2 : kind === 'table-cell' ? 3 : 0;
|
|
1888
|
+
}
|
|
1768
1889
|
function boxKindFor(display) {
|
|
1769
1890
|
switch (display) {
|
|
1770
1891
|
case 'inline':
|