feat(vom): support visible-region screenshots for canvas visual refs | 支持按 Canvas visual ref 截取可见区域 - #211
Open
Ljy-0827 wants to merge 3 commits into
Open
Conversation
Ljy-0827
added this pull request to stack #210
September 10, 2026 04:09
Ljy-0827
force-pushed
the
feat/visual-region-screenshot
branch
from
September 10, 2026 04:21
725f6e6 to
31ddcb1
Compare
Ljy-0827
force-pushed
the
feat/visual-region-screenshot
branch
from
September 10, 2026 07:46
c1b4537 to
e402247
Compare
Ljy-0827
force-pushed
the
feat/visual-region-screenshot
branch
from
September 10, 2026 11:03
e402247 to
7bfc9a9
Compare
Ljy-0827
marked this pull request as ready for review
September 10, 2026 11:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
已有 Canvas visual ref 尚不能用于获取区域图像。本 PR 接入按需截图能力,使调用方可以通过
screenshot --ref获取指定 Canvas 当前可见区域的截图。主要变更
控制边界
关于 Canvas 截图前后可能产生的不一致性问题:身份变化可能让图片来自另一个页面或目标;后置布局变化使得无法说明截图当时的位置是否正确。 强制前后几何一致,会将这个不确定性全部转化为失败,对 hover、动画、异步加载页面不太友好。因此不应将截图期间的布局或页面变化加入硬校验。
本 PR 进行了取舍:控制目标身份的一致性,允许同一个 Canvas 的内容动态变化。
验证