Web source: render at canvas size 1920x1080 — full-bleed widgets no longer truncated to upper-left
This commit is contained in:
+20
-19
@@ -6,32 +6,33 @@
|
||||
working). **NOT pushed — user rule: never push without explicit instruction (2026-08-24).** No feature
|
||||
branches pre-1.0: all work lands on `main` per work unit.
|
||||
|
||||
## The web-source rendering work (2026-08-28) — CURRENT MODEL: stable viewport + content-bounds crop
|
||||
## The web-source rendering work (2026-08-28) — CURRENT MODEL: canvas-size viewport + content crop
|
||||
|
||||
**Background:** viewport==box made dragging the box reflow the page (truncation, scrollbars,
|
||||
unrecoverable image, "janky at stressful geometries"). Fixed-viewport + `Uniform` left letterbox
|
||||
dead space. CSS reset enlarged the gap. Scrollbars were called "super fail". The right/bottom
|
||||
dead-space + "not anchored at (0,0)" report persisted across every model — dead space was
|
||||
page-internal (widget content smaller than the viewport), which is now cropped out.
|
||||
**Root cause finally isolated:** hosting the page at the ELEMENT-box size clips full-bleed widgets
|
||||
(designed for ~1920×1080) to their upper-left chunk inside a small viewport — "image truncated to
|
||||
the upper-left corner regardless of scaling." That truncation persisted across every earlier
|
||||
model because all of them rendered the page at the box (or a mix); e917c41's full 1920×1080
|
||||
render was the only one that showed full content, and its letterbox dead space was purely the
|
||||
display `Uniform` + the box aspect mismatch — not the render.
|
||||
|
||||
**The model that satisfies invariants (implemented, visual verification pending):**
|
||||
- `Services/WebView2Manager.cs` — stable viewport = the element's size at `Register` (snapshot,
|
||||
never tracked → no reflow/truncation during resize). `overflow:hidden` (html+body) +
|
||||
transparent-bg injection on every nav (nothing else). After each navigation,
|
||||
**The model (implemented, visual verification pending):**
|
||||
- `Services/WebView2Manager.cs` — page renders at the MASTER CANVAS size (1920×1080), stable,
|
||||
never tracked: full-bleed widgets render FULL (no upper-left truncation); dragging the box never
|
||||
reflows the page; `overflow:hidden` (html+body) + transparent-bg injection. After each nav
|
||||
`QueryContentBoundsAsync` reads the page's real content rect
|
||||
(`scrollWidth/scrollHeight` vs `innerWidth/innerHeight` via `ExecuteScriptAsync` + JSON) and
|
||||
`CaptureFrame` **crops the capture to the actual content bounds, anchored at (0,0)** — dead
|
||||
space inside the viewport no longer reaches the box. Immediate capture on `NavigationCompleted`.
|
||||
- `MainWindow.xaml` — web `<Image>` uses `Stretch="Fill"`: the cropped frame maps edge-to-edge,
|
||||
so the selection box always bounds the real widget. `FramePump` unchanged.
|
||||
- Invariants: **page viewport stable; display Fill-crops to content and fills the box.**
|
||||
(`scrollWidth/scrollHeight` vs `innerWidth/innerHeight`) and `CaptureFrame` **crops to the
|
||||
actual content bounds anchored at (0,0)**. Immediate capture on `NavigationCompleted`.
|
||||
- `MainWindow.xaml` — web `<Image>` `Stretch="Fill"`: the cropped 1920×1080 frame maps flush under
|
||||
the box (Box == widget bounds at every size, pinned (0,0), no dead space).
|
||||
- Invariants: **render at canvas size; crop to content; Fill to box.**
|
||||
|
||||
**Property panel / sliders (2026-08-28):** web URI ✕ clears the textbox; web ✓/✕ icon buttons
|
||||
`IsTabStop="False"` so Tab walks X→Y→W→H→URI; Slider style `IsMoveToPointEnabled="True"`
|
||||
restores click-anywhere-on-bar.
|
||||
restores click-anywhere-on-bar. All three confirmed fixed by the creator.
|
||||
|
||||
Build: 0 warnings; tests 4/4. Rejected for the record: fixed 1920×1080+`Uniform` (letterbox),
|
||||
CSS margin/100% reset (enlarged gap), viewport==box (reflow/truncation/scrollbars).
|
||||
Build: 0 warnings; tests 4/4. Rejected for the record: box-sized viewport (upper-left truncation),
|
||||
fixed 1920×1080 + `Uniform` (letterbox dead space), CSS margin/100% reset (enlarged gap),
|
||||
viewport==box (reflow/truncation/scrollbars).
|
||||
|
||||
## Key facts / landmines
|
||||
|
||||
|
||||
Reference in New Issue
Block a user