The check recorded a canvas that stayed blank until its first 20 ms paint
tick, so on a loaded runner the video's opening frames were dark and the
pixel early in the segment read (28, 54) instead of red: main failed once
after #1872 and passed on the runs around it.
On a phone the field kept 60px on its right for the language picker even
where the application shows none, so it sat left of centre. It now keeps
16px either side, and leaves the picker its room only while it is there.
A canvas the panorama moved off (a second view drew its own) is no longer
ignored for good: its draws are counted, so an open waiting on one goes on,
and once a single view is left its canvas is taken back. Before, after the
second view left, the next 360° open waited forever and the panorama stayed
on the departed view's canvas.
A mount whose view unmounts it inside its first draw now fails as closed,
as every other unmounted mount does, rather than with a TypeError.
Both found in review; each new test fails without its fix.
Co-authored-by: Manjunath Paparaju <[email protected]>
Second review follow-ups:
- A mount woken without being drawn unmounts only its own presentation:
an earlier mount overtaken by a second mount of the same viewer fails
as closed and leaves the second one mounted and presented.
- A mount whose last view left fails only if no view has subscribed
since; one subscribed in the same tick draws it.
- Mount keys come from photoViewers.js's nextViewKey(), and a keyless
presentation is stamped from the same counter when any picker first
sees it, kept until it presents null: its rank no longer depends on the
picker's lifetime or the order it subscribes in.
- A canvas handed back while a panorama's open waits on its draw takes
the panorama: the open builds its renderer there instead of falling
back to the front view. A canvas the panorama moved off is not moved
back to, so two views drawing their own cannot take it in turns.
- The guard test also refuses compound writes (+=, ||=, ??=, &&=…),
destructuring writes to properties, Object.assign (other than onto a
new Error), Object.defineProperty and Reflect.set, and a catch binding
that shadows loadImage's image.
Nothing changes in the running app.
Co-authored-by: Manjunath Paparaju <[email protected]>
Review follow-ups to the previous commit:
- photoViewers.js ranks a presentation without a mountKey as mounted when
it began presenting (after the latest key seen, before any later mount),
so a photo viewer mounting while a keyless one shows is drawn and the
keyless one superseded; supersede is queued whenever more than one
presents after any change, not only when the pick changes.
- A panorama's open still waiting on a draw when the last view leaves
fails as closed and leaves no photo shown, instead of uploading to a
canvas never drawn. A mount waiting on its first draw then also fails as
closed and is unmounted, so a view subscribing later sees nothing.
- A view handing back another canvas element than the renderer's drops
the renderer and draws the panorama again on the new one, as after a
lost context.
- The guard test allows a .src write in loadImage only on the one `image`
binding, created by new Image() and never rebound or shadowed, and
refuses `(expr).src =` and bracket property writes anywhere.
- The test fakes' shared view is reset before each test
(resetPhotoView), so a viewer left by an earlier test is neither drawn
with nor superseded by a later test's.
Nothing changes in the running app.
Co-authored-by: Manjunath Paparaju <[email protected]>
Follow-ups to the photo viewer's move to a Vue view (#1868):
- A panorama's open waits for a draw of the canvas counted from before it
is shown, so a view that draws at once inside its listener no longer
leaves the open pending; and when the last view unsubscribes, an open
waiting on a draw goes on instead of hanging.
- photoViewers.js supersedes the mounts not drawn on a microtask, after
the winning presentation has reached every subscriber: a second
subscriber sees the earlier mount, then the later one, never null
between.
- A presentation without a mountKey counts as the latest mount (among
several without, the one that began presenting last), and one without
actions or supersede is passed over without throwing. Both fields are
documented on ViewerAdapter.subscribeView in registry.js and in the
store's comment.
- The guard test also refuses .width, .height, .ariaLabel, .id and .value
writes in photoViewer.js, and .src writes outside loadImage, where only
the off-page Image it creates may take one.
- The test fakes draw every viewer through one shared view behind
photoViewers.js's picker, as the application does, so provider and
layer tests see supersede.
Nothing changes in the running app.
Co-authored-by: Manjunath Paparaju <[email protected]>
While a selected vessel, aircraft or military aircraft is off screen, behind
the globe or out of its layer's feed, its Context card shows Find it. One
still in its feed is flown to (an aircraft followed). One out of its feed is
looked up on its own track at the layer's time (the world clock's while the
layer follows it), the card moves to that reading and says how old it is, and
the camera flies there; once the feed has it again its layer selects it again.
With no reading at or before the time the card says so and the camera stays.
A vessel its layer announces is named by its own id, as a click names it,
not by the context store's.
Following review, the scan now also:
- reads every SFC's script blocks, not only modules;
- matches a createElement call Prettier wraps over lines, and any case of
the tag name;
- fails on a button, select, input or textarea written as markup in a
string, comments aside, apart from the globe panel's standalone page
(plain HTML a host serves, with no Vue or kit), which the test names and
requires to still be the reason;
- catches a Material class built in a template string;
- reads an input's type when bound to a quoted literal or named in a
v-bind object, in any case, and unquoted before `/>`;
- catches a Material class named in a v-bind object.
Each new path was confirmed to fail when its violation is put back.
docs/VUE-MIGRATION.md now names the globe panel page as the exception,
lists the two text areas among the native fields left, and notes that the
scene dialog's field takes text-like types from its callers only.
Co-authored-by: Manjunath Paparaju <[email protected]>
viewControls.test.mjs now reads every SFC outside the kit for a raw
<button>, a tag whose class (static or bound) names a Material Symbols
style, a native checkbox, and a native range other than the radio tuner's
and the world timeline's. It also reads every module under src outside the
kit, tests and test support for a button, select, input or textarea built
with createElement, or a Material Symbols class written in script. Every
check passes on main as it stands; each was confirmed to fail when its
violation is put back (a button, a glyph span, a checkbox, a range, a
script-built button and a script-written glyph class).
docs/VUE-MIGRATION.md says that no view hand-writes a control the kit has,
names the native fields left and points at the scan.
Co-authored-by: Manjunath Paparaju <[email protected]>
createApplicationControls takes startLayers, the layer ids that turn on when
the address carries no link (none by default). They restore through the
passive start-up path, so they are never written as the user's own choice, and
a link's own layers always win.
iPhone Safari zooms the page in whenever a text field under 16 px gets focus,
and every field in the app is under 16 px, so tapping the search box left the
page zoomed in with its buttons out of reach. The viewport now has a maximum
scale of 1, as map pages usually do: the map handles pinch zoom itself, and
iPhones still let a pinch zoom the page.