@botiverse/porthole 0.14.10 → 0.14.12
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/CHANGELOG.md +36 -0
- package/dist/annotate/types.d.ts +35 -15
- package/dist/annotate/types.js +3 -1
- package/dist/annotate/validate.js +28 -3
- package/dist/check/page-source.js +1 -1
- package/dist/conformance/harness-source.js +1 -1
- package/dist/host/create-host.js +8 -0
- package/dist/host/types.d.ts +11 -0
- package/dist/react/frame.d.ts +6 -0
- package/dist/react/frame.js +6 -0
- package/dist/react/view.js +1 -0
- package/dist/shell/annotate.d.ts +21 -7
- package/dist/shell/annotate.js +277 -43
- package/dist/shell/find.d.ts +1 -1
- package/dist/shell/find.js +1 -1
- package/docs/ADOPTING.md +52 -5
- package/docs/ARCHITECTURE.md +4 -3
- package/docs/DECISIONS.md +243 -2
- package/docs/DESIGN.md +57 -23
- package/docs/THREAT_MODEL.md +55 -5
- package/package.json +1 -1
- package/src/annotate/types.ts +35 -15
- package/src/annotate/validate.ts +33 -3
- package/src/host/create-host.ts +8 -0
- package/src/host/types.ts +11 -0
- package/src/react/frame.tsx +12 -0
- package/src/react/view.tsx +1 -0
- package/src/shell/annotate.ts +278 -43
- package/src/shell/find.ts +1 -1
package/docs/ADOPTING.md
CHANGED
|
@@ -251,9 +251,10 @@ createHost(config, {
|
|
|
251
251
|
With `annotate` declared (`capabilities: { annotate: {} }`), a host lets people point at a
|
|
252
252
|
display and keeps its comments beside it ([P053](DECISIONS.md), P104). Everything the frame
|
|
253
253
|
reports is the page's word: a hint where to draw, never a permission. A mark's `count` puts a
|
|
254
|
-
numbered marker
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
numbered marker, a button, at the end of its words' paragraph (P133); a click on one, or Enter or
|
|
255
|
+
Space with the keyboard on it, is `activated`. A draft, a comment its author hasn't posted yet
|
|
256
|
+
(`kind: "draft"`, P107), is drawn apart, beside its own words: a dashed line and a hollow marker
|
|
257
|
+
with no number, which is clicked and followed as a posted one is.
|
|
257
258
|
|
|
258
259
|
```js
|
|
259
260
|
display.annotations.show([
|
|
@@ -336,7 +337,8 @@ composer.onClose(() => display.annotations.clearSelection());
|
|
|
336
337
|
for 500 ms after it appears or moves (no
|
|
337
338
|
`pointerdown`, `pointerup`, `click` or key: menu triggers act on a press, and menu items click
|
|
338
339
|
themselves on a release), ignores a press that began before that, opens beside the frame rather
|
|
339
|
-
than over `rect` where the layout allows, takes no focus
|
|
340
|
+
than over `rect` where the layout allows, takes no focus (unless it meets the conditions of
|
|
341
|
+
THREAT_MODEL §6's exceptions), and has nothing one click away that
|
|
340
342
|
posts, submits, resolves, deletes or discards. Making it `inert` while it arms does all of the
|
|
341
343
|
first:
|
|
342
344
|
|
|
@@ -414,6 +416,50 @@ composer.onClose(() => display.annotations.clearSelection());
|
|
|
414
416
|
|
|
415
417
|
A page that scrolls a box of its own rather than its document moves the places of the marks in
|
|
416
418
|
it as it scrolls; show again (or follow such a mark) to hear them again.
|
|
419
|
+
- **After the last line** (P133): for UI after a selection's or a mark's words rather than beside
|
|
420
|
+
their whole box (a composer's button, a card), a newer shell gives `selected`, each attached
|
|
421
|
+
result and `tracked` a `lastLineDocumentRect`: the last line with words on it, in the document's
|
|
422
|
+
coordinates (an element's whole box: it has no lines), unclamped as `documentRect` is. `selected`
|
|
423
|
+
carries the `scroll` it was read at too; an `anchored` report and `tracked` already do. A line's
|
|
424
|
+
end in the frame's viewport is `x + width - scroll.x`, its bottom `y + height - scroll.y`. Clip
|
|
425
|
+
what you draw from it, as above, and keep `rect` where it is absent (an older shell):
|
|
426
|
+
|
|
427
|
+
```js
|
|
428
|
+
display.on("annotation", (report) => {
|
|
429
|
+
if (report.type !== "selected") return;
|
|
430
|
+
const line = report.lastLineDocumentRect;
|
|
431
|
+
const at = line
|
|
432
|
+
? { x: line.x + line.width - report.scroll.x, y: line.y + line.height - report.scroll.y }
|
|
433
|
+
: { x: report.rect.x + report.rect.width, y: report.rect.y + report.rect.height };
|
|
434
|
+
composer.openAt(frame, clipToFrame(at), report.anchor); // the frame's px: clip them, then add its position
|
|
435
|
+
});
|
|
436
|
+
```
|
|
437
|
+
- **The keyboard** (P133): each marker is a button in the frame's Tab order, after the page's own
|
|
438
|
+
stops, in reading order, named for what it is (`3 comments on "the words"`, from the `count` and
|
|
439
|
+
the anchor's words, without an element's tag, P134; in English, whatever your UI's language). The
|
|
440
|
+
`label` you store keeps its tag. Enter or Space on it is `activated`,
|
|
441
|
+
through the same path and the same gesture check as a click: nothing to handle apart. It is the
|
|
442
|
+
page's focus order, which a page can steal from or hide a marker from, and it is one more
|
|
443
|
+
`activated` the content can time: keep your own list of marks as the way a keyboard can rely on,
|
|
444
|
+
with `annotations.focus(id)` to bring one into view, and leave your view's guard as it is (it
|
|
445
|
+
takes no key for 500 ms either, and takes no focus: Enter again on the marker is one more
|
|
446
|
+
`activated`).
|
|
447
|
+
- **Key or pointer, and back to the marker** (P134). `activated` doesn't say what made it. Read
|
|
448
|
+
your own page as it arrives, in the listener: `document.activeElement === container.querySelector("iframe")`
|
|
449
|
+
(a shadow root of yours: its `activeElement`). True means the focus is in the frame, as it is
|
|
450
|
+
for a key on a marker; a pointer's press on a marker moves no focus, so a click from outside
|
|
451
|
+
reads false. The page can't change that reading, but it is a hint, not a proof: a click after the
|
|
452
|
+
person was already in the frame reads true, the page can put the focus in its frame itself, and it
|
|
453
|
+
can forge `activated` while the person really is there, which this doesn't stop. So moving the
|
|
454
|
+
keyboard into your view on it is your own step outside "takes no focus" above, and a page can
|
|
455
|
+
bring it about: gate whatever posts from that view (a Reply in a frame-opened card) yourself;
|
|
456
|
+
Porthole can't. When Escape closes that view, and only then, close it and call
|
|
457
|
+
`display.annotations.focusMark(id)` (React: `focusMark(id)` on the `ref`) to put the keyboard back
|
|
458
|
+
on the marker. It carries no content and reports nothing; an id with no marker, or a marker the
|
|
459
|
+
page has moved away, does nothing and throws nothing; the page can take the focus straight back.
|
|
460
|
+
Close the view first: from one of your text fields that still has focus, the focus guard takes
|
|
461
|
+
the move for the page's, undoes it and counts it (`focusTaken`). Keep your own list of marks as
|
|
462
|
+
the way that holds.
|
|
417
463
|
- **Labels and quotes are the page's text**: shown only as text. Porthole takes out of a label what
|
|
418
464
|
the person can't see; a quote (`exact`) keeps it, to be found again. Hand either to a model only
|
|
419
465
|
as the page's words.
|
|
@@ -517,7 +563,8 @@ display.on("contentError", ({ message }) => log(message)); // "The content kept
|
|
|
517
563
|
display.focus(); // not frame.focus(): from a text field, that one is taken for the page's and undone
|
|
518
564
|
// Opening your composer focused: only in a comment mode the person started, for a composer that can
|
|
519
565
|
// only save a draft (Enter adds it to the batch; submitting is only your own "Submit N"), and that
|
|
520
|
-
// shows plainly it is a draft (THREAT_MODEL §6, P112); any other view a report opens takes no focus
|
|
566
|
+
// shows plainly it is a draft (THREAT_MODEL §6, P112); any other view a report opens takes no focus (P134's
|
|
567
|
+
// exception, §6, is a container only, and its own conditions). Then
|
|
521
568
|
// Porthole's move, not textarea.focus().
|
|
522
569
|
import { focusField } from "@botiverse/porthole";
|
|
523
570
|
focusField(composer.textarea); // Firefox ignores a plain focus() while a fighting frame holds focus
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -326,9 +326,10 @@ several displays on one page are in [THREAT_MODEL.md](THREAT_MODEL.md).
|
|
|
326
326
|
`/server` from the host's store at `/_blob/<id>` on the artifact's origin.
|
|
327
327
|
- **Annotations** (`annotate`): the host drives a select mode and marks anchors in
|
|
328
328
|
the shell; anchors are W3C Web Annotation selectors a host stores with its own
|
|
329
|
-
comments (P053). A mark may carry a count, drawn as a
|
|
330
|
-
the host hears and answers with its own UI outside
|
|
331
|
-
draft, its author's unposted comment, drawn apart with a
|
|
329
|
+
comments (P053). A mark may carry a count, drawn as a marker, a button at its
|
|
330
|
+
paragraph's end (P133), whose click the host hears and answers with its own UI outside
|
|
331
|
+
the frame (P104), and may be a draft, its author's unposted comment, drawn apart with a
|
|
332
|
+
hollow marker (P107).
|
|
332
333
|
- **Find in page** (`find`): the host draws its own find bar and asks the shell for
|
|
333
334
|
a query (`porthole/find.query`, a request: how many matches, which is current);
|
|
334
335
|
the shell finds it in the same text index annotations read, highlights it in a layer
|
package/docs/DECISIONS.md
CHANGED
|
@@ -4595,7 +4595,7 @@ second wall on a tab); a host needs a served page to open windows from a tab (th
|
|
|
4595
4595
|
`'self'` default (it joins `FRAME_DENIED_FEATURES`); or WebKit and Firefox apply
|
|
4596
4596
|
`Permissions-Policy` to these features (the shell's device locks become the second wall there too).
|
|
4597
4597
|
|
|
4598
|
-
## P104 · 2026-10-20 · Annotation markers: a number at an anchor, a click the host hears, marks that follow a scroll · Accepted; amended by P105, P107, P116
|
|
4598
|
+
## P104 · 2026-10-20 · Annotation markers: a number at an anchor, a click the host hears, marks that follow a scroll · Accepted; amended by P105, P107, P116, P133
|
|
4599
4599
|
|
|
4600
4600
|
A host that shows its comments beside an artifact page wants, at each comment's anchor in the page,
|
|
4601
4601
|
a small marker (a bubble and how many comments are there) that scrolls with the content; a click on
|
|
@@ -4873,7 +4873,7 @@ when someone remembered, and what DESIGN.md said they fail had drifted from what
|
|
|
4873
4873
|
a control's run makes a CI job too long (shard the controls across jobs), or the kit's app gains
|
|
4874
4874
|
a weakening seam (then its controls join the registry).
|
|
4875
4875
|
|
|
4876
|
-
## P105 · 2026-10-20 · After the review of P104: a marker's click within a gesture and the host's view guarded, one clock for follow-ups, text markers beside their line · Accepted
|
|
4876
|
+
## P105 · 2026-10-20 · After the review of P104: a marker's click within a gesture and the host's view guarded, one clock for follow-ups, text markers beside their line · Accepted; amended by P133
|
|
4877
4877
|
|
|
4878
4878
|
Amends P104 (its points 1, 3, 5 and 7, and its Trust) and P053's Trust. From the independent
|
|
4879
4879
|
review of P104 and 0.9.0 (botiverse/porthole#37: no P0 or P1, two P2s, six P3s) and from #36
|
|
@@ -7596,3 +7596,244 @@ control: nothing here is a defense; the bound is `parseRect`'s, which existing p
|
|
|
7596
7596
|
**Revisit when** a host needs places within a page's own scrolling box (a place relative to that
|
|
7597
7597
|
box, and its scroll), the scroll without following a mark (a page with no marks the host follows),
|
|
7598
7598
|
or a host draws from `documentRect` inside the frame's own area and wants Porthole to clip for it.
|
|
7599
|
+
|
|
7600
|
+
## P133 · 2026-11-06 · Markers are labelled buttons, a posted comment's sits at its paragraph's end, and reports say where the last line is · Accepted; amended by P134
|
|
7601
|
+
|
|
7602
|
+
Amends P104 (its point 6, and its "Revisit when" on a keyboard inside the frame) and P105 (its
|
|
7603
|
+
point 3, for posted text marks, and P2-B's click listener on each marker). Three follow-ups for
|
|
7604
|
+
comment markers, from a host (Raft web):
|
|
7605
|
+
|
|
7606
|
+
- A marker can't be reached from the keyboard or named by assistive technology (P104 point 6
|
|
7607
|
+
chose that, and named this as what would reopen it).
|
|
7608
|
+
- A marker beside the anchor's last line, in the gutter, sits between the lines of a paragraph
|
|
7609
|
+
someone is reading, up to the column's width from its words (P105 point 3 said so); the host
|
|
7610
|
+
wants it where the paragraph ends.
|
|
7611
|
+
- A host that puts its own UI after a selection's last line has only the selection's whole box:
|
|
7612
|
+
`rect` ends at the widest line's right, not where the words end, and it is clamped.
|
|
7613
|
+
|
|
7614
|
+
**Decision.**
|
|
7615
|
+
|
|
7616
|
+
1. **A marker is a real button.** A `<button type="button">` with an explicit tab stop (`tabindex`:
|
|
7617
|
+
Safari's Tab otherwise skips one) and a name that says what it is: `aria-label` "3 comments on
|
|
7618
|
+
…", "1 comment on …", "Comment on …" for a count of 0, "Draft comment on …", with the mark's
|
|
7619
|
+
`anchor.label`. The layer is no longer `aria-hidden`: its marks and its outline are, so the
|
|
7620
|
+
markers are all assistive technology finds in it. A marker's styles take off what a browser
|
|
7621
|
+
gives a button, and it has a focus ring of its own. Markers go in the page's reading order
|
|
7622
|
+
(each finding reads where each mark starts, as `order` does), which is the Tab key's: after the
|
|
7623
|
+
page's own stops, since the layer is the document's last child. A marker that stays in its
|
|
7624
|
+
place isn't touched, and none moves while one has the focus.
|
|
7625
|
+
2. **The existing path, from the keyboard.** Enter and Space make the button's own trusted click,
|
|
7626
|
+
which reaches the shell's first window listener as a pointer's does, retargeted to the layer. It
|
|
7627
|
+
has no click count and no point (0, 0, or the like), so the hit test can't place it: a trusted
|
|
7628
|
+
click with `detail` 0 is the focused marker's, read through the closed shadow root's
|
|
7629
|
+
`activeElement` by the platform's getter, kept before content runs, and otherwise goes on to the
|
|
7630
|
+
hit test as ever (assistive technology that clicks an element without focusing it is missed:
|
|
7631
|
+
see Revisit). `activated`, its `rect` (the marker's box), the
|
|
7632
|
+
host's id check and its gesture check are unchanged: a real key gives the host's page transient
|
|
7633
|
+
activation as a click does (as the HTML standard says for a key but Escape; unmeasured here, see
|
|
7634
|
+
Tested). While elements are picked a marker takes itself out of the Tab order (`tabindex` -1) and
|
|
7635
|
+
a click on one reports nothing, as the pointer's goes past it.
|
|
7636
|
+
3. **Enter and Space are stopped as a press is**, in the window's first listener, read through
|
|
7637
|
+
kept getters, on all of keydown, keypress and keyup while their target is the layer: the content
|
|
7638
|
+
neither hears them nor cancels the click. Every other key stays the page's, as on a button of its
|
|
7639
|
+
own: Tab, Escape (which the shell's own picking and selecting hear after this), and the host's
|
|
7640
|
+
find shortcut. A repeat of either is cancelled: a key held down clicks once, where 30 clicks a
|
|
7641
|
+
second would spend the bridge's 120 a minute on one press.
|
|
7642
|
+
4. **The focus stays while the page redraws.** A draw hit-tests places with the markers out of the
|
|
7643
|
+
display (P105), which loses a focused one, on every scroll. While one has the focus they only
|
|
7644
|
+
take no pointer (`pointer-events`, so the tests skip them): dearer for that time, as P105 measured
|
|
7645
|
+
(0.13 ms a marker per test), and only then. Nothing else in a draw touches a kept node.
|
|
7646
|
+
5. **The focus brings a marker into view.** One out of view is outside the layer's box. A focused
|
|
7647
|
+
element scrolls its scrolling ancestors into view, and `overflow: hidden` is one, so the layer
|
|
7648
|
+
would have scrolled away from everything it draws: it clips now (`overflow: clip`, `hidden`
|
|
7649
|
+
where an engine lacks it, Safari before 16; the shared `LAYER_STYLE`, find's layer too). The
|
|
7650
|
+
shell scrolls the document instead, to centre the marker, with the `scrollBy` kept before content
|
|
7651
|
+
runs, as `focus(id)` does for a mark. The focus on a marker lights its words as the pointer does.
|
|
7652
|
+
Focus events between two markers don't leave the shadow root, so these listen there.
|
|
7653
|
+
6. **A posted comment's marker sits at its paragraph's end.** A text anchor's, not a draft's: on
|
|
7654
|
+
the last line of the block its words end in, read from the anchor's end as far as a block inside
|
|
7655
|
+
it (a nested list's words are their own paragraph) and over only what is drawn, at most 256 text
|
|
7656
|
+
nodes, once for each finding (a range kept on the mark, so a draw reads one box). It takes P105's
|
|
7657
|
+
places on that line, after a new first one: just past the last word, where nothing follows that a
|
|
7658
|
+
marker could cover, which is what P105's gutter gave up for. Where the line leaves no room, the
|
|
7659
|
+
gutter, the frame's edge, compact and over the line's end as before. Those at one paragraph's end
|
|
7660
|
+
go together, in the order their words end.
|
|
7661
|
+
7. **A draft's stays by its words**, as P105 places it: it is the person's comment being written on
|
|
7662
|
+
those words, beside a composer near them, and nothing else says which words those are. **An
|
|
7663
|
+
element's stays on its corner** (P104): it may have no text and no lines, and a pinned paragraph's
|
|
7664
|
+
marker is P119's. The light on the words, on hover and on focus, still ties a marker at a
|
|
7665
|
+
paragraph's end to the words it is for.
|
|
7666
|
+
8. **`lastLineDocumentRect`** on `selected`, on each attached result of `anchored` and on `tracked`:
|
|
7667
|
+
the last line with words on it (the last client rect with a width: a triple click's empty box on
|
|
7668
|
+
the next block doesn't count), or an element's whole box, in the coordinates of `documentRect`:
|
|
7669
|
+
the box as the shell read it plus the `scroll` it was read at. **`selected` takes `scroll` too**,
|
|
7670
|
+
so it is `rect`'s equal: its viewport place is one less the other. `createHost` checks each as a
|
|
7671
|
+
box, clamps none (a clamp erases an offscreen line, and `rect` is P104's). No other field, method,
|
|
7672
|
+
option or rate. Follow-ups still go by `rect` and `order`: a line that moves inside an unmoved box
|
|
7673
|
+
isn't told, and comparing in document coordinates would tell a fixed mark at every scroll.
|
|
7674
|
+
9. **The marker's own click listener goes**, and with it the control `marker-tap`. It was there
|
|
7675
|
+
only so WebKit would make a tap a click on a `div`: P105's P2-B measured that it did so for a
|
|
7676
|
+
button all along. The tap probes stay, under `marker-click`.
|
|
7677
|
+
|
|
7678
|
+
**Compatibility.** Every field is optional and only added. An older shell sends none, and a host
|
|
7679
|
+
tests for `lastLineDocumentRect`; an older host drops them (each report is rebuilt from known
|
|
7680
|
+
fields, P053). A malformed one drops the whole report, as any malformed part does. Markers change in
|
|
7681
|
+
place for a host doing nothing: they move, and take the keyboard. `show`, `activated` and every
|
|
7682
|
+
existing field are as they were. The shell is the content server's: upgrade that for all of it.
|
|
7683
|
+
|
|
7684
|
+
**Threat.** P104 refused the tab stop because the content controls that focus order. That stands,
|
|
7685
|
+
and is accepted (THREAT_MODEL §7): the content can take the focus from a marker, keep a person from
|
|
7686
|
+
one, draw a look-alike with a tab stop of its own, and tell that the person is on one. It gains no
|
|
7687
|
+
power from that: a marker's press has no effect but `activated`, which it can fake within the host's
|
|
7688
|
+
checks anyway; a made-up key or `click()` is no trusted click; and keys reach a marker only while
|
|
7689
|
+
the frame has the focus, so P109's keyboard is untouched. The focus model P104 hoped for, one the
|
|
7690
|
+
content can't steal, is rejected below: only the host's own UI can be that, and the host's list of
|
|
7691
|
+
marks stays the way a keyboard can rely on. `activated` by keyboard is as fakeable and as guarded
|
|
7692
|
+
as by pointer; ADOPTING's guard already takes no key. The name carries the page's own words
|
|
7693
|
+
(`anchor.label`) to assistive technology, after the shell's own: a page can't change what kind of
|
|
7694
|
+
thing it says this is, and those words reach the frame in `show` already. `lastLineDocumentRect`
|
|
7695
|
+
re-opens what `documentRect` re-opened, no more: a host that draws from it without clipping lets the
|
|
7696
|
+
page choose where (P132's duty, THREAT_MODEL §6). `rect` stays clamped. The page learns nothing new
|
|
7697
|
+
from it (it goes from the frame to the host).
|
|
7698
|
+
|
|
7699
|
+
**Tested.** `test/annotate.test.ts` "the last line (P133)": kept in all three reports, rebuilt from
|
|
7700
|
+
known fields; an older shell's selection exactly as before; a malformed one or a selection's
|
|
7701
|
+
malformed scroll dropping the report; through `createHost`, `rect` clamped, the last line and the
|
|
7702
|
+
scroll as the shell said. `leak/annotate.spec.ts` (three engines), written and not yet run (test runs
|
|
7703
|
+
were paused where this was written, so everything measured above is reasoned from the standards and
|
|
7704
|
+
the engines' sources and awaits CI): "a marker is a button the keyboard reaches…" (`marker-key`,
|
|
7705
|
+
`marker-click`); "a marker out of view brings itself into view…"; "a posted comment's marker sits at
|
|
7706
|
+
its paragraph's end…"; "a selection's and a mark's last line…" (`annotation-rect-clamp`, as P132's).
|
|
7707
|
+
"text markers cover no word" now puts a draft in a line's middle: posted ones have no next word to
|
|
7708
|
+
cover, so that is what control `marker-place` shows. Tests that clicked a posted marker on its
|
|
7709
|
+
anchor's line now look on its paragraph's last line. New control `marker-key`.
|
|
7710
|
+
|
|
7711
|
+
**Rejected.**
|
|
7712
|
+
- A focus model the content can't steal, inside the frame (P104's hope): the shell shares the realm,
|
|
7713
|
+
so nothing in the frame is out of a page's reach. Only the host's overlay could be, a tab stop per
|
|
7714
|
+
mark outside the frame, kept level with content it can't see into: that is the host's list again.
|
|
7715
|
+
- `role="button"` on the `div`: every activation by hand (Enter on keydown, Space on keyup,
|
|
7716
|
+
nothing for assistive technology's own click), for nothing; "works with the existing path" is what
|
|
7717
|
+
a real button's trusted click gives.
|
|
7718
|
+
- A click listener on the marker itself, to know the target without the focus: the window's first
|
|
7719
|
+
listener has to stop the click before it gets there, or the content hears it.
|
|
7720
|
+
- Stopping every key on a marker: it would take Escape and Tab from a page's own handling, and the
|
|
7721
|
+
host's find shortcut, for no secret; what's stopped is what acts on a marker.
|
|
7722
|
+
- A host's `label` on a mark for the name in the person's language: a new field in `show` and in
|
|
7723
|
+
what the page reads, not asked for yet (see Revisit).
|
|
7724
|
+
- Moving the marker to the paragraph's end in the gutter always (P105's place on that line): it
|
|
7725
|
+
keeps the distance from the words that this is here to end.
|
|
7726
|
+
- A marker at a picked paragraph's end too: an element anchor isn't always text, and P119 pins that
|
|
7727
|
+
marker on purpose.
|
|
7728
|
+
- `documentRect` on `selected` as well: not asked for; `rect` and the last line place a host's UI.
|
|
7729
|
+
|
|
7730
|
+
**Revisit when** a host's UI isn't in English and its marker names should be (a host's `label` on a
|
|
7731
|
+
mark, sent into the frame, the page reading it); an engine's or a screen reader's click on a marker
|
|
7732
|
+
it didn't focus is missed, or reported as the marker that has the focus, so the wrong comment opens
|
|
7733
|
+
(give the layer a way to learn its target); a right-to-left paragraph's
|
|
7734
|
+
end should be on its left (P105's places aren't direction-aware either); paragraphs split by `<br>`
|
|
7735
|
+
should count as many; or a host wants a picked paragraph's marker at its end.
|
|
7736
|
+
|
|
7737
|
+
## P134 · 2026-11-06 · The keyboard back on a marker after the host's card closes, and a marker's name without an element's tag · Accepted
|
|
7738
|
+
|
|
7739
|
+
Amends P133 (its point 1, the name) and adds to P104's host API. Two follow-ups for comment markers,
|
|
7740
|
+
from a host (Raft web): a person who pressed Enter on a marker reads the host's card, presses
|
|
7741
|
+
Escape, and lands on the host's `<body>`, the marker's place in the Tab order lost, and an element
|
|
7742
|
+
anchor's marker is read out as "1 comment on p Paragraph 3. Filler…", the tag and all.
|
|
7743
|
+
|
|
7744
|
+
**Decision.**
|
|
7745
|
+
|
|
7746
|
+
1. **`annotations.focusMark(id)`** (`porthole/annotate.focusMark`, `{ id }`; React: `focusMark(id)` on
|
|
7747
|
+
`PortholeFrameHandle`, as `clearSelection` is, since it is a moment and not a state). The name
|
|
7748
|
+
is `focus(id)`'s, for the mark's marker: `focus` scrolls to a mark and lights it, and moves no DOM
|
|
7749
|
+
focus. The shell moves the DOM focus to that mark's marker button, with the platform's `focus`
|
|
7750
|
+
kept before content runs and `preventScroll`: the focus listener P133 added lights the words and
|
|
7751
|
+
brings it into view, as for a Tab. **It is for the Esc path only:** after Escape closed the host's
|
|
7752
|
+
own view of that mark. Nothing else needs a host to move the keyboard into a frame, and P109 and
|
|
7753
|
+
§6 spend a good deal on keeping it out.
|
|
7754
|
+
2. **No content, and nothing new back.** An id the host already sent in `show`; no report, no field,
|
|
7755
|
+
no rate. It is host to frame only, and kept for no later frame.
|
|
7756
|
+
3. **No such marker, nothing happens.** No fault either: the mark may have gone with the card. The
|
|
7757
|
+
host sends nothing for an id with no shown mark or no marker; the shell does nothing for a mark
|
|
7758
|
+
with no marker now (orphaned, the page moved its words) or while elements are picked (markers step
|
|
7759
|
+
aside, P133). After a `show` it waits for the marks to be found, as `focus` does: a host commonly
|
|
7760
|
+
sends a new `show` as a card closes. Without `annotate` it throws, as every call does.
|
|
7761
|
+
4. **The shell alone moves it, not the host's `display.focus()` first.** A marker's `focus()` from
|
|
7762
|
+
inside takes the frame's focus with it, as any page's does (P109, measured on all three), and
|
|
7763
|
+
the host doesn't know whether the frame still has the marker: moving the frame first would give
|
|
7764
|
+
the frame the keyboard for a marker that isn't there. So the focus guard sees the move as the
|
|
7765
|
+
frame's own, and rightly does nothing to a move from `<body>`. A host calls it once its card is
|
|
7766
|
+
closed. Still in a text field of the host's page, the guard undoes the move and counts it
|
|
7767
|
+
(`focusTaken`, Escape counting as typing), which can stop the display (P109).
|
|
7768
|
+
5. **A marker's name is the words it is on, in quotes, with no tag**: `1 comment on "Paragraph 3.
|
|
7769
|
+
Filler…"`, `Draft comment on "…"`, and `1 comment` for a wordless element with nothing to say.
|
|
7770
|
+
Text anchors are quoted too, one form for one kind of button. `describe` gives an element's
|
|
7771
|
+
`anchor.label` its tag, and the host stores and shows that label, so it stays as it is, in the
|
|
7772
|
+
picking outline and in every report. The name is worked out from the anchor: an element's
|
|
7773
|
+
`TextQuoteSelector`, cut at the label's 40 characters with an ellipsis; with no quote (an image
|
|
7774
|
+
named by its `alt`) what follows the first space of the label; nothing else. No field, no message.
|
|
7775
|
+
6. **The host's way to tell a key from a pointer is its own**: `document.activeElement` on the host's
|
|
7776
|
+
page, read as `activated` arrives. A marker's press by a pointer moves no focus (P105), so a click
|
|
7777
|
+
from outside the frame finds the frame not focused, and a key on a marker finds it focused. The
|
|
7778
|
+
host reads that itself: `activated` is unchanged, no new field. It is a hint, what the next section
|
|
7779
|
+
says of it holds, and Porthole does nothing with it.
|
|
7780
|
+
|
|
7781
|
+
**Compatibility.** An older shell ignores `focusMark` (it knows no such method), which is a call
|
|
7782
|
+
that did nothing. `PortholeFrameHandle` gains a method, which only Porthole implements. `activated`,
|
|
7783
|
+
`AnnotationAnchor` and everything stored are as they were. Names change in place on a host doing
|
|
7784
|
+
nothing. The shell is the content server's: upgrade that.
|
|
7785
|
+
|
|
7786
|
+
**Threat.**
|
|
7787
|
+
- `focusMark` gives the page nothing new. It reads the message in its own window and learns that a
|
|
7788
|
+
card closed just now, and which mark's, which it could tell from the focus moving anyway. It can
|
|
7789
|
+
take the focus straight back or spoil the move: failure is fine, and a host can't rely on it, as
|
|
7790
|
+
P133 says of markers. A page can make up the message with a `MessageEvent` naming the frame's
|
|
7791
|
+
parent as its source (the shell's listener checks those, not `isTrusted`, for every message here)
|
|
7792
|
+
and so focus a marker itself: a marker's press has no power but `activated`, which it can fake
|
|
7793
|
+
anyway. The key the person then presses is a trusted click on a marker, and as guarded.
|
|
7794
|
+
- The move is through the kept `focus`, so a page that patched `HTMLElement.prototype.focus` isn't
|
|
7795
|
+
handed a marker from inside the closed root (control `marker-focus`, as P129 holds the guards).
|
|
7796
|
+
- The name's quotes are punctuation, no bound: a page's words can hold a `"`. The kind of thing the
|
|
7797
|
+
name says it is stays first, the shell's, as in P133. An element's quote keeps what can't be seen,
|
|
7798
|
+
as its selector does (P105 cleans labels), and it is the text the page shows anyway, only read out.
|
|
7799
|
+
- **The host's signal.** The page can't change what `document.activeElement` says on the host's
|
|
7800
|
+
page. That is all it gives: it says the focus is in the frame, not that a key was pressed or by
|
|
7801
|
+
whom. The page can forge `activated` while the person really is in the frame, and the signal
|
|
7802
|
+
doesn't stop that. The page can also make it true, with `focus()` on its own element from anywhere
|
|
7803
|
+
but a text field of the host's (P109 lets that be). And a pointer's click on a marker reads as a
|
|
7804
|
+
key if the person was already in the frame. So a host that moves the keyboard into its view on this
|
|
7805
|
+
signal takes the second exception to "takes no focus" that this decision adds (THREAT_MODEL §6,
|
|
7806
|
+
after P112's): a page can time a forged `activated` and put the person's next keys in that view.
|
|
7807
|
+
All three conditions are the host's: the signal read on its own page, focus only on a container
|
|
7808
|
+
that takes no input, and its own gate on every control there that can write, so a forged opening
|
|
7809
|
+
and the keys after it can't submit. Porthole can't do that for it.
|
|
7810
|
+
|
|
7811
|
+
**Tested.** `test/annotate.test.ts`: what `createHost` sends and for which ids, kept for no later
|
|
7812
|
+
frame, the throw without `annotate`; the kept `focus` and no `tell` in the shell's; every name
|
|
7813
|
+
(`MARKER_NAME`, spliced into the runtime as `MARKER_HIT` is, and run). `leak/annotate.spec.ts` (three
|
|
7814
|
+
engines; written and not yet run: test runs were paused where this was written, so the behaviour of
|
|
7815
|
+
engines above is reasoned from P109's and P105's measurements and awaits CI): "focusMark puts the
|
|
7816
|
+
focus on that mark's marker…", from the host's `<body>` after a card's field went, with the frame the
|
|
7817
|
+
host page's `activeElement`, nothing but `anchored` reported, Enter reporting that mark, and the
|
|
7818
|
+
focus left where it was for an unknown id, no marker, an orphaned mark, words the page removed, and
|
|
7819
|
+
picking; "focusMark right after a show…"; "a page that patched focus…" (new control `marker-focus`);
|
|
7820
|
+
"a marker's name is the words it is on…" (Chromium, by its inspector). `leak/react.spec.ts`: "a ref's
|
|
7821
|
+
focusMark…". Reports are found by what they say, and a control's own follow-up doesn't fail these.
|
|
7822
|
+
|
|
7823
|
+
**Rejected.**
|
|
7824
|
+
- `keyboard: true` on `activated` (the first draft of this decision, from the click's `detail` 0):
|
|
7825
|
+
a field the page can forge with the rest of the report, to tell the host what it can read for itself
|
|
7826
|
+
from a place the page can't write to. Neither stops a forged `activated`.
|
|
7827
|
+
- The host's `display.focus()` before the message: see point 4.
|
|
7828
|
+
- An answer from the shell (did the marker take it?), for a host to fall back on: a new report for a
|
|
7829
|
+
moment where failing is fine.
|
|
7830
|
+
- `focus(id)` also moving the DOM focus: `focus` is what a host's own list calls, and that keeps
|
|
7831
|
+
the keyboard in the host's list.
|
|
7832
|
+
- A hole in the focus guard for this call: a window in which a frame's move from a text field
|
|
7833
|
+
passes as the host's, for a page to use, to save a host from closing its card first.
|
|
7834
|
+
- Changing `describe`, or a new `words` field on an anchor: the first changes what hosts have stored
|
|
7835
|
+
and show, the second what they store and send back; neither is needed.
|
|
7836
|
+
|
|
7837
|
+
**Revisit when** a host needs to return focus somewhere other than after Escape; a host's card has a
|
|
7838
|
+
reason to stay open while the keyboard goes back; or a platform's guard should take a host's own word
|
|
7839
|
+
for a move into a frame it can't make itself.
|
package/docs/DESIGN.md
CHANGED
|
@@ -780,8 +780,8 @@ binding is mounting and lifecycle (P034).
|
|
|
780
780
|
null), `annotations` (the marks), `focusedAnnotation` (each new id is brought into
|
|
781
781
|
view; `{ id, key }` with a new key focuses the same one again), `trackedAnnotation`
|
|
782
782
|
(the mark followed, or null, P118); `onAnnotation` gets what the frame reported, `tracked`
|
|
783
|
-
boxes too. A frame that mounts again gets them all. A `ref` holds `clearSelection()`
|
|
784
|
-
(`PortholeFrameHandle`), a no-op while no display runs.
|
|
783
|
+
boxes too. A frame that mounts again gets them all. A `ref` holds `clearSelection()`, `find`,
|
|
784
|
+
`clearFind` and `focusMark(id)` (`PortholeFrameHandle`), each a no-op while no display runs.
|
|
785
785
|
- **Errors** (P055): `onContentError` gets what the content did wrong (what it
|
|
786
786
|
threw, what the sandbox blocked, a navigation the shell stopped, that it kept
|
|
787
787
|
navigating away): the agent's to hear. `onNavigationBlocked` gets a stopped
|
|
@@ -1047,13 +1047,14 @@ chooses), and the annotation runtime is in the shell only then.
|
|
|
1047
1047
|
| host → frame | `porthole/annotate.focus` | `{ id }`: scrolled into view inside the frame, made the active mark, flashed |
|
|
1048
1048
|
| host → frame | `porthole/annotate.clear` | — |
|
|
1049
1049
|
| host → frame | `porthole/annotate.clearSelection` | —: the page's text selection is taken away (the DOM's own `removeAllRanges`, taken before content runs) with what the shell held of it, and nothing is reported back; marks, drafts and the mode stay (P115) |
|
|
1050
|
-
|
|
|
1050
|
+
| host → frame | `porthole/annotate.focusMark` | `{ id }`: the DOM focus goes to that mark's marker (the DOM's own `focus`, taken before content runs), once the marks of a `show` are found; nothing is reported back, and with no such marker, or while elements are picked, nothing happens. For after Escape closed the host's view (P134) |
|
|
1051
|
+
| frame → host | `porthole/annotate.selected` | `{ anchor, rect, lastLineDocumentRect?, scroll? }` (a newer shell's last two: P133, below); after a scroll, the same selection again only if its box moved more than 0.5 px, on the follow-ups' clock (P105) |
|
|
1051
1052
|
| frame → host | `porthole/annotate.unselected` | — (the text selection went away) |
|
|
1052
1053
|
| frame → host | `porthole/annotate.cancelled` | — (Escape) |
|
|
1053
|
-
| frame → host | `porthole/annotate.anchored` | `{ results: [{ id, state: "attached" \| "orphaned", rect?, documentRect?, order? }], scroll? }` (a newer shell's `documentRect` and `scroll`: P132, below): every mark after `show`, the one after `focus`, every mark when the content changed a state, and, while any mark has a marker (a `count` or a draft, P107), once a scroll, a resize or a run of content changes has settled (150 ms quiet), only the marks that moved more than 0.5 px since the host was last told, at most one a second together with the selection's (P104, P105) |
|
|
1054
|
+
| frame → host | `porthole/annotate.anchored` | `{ results: [{ id, state: "attached" \| "orphaned", rect?, documentRect?, lastLineDocumentRect?, order? }], scroll? }` (a newer shell's `documentRect` and `scroll`: P132, below; `lastLineDocumentRect`: P133): every mark after `show`, the one after `focus`, every mark when the content changed a state, and, while any mark has a marker (a `count` or a draft, P107), once a scroll, a resize or a run of content changes has settled (150 ms quiet), only the marks that moved more than 0.5 px since the host was last told, at most one a second together with the selection's (P104, P105) |
|
|
1054
1055
|
| host → frame | `porthole/annotate.track` | `{ id }` or `{ id: null }`: follow one shown mark, or none (P112) |
|
|
1055
|
-
| frame → host | `porthole/annotate.tracked` | `{ id, rect, documentRect?, scroll? }`: the followed mark's box at an animation frame where it moved, at most one every 16 ms; the host takes 60 a second, for that mark only (P112); a newer shell adds its place in the document and the document's scroll (P132) |
|
|
1056
|
-
| frame → host | `porthole/annotate.activated` | `{ id, rect }`: the person clicked a mark's marker; `rect` is the marker's (P104); taken only while the host's page has transient activation (P105) |
|
|
1056
|
+
| frame → host | `porthole/annotate.tracked` | `{ id, rect, documentRect?, lastLineDocumentRect?, scroll? }`: the followed mark's box at an animation frame where it moved, at most one every 16 ms; the host takes 60 a second, for that mark only (P112); a newer shell adds its place in the document and the document's scroll (P132), and its last line's (P133) |
|
|
1057
|
+
| frame → host | `porthole/annotate.activated` | `{ id, rect }`: the person clicked a mark's marker, or pressed Enter or Space on it (P133); `rect` is the marker's (P104); taken only while the host's page has transient activation (P105) |
|
|
1057
1058
|
|
|
1058
1059
|
- **Anchors** are W3C Web Annotation selectors, at most one of each:
|
|
1059
1060
|
`CssSelector` (unique: the nearest id, else a path of `nth-of-type` steps),
|
|
@@ -1083,10 +1084,20 @@ chooses), and the annotation runtime is in the shell only then.
|
|
|
1083
1084
|
negative; a malformed one drops the report) and clamps neither: the host clips what it
|
|
1084
1085
|
draws from them. A page that scrolls a box of its own rather than its document moves
|
|
1085
1086
|
its marks' places with it, as their `rect` does; those are told as before.
|
|
1087
|
+
- **The last line** (P133). A newer shell says where a selection or a mark ends, for a
|
|
1088
|
+
host's UI after it: `lastLineDocumentRect`, on `selected` (with `scroll`, read with
|
|
1089
|
+
it), on each attached result of `anchored` and on `tracked`, in the coordinates of
|
|
1090
|
+
`documentRect`, checked and left unclamped as it is. It is the last box with a width
|
|
1091
|
+
of the words' client rects, the box a text marker's place starts from; an element,
|
|
1092
|
+
which has no lines of its own, gives its whole box. Its place in the frame's viewport
|
|
1093
|
+
is it less `scroll`. Absent from an older shell, and where nothing of it is drawn.
|
|
1086
1094
|
- **Markers** (P104). A mark with a `count` gets a bubble glyph and its number ("99+"
|
|
1087
|
-
above 99; 0 the bubble alone) on an element's top right
|
|
1088
|
-
width, and
|
|
1089
|
-
|
|
1095
|
+
above 99; 0 the bubble alone), a real button (P133, below), on an element's top right
|
|
1096
|
+
corner, inside the frame's width, and at the end of a text anchor's paragraph (P133):
|
|
1097
|
+
on the last line of the block its words end in, read as far as a block inside it,
|
|
1098
|
+
just past that line's last word, or where that doesn't fit at the places a draft's
|
|
1099
|
+
takes. A draft's goes beside its anchor's own last line, centred on it (P105, #36): in
|
|
1100
|
+
the line's gutter, just past the right edge of the anchor's block; at the frame's right
|
|
1090
1101
|
edge where the frame is too narrow for that; just past the line's last word where
|
|
1091
1102
|
something else is beside the block (a table's next cell, a card in a row). Each
|
|
1092
1103
|
place must be clear of that line's words and of anything of the content's but a box
|
|
@@ -1101,8 +1112,8 @@ chooses), and the annotation runtime is in the shell only then.
|
|
|
1101
1112
|
is a thin line. The layer takes no pointer but on markers: a press on one, and the pointer's
|
|
1102
1113
|
moves over it, are stopped in the shell's first window listener, read through the
|
|
1103
1114
|
platform's own functions kept before content runs (P105), and a trusted click is
|
|
1104
|
-
reported `activated`; a tap too, on WebKit as well, since
|
|
1105
|
-
|
|
1115
|
+
reported `activated`; a tap too, on WebKit as well, since a button is an element it
|
|
1116
|
+
makes a tap a click on (P105). On
|
|
1106
1117
|
touch (P119), while the last pointer down or moved was a finger or a pen (before any,
|
|
1107
1118
|
where `(any-pointer: coarse)` matches), each marker also takes the pointer in a box of
|
|
1108
1119
|
at least 44 by 44 px centred on its bubble (an invisible `::before` in the layer), the
|
|
@@ -1113,10 +1124,26 @@ chooses), and the annotation runtime is in the shell only then.
|
|
|
1113
1124
|
its handlers, nor what is under the marker, gets them; content that patches others
|
|
1114
1125
|
can reach the layer's nodes (P105). Either way the content can tell a press
|
|
1115
1126
|
happened, by `:active`, `relatedTarget` and user activation. Markers step aside
|
|
1116
|
-
while elements are picked
|
|
1117
|
-
|
|
1127
|
+
while elements are picked, the keyboard's Tab too.
|
|
1128
|
+
- **Markers from the keyboard** (P133). Each marker is a `<button>` with a tab stop,
|
|
1129
|
+
in the page's reading order after the page's own stops (the layer is the document's
|
|
1130
|
+
last child), named for what it is (`aria-label`: `3 comments on "…"`, `Draft comment
|
|
1131
|
+
on "…"`, with the words it is on, an element's tag left out, P134, in English); only the markers are exposed to
|
|
1132
|
+
assistive technology, the layer no longer `aria-hidden`, its marks and outline are.
|
|
1133
|
+
A press of a pointer still moves no focus. Enter and Space make the button's own
|
|
1134
|
+
trusted click, which goes the way a pointer's does, but has no count and no place, so
|
|
1135
|
+
it is the focused marker's (read through the shadow root's `activeElement`, kept
|
|
1136
|
+
before content runs); those two keys are stopped at the window as a press is, a
|
|
1137
|
+
repeat of them cancelled (a key held down clicks once), and every other key stays the
|
|
1138
|
+
page's. A real key gives the host's page transient activation as a click does. The
|
|
1139
|
+
focus on a marker lights its words and, out of view, scrolls the document to it: the
|
|
1140
|
+
layer clips rather than hides, so it never scrolls itself. While one has the focus a
|
|
1141
|
+
draw takes the markers out of hit tests by `pointer-events`, not `display` (which
|
|
1142
|
+
would lose it), and moves none. The page shares the focus order: the host's own list
|
|
1143
|
+
of marks stays the keyboard path it can rely on.
|
|
1118
1144
|
- **Drafts** (P107). A mark with `kind: "draft"` (a comment not yet posted) has a
|
|
1119
|
-
marker whether or not it has a count, placed
|
|
1145
|
+
marker whether or not it has a count, placed by its own words (not at its paragraph's
|
|
1146
|
+
end, P133), and drawn apart: a
|
|
1120
1147
|
dashed underline (a dashed outline on an element), a lighter fill, and a hollow
|
|
1121
1148
|
marker (a light bubble with a dashed edge and the glyph's outline) with no number.
|
|
1122
1149
|
`checkMarks` sends a posted mark as before (no `kind`), a draft without its count,
|
|
@@ -1146,9 +1173,9 @@ chooses), and the annotation runtime is in the shell only then.
|
|
|
1146
1173
|
see or do anything. A view a report opens or moves guards its presses
|
|
1147
1174
|
(THREAT_MODEL §6).
|
|
1148
1175
|
- **Host API.** `display.annotations.start(mode?)`, `stop()`, `show(marks)`,
|
|
1149
|
-
`focus(id)`, `track(id)`, `clear()`, `clearSelection()` (P115), and the
|
|
1150
|
-
event (`AnnotationReport`); the state is given to every frame the display runs (not a
|
|
1151
|
-
`clearSelection`: a new frame has no selection). `parseAnchor` checks an anchor a host
|
|
1176
|
+
`focus(id)`, `track(id)`, `clear()`, `clearSelection()` (P115), `focusMark(id)` (P134), and the
|
|
1177
|
+
`annotation` event (`AnnotationReport`); the state is given to every frame the display runs (not a
|
|
1178
|
+
`clearSelection`: a new frame has no selection; nor a `focusMark`). `parseAnchor` checks an anchor a host
|
|
1152
1179
|
stores (its server, before saving a comment).
|
|
1153
1180
|
|
|
1154
1181
|
Tests (`leak/annotate.spec.ts`, all three engines): a pick outlines and picks
|
|
@@ -1160,7 +1187,13 @@ they change; an MCP Apps view; and a hostile page faking every report (not asked
|
|
|
1160
1187
|
malformed, too large, the wrong kind, no such mark, a flood), whose negative
|
|
1161
1188
|
control is `annotation-checks`. Markers (P104): drawn with their numbers, a click
|
|
1162
1189
|
reported with its id and box and heard by none of the content's listeners, nor a
|
|
1163
|
-
double, right or middle click (`marker-click` → those two cases),
|
|
1190
|
+
double, right or middle click (`marker-click` → those two cases), by the keyboard
|
|
1191
|
+
too (P133: a button in reading order and named for what it is, Enter and Space
|
|
1192
|
+
reported once, a key held down once, none of it heard, nothing while elements are
|
|
1193
|
+
picked; `marker-key`, `marker-click` too), brought into view by the focus and keeping
|
|
1194
|
+
it through redraws, reached by the host's `focusMark` after its card closed and left
|
|
1195
|
+
alone where there's no such marker, by the kept `focus` (P134, `marker-focus`), at its paragraph's end past the last word, a nested block's
|
|
1196
|
+
words not its own, a draft's by its words; focus and
|
|
1164
1197
|
selection kept, a drag from a marker too (`marker-prevent` → the press case), none
|
|
1165
1198
|
without a count, stepping aside while picking, drawn whole at the frame's top; a
|
|
1166
1199
|
run of scrolls reported with only the marks that moved, a fixed one never; marks
|
|
@@ -1177,9 +1210,9 @@ the layer itself (`annotation-activated`, `annotation-activated-count`,
|
|
|
1177
1210
|
`MouseEvent`'s prototypes neither hearing a marker's press nor stopping its report
|
|
1178
1211
|
(`marker-originals`; `marker-click` too); a tap on a marker reported on each
|
|
1179
1212
|
engine, a touch screen and a phone's emulation (iPhone 13, Pixel 5), content hearing
|
|
1180
|
-
none of it (`marker-
|
|
1213
|
+
none of it (`marker-click`); on a 640 px column and a phone page's lines
|
|
1181
1214
|
with one marker each, no marker covering a word (`marker-place`, the marker just
|
|
1182
|
-
past its words as 0.9.0 had it); drafts (P107) drawn apart from posted marks on the
|
|
1215
|
+
past its words as 0.9.0 had it, which a draft's in a line's middle shows); drafts (P107) drawn apart from posted marks on the
|
|
1183
1216
|
same anchors (the frame's pixels and the words' own differ; on Chromium every draft's
|
|
1184
1217
|
marker and line drawn as a draft's, no number though given a count), a draft's and a
|
|
1185
1218
|
posted marker's clicks reported beside each other, none reaching the content
|
|
@@ -1497,10 +1530,11 @@ control the tables above name to the registry):
|
|
|
1497
1530
|
| `annotation-activated` | `annotate.spec.ts` | `a hostile page fakes a marker's click: the host takes it only for a mark it shows with a marker` | — | — |
|
|
1498
1531
|
| `annotation-activated-count` | `annotate.spec.ts` | `a hostile page fakes a marker's click: the host takes it only for a mark it shows with a marker` | — | — |
|
|
1499
1532
|
| `marker-trusted` | `annotate.spec.ts` | `a hostile page fakes a marker's click: the host takes it only for a mark it shows with a marker` | — | — |
|
|
1500
|
-
| `marker-click` | `annotate.spec.ts` | `markers: a mark with a count gets a numbered bubble; its click is reported and never reaches the content`, `a marker's press, of any kind, moves nothing of the content's: no handler, no focus, no selection`, `a page that patches the event's built-ins neither hears a marker's press nor stops its report (P105)`, `a tap on a marker is reported on every engine, and the content hears none of it (P105)`, `drafts (P107): a dashed line and a hollow marker with no number, apart from posted marks; their clicks are reported the same`, `on touch, a marker takes a tap a few px off its bubble (44 by 44), after the page scrolled itself; a tap past that is the page's (P119)`, `on touch, where two markers' 44 px boxes overlap, a tap is the nearest bubble's (P119)`, `a paragraph's marker pinned at the frame's top once its start scrolled away takes a mouse click and a tap where it is drawn (P119, porthole#42)` | — | — |
|
|
1533
|
+
| `marker-click` | `annotate.spec.ts` | `markers: a mark with a count gets a numbered bubble; its click is reported and never reaches the content`, `a marker's press, of any kind, moves nothing of the content's: no handler, no focus, no selection`, `a page that patches the event's built-ins neither hears a marker's press nor stops its report (P105)`, `a tap on a marker is reported on every engine, and the content hears none of it (P105)`, `a marker is a button the keyboard reaches: Tab in reading order, Enter and Space report it once, the content hears neither, and it steps aside while elements are picked (P133)`, `drafts (P107): a dashed line and a hollow marker with no number, apart from posted marks; their clicks are reported the same`, `on touch, a marker takes a tap a few px off its bubble (44 by 44), after the page scrolled itself; a tap past that is the page's (P119)`, `on touch, where two markers' 44 px boxes overlap, a tap is the nearest bubble's (P119)`, `a paragraph's marker pinned at the frame's top once its start scrolled away takes a mouse click and a tap where it is drawn (P119, porthole#42)` | — | — |
|
|
1501
1534
|
| `marker-prevent` | `annotate.spec.ts` | `a marker's press, of any kind, moves nothing of the content's: no handler, no focus, no selection` | — | — |
|
|
1502
1535
|
| `marker-place` | `annotate.spec.ts` | `text markers cover no word: on a column page, and on a phone's lines with one marker each (P105, #36)` | — | — |
|
|
1503
|
-
| `marker-
|
|
1536
|
+
| `marker-key` | `annotate.spec.ts` | `a marker is a button the keyboard reaches: Tab in reading order, Enter and Space report it once, the content hears neither, and it steps aside while elements are picked (P133)` | — | — |
|
|
1537
|
+
| `marker-focus` | `annotate.spec.ts` | `a page that patched focus isn't handed the marker the host's focusMark moves to (P134)` | — | — |
|
|
1504
1538
|
| `marker-originals` | `annotate.spec.ts` | `a page that patches the event's built-ins neither hears a marker's press nor stops its report (P105)` | — | — |
|
|
1505
1539
|
| `follow-throttle` | `annotate.spec.ts` | `an honest scroll session, long, in comment mode, leaves room for a marker's click: follow-ups, the selection's too, at most one a second` | — | — |
|
|
1506
1540
|
| `selection-follow` | `annotate.spec.ts` | `an honest scroll session, long, in comment mode, leaves room for a marker's click: follow-ups, the selection's too, at most one a second` | — | — |
|
|
@@ -1508,7 +1542,7 @@ control the tables above name to the registry):
|
|
|
1508
1542
|
| `draft-count` | `annotate.spec.ts` | `what the page reads of a draft (P107): that it is one, never its count; a posted mark as before` | — | — |
|
|
1509
1543
|
| `draft-shell-checks` | `annotate.spec.ts` | `the shell's own checks on a raw show (P107): a draft draws no number, a kind it doesn't know is no mark` | — | — |
|
|
1510
1544
|
| `annotation-activated-gesture` | `annotate.spec.ts` | `a hostile page's marker click with no gesture is dropped; one on the person's own press is the host's view to guard (P105)` | — | — |
|
|
1511
|
-
| `annotation-rect-clamp` | `annotate.spec.ts` | `a hostile page reports a box outside its frame: the host gets it clamped to the frame's viewport`, `marks: drawn over their anchors, one brought into view, an unfound one orphaned, all cleared`, `following: once a scroll settles, one report with only the marks that moved`, `every attached mark's place in the document comes with the scroll it was read at, offscreen ones too, and the followed mark's as the document scrolls (P132)` | — | — |
|
|
1545
|
+
| `annotation-rect-clamp` | `annotate.spec.ts` | `a hostile page reports a box outside its frame: the host gets it clamped to the frame's viewport`, `marks: drawn over their anchors, one brought into view, an unfound one orphaned, all cleared`, `following: once a scroll settles, one report with only the marks that moved`, `every attached mark's place in the document comes with the scroll it was read at, offscreen ones too, and the followed mark's as the document scrolls (P132)`, `a selection's and a mark's last line come in the document's coordinates with the scroll, offscreen ones too; rect stays clamped (P133)` | — | — |
|
|
1512
1546
|
| `authorize` | `served/authorize.spec.ts` | `a revoked subject's ticket opens nothing: a page and an app are denied, and the host is told`, `in a tab of its own, a revoked app and page are denied from the next request on`, `a framed page mid-session: its next load after revocation is denied where the engine keeps its cookie` | Chromium, Firefox: `a framed app mid-session: its next request after revocation is denied, and its next load tells the host` | — |
|
|
1513
1547
|
| `url-permissions` | `served/permissions.spec.ts` | `a url-mode frame gets no clipboard writes or full screen unless the host delegates them` | — | — |
|
|
1514
1548
|
| `navigate-guard` | `served/live.spec.ts`, `served/files.spec.ts`, `served/served.spec.ts`, `served/tab.spec.ts` | `served.domain.self-navigation`, `served.domain.tab-navigation`, `served.domain.tab-links`, `can't navigate itself away (location): to a site, or to another content origin`, `can't navigate itself away (replace): to a site, or to another content origin`, `can't navigate itself away (open-self): to a site, or to another content origin`, `can't navigate itself away (navigation-api): to a site, or to another content origin`, `a link to another page of the set opens it in the frame; the display goes on`, `a link to another page of the set opens it in the frame when the leaving page's notice is dropped (P098)`, `a link to another page of the set opens it in the frame when the leaving page's notice is late (P098)`, `a page opens nothing else: not a file that isn't a page, not another path of its origin`, `no report, content error or blocked navigation names the frame's sealed address (P083)` | — | — |
|