Commit Graph
11100 Commits
Author SHA1 Message Date
dotCooCoo fd50e7dba1 Scripts: proxies take Symbol keys through their traps
A Symbol key on a proxy read, wrote, tested, deleted and described the
proxy's own Symbol table, so the target never saw it and no trap ran.
Every Symbol path now resolves a proxy the way a string key does: the
get, set, has, deleteProperty, defineProperty and getOwnPropertyDescriptor
traps receive the Symbol, and without a trap the operation reaches the
target with its writable and accessor checks. A super write and a write
on a primitive that reach a proxy go through its [[Set]].

- ownKeys traps may return Symbols; a duplicate Symbol (by identity) or
  any other value is a TypeError, and the result is checked against the
  target's non-configurable and, for a non-extensible target, all keys
  of both kinds, in the target's own key order.
- Reflect.ownKeys lists Symbols, in the trap's order for a proxy, and
  Reflect's other functions take Symbol keys. Object.freeze, seal,
  isFrozen and isSealed include a proxy's Symbols instead of throwing.
- Symbol key lists stay rooted and charged to the heap until released.
- new Proxy and Proxy.revocable reject a revoked target or handler.
- A typed array reached on the prototype chain as the receiver converts
  the value for an index it lacks.
- The eval redeclaration test asserts the runtime SyntaxError.
2026-11-29 22:20:58 -08:00
dotCooCoo 3ce03dbf6e Scripts: ES2015 realms have Object.setPrototypeOf
A realm made with Options::es2015 had no Object.setPrototypeOf, so a
call threw "the value is not a function". It now follows ECMA-262 2015
section 19.1.2.18: undefined or null for the object, or a prototype
that is neither an object nor null, is a TypeError; any other primitive
is returned unchanged; an object whose [[SetPrototypeOf]] gives false
is a TypeError.

It calls the same [[SetPrototypeOf]] as Reflect.setPrototypeOf
(Interp::set_prototype_of in crates/js/src/proxy.rs). A non-extensible
object given a different prototype, Object.prototype given any other
prototype than null, and a prototype whose chain leads back to the
object give false. For a proxy it calls the handler's setPrototypeOf
trap, or sets the target's prototype when there is no trap; a false
result, a revoked proxy and a trap that breaks the section 9.5.2
invariant are TypeErrors. Each prototype the cycle check passes takes
fuel, and a sparse array walk that is running sees indices the new
prototype brings. The function has length 2 and the name
setPrototypeOf, and a realm made without the option does not have it.
2026-11-29 18:59:03 -08:00
dotCooCoo 793d0f0832 JavaScript: stringify keeps array key lists charged, revokers drop their proxy, host constructors refuse distinct new targets, and GeneratorFunction parses before reading the prototype 2026-11-29 00:02:31 -08:00
dotCooCoo be9ce43ce2 JavaScript: concat and JSON revivers read proxy array lengths with ToLength, reviver key lists stay charged, and E4X bare calls walk the scope once 2026-11-28 23:46:42 -08:00
dotCooCoo 94cbceb676 JavaScript: JSON reads proxy array lengths with ToLength and skips host indexers through transparent proxies, and proxies construct bound built-ins 2026-11-28 23:24:50 -08:00
dotCooCoo 0248f7eb74 JavaScript: for-in keeps a detached proxy reachable, Promise checks its executor first, and late Proxy and Reflect respect a sealed global 2026-11-28 23:11:43 -08:00
dotCooCoo c7c77fea24 Merge main into feat/js-es2015-proxy-reflect-m 2026-11-28 22:25:59 -08:00
dotCooCoo 8c7c3d9ead JavaScript: Map and Set built for another newTarget use its adder, and Reflect has its tag
Reflect.construct of Map, Set, WeakMap and WeakSet with another newTarget fills the collection through the new prototype's adder, new through an empty-handler proxy of a host class constructs the class, Reflect has Symbol.toStringTag, and an ownKeys result is read in full before a duplicate is refused.
2026-11-28 22:25:57 -08:00
.CooCoo c62571e073 Merge pull request #8822 from Hassan1305/fix-8531-snap-budget-edges
Smart Guides: the topmost objects keep their snap targets in a document past the anchor budget (#8531)
2026-11-28 22:17:29 -08:00
dotCooCoo f3b3cbfe67 JavaScript: proxies keep revocation, namespace and collection rules, and key lists stay counted
A revoked proxy no longer gives its own Symbol properties, the reflect extension reads proxies without running traps, key lists a proxy gives stay counted against the heap while callers use them, has through a proxy of a host collection asks the collection, a proxy's invariant checks keep a namespace's uninitialized-export errors, and a binary constructor checks its arguments before it reads newTarget's prototype. Trap arguments stay rooted while a trap runs.
2026-11-28 22:16:56 -08:00
dotCooCoo e1138f83ef Merge main into feat/js-es2015-proxy-reflect-m 2026-11-28 21:56:31 -08:00
dotCooCoo 457661418b JavaScript: Reflect.ownKeys lists index keys first and proxy writes skip typed-array gaps
Reflect.ownKeys and a proxy without an ownKeys trap list integer-index keys in ascending order first. Reflect.construct takes another newTarget for Map, Set and typed arrays, for-in reads each proxy key's descriptor once, deleting a with binding runs only the deleteProperty trap, a write past a typed array's view on the prototype chain is ignored, and a target's descriptor stays reachable while a trap runs. The crate documentation states that traps take string keys only.
2026-11-28 21:56:29 -08:00
.CooCoo 88772eefd1 Merge pull request #10043 from dotCooCoo/fix/panel-drags-after-file-revert
Drag and drop: panel drags held across File › Revert are not dropped on the restored drawing
2026-11-28 21:53:55 -08:00
dotCooCoo af9709b16f JavaScript: proxies follow module namespaces, for-in key accounting and built-in construction
A proxy's descriptor and write paths honor a module namespace's uninitialized exports and read-only writes, for-in through proxies counts the keys it keeps against the heap limit, new through an empty-handler proxy of a built-in constructs it, and revoke has its standard name and length. Object.freeze, seal, isFrozen and isSealed throw a TypeError for a proxy whose target chain has Symbol properties.
2026-11-28 21:46:06 -08:00
dotCooCoo e6ffa5cc9e Merge main into fix/panel-drags-after-file-revert 2026-11-28 21:43:03 -08:00
.CooCoo 677414e15e Merge pull request #8131 from dotCooCoo/feat/color-wheel-copy-color-as
Part of #978: Copy Color As in the Color Wheel panel copies the color as hex, hex with alpha, CSS or CMYK values
2026-11-28 21:39:54 -08:00
dotCooCoo 288c14310d Merge main into feat/color-wheel-copy-color-as 2026-11-28 21:39:07 -08:00
.CooCoo 8ea80cb3bf Merge pull request #9093 from dotCooCoo/feat/hairline-slivers
Clean Up: remove hairline slivers thinner than a set width
2026-11-28 21:38:18 -08:00
dotCooCoo 9ab563b0c3 Merge main into feat/js-es2015-proxy-reflect-m 2026-11-28 21:33:35 -08:00
HassanKhan 78795e188b Merge remote-tracking branch 'upstream/main' into fix-8531-snap-budget-edges
# Conflicts:
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-29 10:20:07 +05:00
dotCooCoo cfd6aed392 JavaScript: proxies keep their traps after the merge with main
Function.prototype.bind reads a proxy's prototype through its trap, Object.prototype.toString reads a proxy's Symbol.toStringTag from its target, Reflect.set writes a typed array's elements, a super assignment runs the set trap of a proxy on the home object's chain, and 'in' asks a proxy's has trap once. The name a trap is given is counted against the heap and fuel limits, and Proxy and Reflect stay reachable while their functions are installed.
2026-11-28 21:18:51 -08:00
dotCooCoo 5f99cb7ebb Libraries: a swatch row held across File › Revert is not added to a library
The Libraries panel accepted a swatch row dragged before File › Revert and added the restored swatch of that name. Membership::grabbed now refuses stale rows, for the hover marker and on release.
2026-11-28 21:05:01 -08:00
dotCooCoo cb75bb73fc Merge main into feat/scripts-app-undo-redo
# Conflicts:
#	crates/engine/src/cmd/scripts.rs
2026-11-28 20:45:40 -08:00
.CooCoo 2255484d45 Merge pull request #9132 from dotCooCoo/feat/js-es2015-modules
JavaScript: a .mjs script runs as an ECMAScript 2015 module
2026-11-28 20:44:58 -08:00
dotCooCoo cac93ca107 Merge main into feat/js-es2015-modules 2026-11-28 20:44:06 -08:00
.CooCoo eaad35e231 Merge pull request #9108 from dotCooCoo/feat/plugin-api-localized-labels
Plug-ins: names and labels show in the UI language from the manifest's translations
2026-11-28 20:41:55 -08:00
dotCooCoo 5a8f56dc4e Merge main into feat/hairline-slivers 2026-11-28 20:07:16 -08:00
dotCooCoo aa5f1bdca1 Clean Up: Hairline Slivers leaves art at 0% opacity alone
A sliver at 0% opacity, or inside a group or layer at 0% opacity, paints
nothing, so Clean Up and Select > Object > Hairline Slivers now skip it.
The params text and docs/mcp.md say so, and docs/mcp.md also names what a
group or compound path used as a clipping path holds among the objects
both commands leave.
2026-11-28 20:07:16 -08:00
.CooCoo 70e3cc7e02 Merge pull request #8824 from dotCooCoo/fix/issue-1232
Live Corners: pick any corner widget with Direct Selection
2026-11-28 20:05:41 -08:00
dotCooCoo 87456c5b35 Merge main into fix/issue-1232 2026-11-28 20:00:34 -08:00
dotCooCoo f9496f6c59 Merge main into feat/color-wheel-copy-color-as 2026-11-28 19:54:43 -08:00
dotCooCoo ecf193cc06 Merge main into feat/scripts-app-undo-redo
# Conflicts:
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/target-app-parity.md
2026-11-28 19:47:12 -08:00
dotCooCoo 3e2a615aee Merge main into feat/js-es2015-modules 2026-11-28 19:45:10 -08:00
dotCooCoo 3381168a7e Drag and drop: panel drags held across File › Revert are not dropped on the restored drawing
#9931 refused an appearance carried across File › Revert. Graphic styles,
brushes, symbols, swatch rows and appearance stack rows had the same fault:
a held drag still resolved a name or id against the restored contents.

- Graphic style, brush, symbol and swatch drags carry the document's revert
  count, and the canvas, the panels, the Fill/Stroke wells and the Gradient
  slider refuse a drag from before the revert.
- The Brushes panel shows no reorder marker for a stale brush drag.
- docs/mcp.md says which drops File › Revert cancels.

Follows #9931 by @dotCooCoo.
2026-11-28 19:41:34 -08:00
.CooCoo 4f7fe4556e Merge pull request #9005 from dotCooCoo/feat/color-wheel-contrast-lines
Color Wheel: the box and the wheel mark the contrast lines and offer the closest passing color
2026-11-28 19:39:31 -08:00
.CooCoo 8cdff3aacf Merge pull request #10025 from dotCooCoo/fix/docs-test262-count
Docs: test262 counts match what cargo xtask test262 reports on main
2026-11-28 19:39:01 -08:00
.CooCoo a3485952ce Merge pull request #10023 from dotCooCoo/fix/js-eval-new-target-super
Scripts: direct eval inside a method or derived constructor reads super
2026-11-28 19:38:45 -08:00
dotCooCoo 1ad8134791 Merge main into feat/color-wheel-contrast-lines 2026-11-28 19:38:37 -08:00
dotCooCoo 828eb27097 Merge main into feat/plugin-api-localized-labels
# Conflicts:
#	crates/plugins/src/manifest.rs
#	crates/ui-egui/src/tests/panel_harness.rs
2026-11-28 19:28:43 -08:00
dotCooCoo 321ae3dfc0 Scripts: describe app.redraw apart from undo and redo, and drop a repeated indexer test
app.redraw() changes nothing, so docs/mcp.md now describes it on its own. The undo step a run
leaves is stated for documents that were open before the run and are still open after it.
main's own indexer tests already check the receiver's and the key's limits.
2026-11-28 19:24:00 -08:00
dotCooCoo ebeaa1d91f Merge main into feat/plugin-api-localized-labels 2026-11-28 19:20:09 -08:00
dotCooCoo 53c5c8e07f Merge main into feat/js-es2015-proxy-reflect-m 2026-11-28 18:48:04 -08:00
dotCooCoo b0e8c2055f Merge main into feat/js-es2015-proxy-reflect-m
Proxies join main's construct path in class_ops.rs: new and Reflect.construct both run the construct trap there, with new.target passed through. A Symbol-key lookup passes through a proxy to its target, so spread and for-of read a proxy of an array with the array iterator.
2026-11-28 18:47:57 -08:00
dotCooCoo 6112616e13 Merge main into feat/scripts-app-undo-redo 2026-11-28 18:30:41 -08:00
.CooCoo dc2c6ff30f Merge pull request #9061 from dotCooCoo/feat/scripts-api-d4b-text-styles
Scripts: character and paragraph styles for scripts
2026-11-28 18:26:11 -08:00
.CooCoo 06f7b28a43 Merge pull request #9903 from dotCooCoo/feat/distorted-image-place-replace
Place: Replace keeps a distorted image's corners for a raster file
2026-11-28 18:14:53 -08:00
dotCooCoo d75ba761d4 Merge main into feat/distorted-image-place-replace 2026-11-28 18:13:24 -08:00
dotCooCoo 44c89a7912 Merge main into feat/scripts-api-d4b-text-styles 2026-11-28 18:11:24 -08:00
dotCooCoo c0bf4bd30b Docs: test262 counts match what cargo xtask test262 reports on main
The progress lines for the ES5 language runs, the ECMAScript 2015
collections and binary data runs, and the generator runs gave counts from
before later changes. On main at 0ac2b74614, cargo xtask test262 reports
4,676 of 4,682 ES5 language runs, 1,514 of 1,514 collection and binary
data runs, and 1,285 of 1,289 generator runs (669 tests) passing. The
generator tests that use classes now parse, so the 4 remaining generator
failures are the caller and arguments restrictions.
2026-11-28 17:59:50 -08:00
.CooCoo 0ac2b74614 Merge pull request #9055 from dotCooCoo/feat/scripts-api-d9-do-script
Scripts: app.doScript plays an action of the Actions panel
2026-11-28 17:55:11 -08:00