Compare commits

..

4 Commits

Author SHA1 Message Date
kl
02bcd35779 verify: 回退到原始 OFD 修复版本进行验证 (#724)
使用原始选择器 #content svg { overflow: hidden !important; }
验证该版本是否存在问题
2026-03-11 21:02:55 +08:00
kl
b6dd8129ea refactor: 优化 OFD 表格溢出修复选择器 - 仅覆盖有 inline style 的 SVG
采纳 Copilot 的建议,改用更精准的选择器 #content svg[style="overflow:visible"]。
这样可以只覆盖有 inline style overflow:visible 的 SVG 容器,避免影响其他
已有 overflow:hidden 的元素。保留完整的注释说明问题根因和解决方案。

Ref: Copilot suggestion on PR #723
2026-03-11 20:37:01 +08:00
kl
db5cd68a1e fix: OFD 表格竖线溢出修复 (#723)
cnofd 库渲染 OFD 表格时,为每个元素创建独立 SVG 容器并设置
inline style overflow:visible。当表格中间竖线的 path 元素
y 坐标超过 SVG 容器高度时,线条会溢出到表格底部边框之外。

修复方案:对 #content 下的 SVG 元素强制 overflow:hidden,
使用 !important 覆盖 inline style,精确裁剪超出部分。

Closes #xxx
2026-03-11 20:04:00 +08:00
kl
d1c310ab63 test(e2e): expand archive format coverage (tar/tgz/7z/rar) (#720)
* test(e2e): expand archive coverage to tar/tgz/7z/rar

* test: address copilot archive fixture review feedback

* test(e2e): add rar smoke coverage and align archive deps

* test(e2e): make tgz fixture gzip header deterministic

* test(e2e): keep legacy zip temp dir ignored

* test(e2e): address remaining copilot review comments

* test(e2e): make 7z fixture generation deterministic and strict

* test(e2e): fail fast when sample.rar fixture is missing
2026-03-09 12:44:48 +08:00
2 changed files with 23 additions and 3 deletions

View File

@@ -202,6 +202,13 @@ body { margin: 0; }
src: url(./fonts/simhei.woff);
}
/* OFD 表格竖线溢出修复 */
/* cnofd 库在 SVG 上设置了 inline style overflow:visible导致表格中间竖线的 */
/* path 元素超出 SVG 容器高度后仍然可见。使用 !important 覆盖 inline style。 */
#content svg {
overflow: hidden !important;
}
.gray {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);

View File

@@ -87,9 +87,15 @@ try {
ensureArchive('sample.7z', out => {
try {
execFileSync('7z', ['a', '-bd', '-y', out, 'inner.txt'], { cwd: archiveWork });
} catch {
execFileSync('bsdtar', ['-a', '-cf', out, 'inner.txt'], { cwd: archiveWork });
execFileSync('7z', ['a', '-bd', '-y', '-mtc=off', '-mta=off', '-mtm=off', out, 'inner.txt'], {
cwd: archiveWork,
});
} catch (err) {
if (err && typeof err === 'object' && 'code' in err && err.code === 'ENOENT') {
execFileSync('bsdtar', ['-a', '-cf', out, 'inner.txt'], { cwd: archiveWork });
} else {
throw err;
}
}
});
} catch (err) {
@@ -99,6 +105,13 @@ try {
fs.rmSync(archiveWork, { recursive: true, force: true });
}
const rarFixture = path.join(fixturesDir, 'sample.rar');
if (!fs.existsSync(rarFixture)) {
throw new Error(
'Missing required fixture tests/e2e/fixtures/sample.rar. Restore it from git (e.g. `git checkout -- tests/e2e/fixtures/sample.rar`) before running e2e.'
);
}
// 1x1 png
write(
'sample.png',