ElyMark: the probe also requires each task box drawn (R2.14)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 09:01:13 -04:00
1 parent 8a7e45d901
commit b3fc6c9c82
3 files changed
+7 -3

No files matched your search

+2 -1
View File
@@ -63,7 +63,8 @@ const CHECK: &str = r#"
const line = range.getClientRects()[0];
const top = item.getBoundingClientRect().top + parseFloat(mark.marginTop);
const size = parseFloat(getComputedStyle(item).fontSize);
return [parseFloat(mark.width) / size, parseFloat(mark.height) / size, top + parseFloat(mark.height) / 2 - (line.top + line.height / 2)];
const drawn = mark.content !== 'none' && parseFloat(mark.borderTopWidth) > 0 && mark.borderTopStyle !== 'none';
return [parseFloat(mark.width) / size, parseFloat(mark.height) / size, top + parseFloat(mark.height) / 2 - (line.top + line.height / 2), drawn];
}),
cells: view.querySelectorAll('.milkdown td').length,
notes: view.querySelectorAll('[data-type="footnote_definition"]').length,
+3
View File
@@ -0,0 +1,3 @@
FAIL
apps/ely-mark/examples/markprobe.rs:60(tests/scripts/mark-content.sh:66):任务框回归只读取伪元素的计算样式,遗漏任务框实际生成及可见性的断言。复现:在独立副本中仅删除 main.css:121 的 `content: '';`,重新构建并完整运行 `bash tests/scripts/mark-content.sh`,原生窗口截图中已勾选和未勾选框均消失,脚本仍以 0 退出并输出 `ok: mark content (background share 0.9458)`;visual、themed、preview 三阶段的两个框仍各报告 `[1,1,0.04688]`,会放过违反 R2.14 的任务框消失回退。修复方向:逐项校验伪元素确已生成且可见,并加入删除 `content` 声明的负例,使框消失触发测试失败。
+2 -2
View File
@@ -63,8 +63,8 @@ for step in ("visual", "themed", "preview"):
("cells", 2), ("notes", 1), ("font", True), ("editors", 1)]:
want(step, key, value)
# Every task box: text-sized, centred on its line.
for width, height, off in seen[step]["boxes"]:
if abs(width - 1) > 0.01 or abs(height - 1) > 0.01 or abs(off) > 1:
for width, height, off, drawn in seen[step]["boxes"]:
if not drawn or abs(width - 1) > 0.01 or abs(height - 1) > 0.01 or abs(off) > 1:
sys.exit(f"FAIL: {step} task boxes are {seen[step]['boxes']}")
blocks = seen[step]["blocks"]
if [block["language"] for block in blocks] != languages: