Skip to content

fix(harness): detect clipped shading occlusion - #1452

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1450-layout-clipped-shade-visibility
Aug 31, 2026
Merged

fix(harness): detect clipped shading occlusion#1452
developer0hye merged 1 commit into
mainfrom
fix/issue-1450-layout-clipped-shade-visibility

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • Track clip_path, fill_shade, and pop_clip operations in trace order so the layout audit can recognize text hidden by a later opaque clipped shading.
  • Intersect nested rectangular clips and deliberately decline non-rectangular, rotated, non-extended, translucent, or non-covering cases rather than overclaiming occlusion.
  • Add focused coverage for paint order, opacity, coverage, transformed clips,
    nested clip scope, self-intersecting paths, and multiple subpaths.

Related issue

Fixes #1450

Testing

  • TDD red: python3 -m unittest scripts.tests.test_compare_layout.MatchAndDiffTest.test_same_text_hidden_by_later_clipped_shading_reports_visibility_mismatch failed before the implementation with AssertionError: 0 != 1.
  • python3 -m unittest scripts.tests.test_compare_layout (35 passed)
  • python3 -m unittest scripts.tests.test_check_visual_pr scripts.tests.test_probe_harness scripts.tests.test_check_layout_baselines scripts.tests.test_generate_layout_baselines (118 passed)
  • python3 -m unittest discover -s scripts/tests (275 passed)
  • python3 scripts/compare_layout.py --json GT.pdf OUTPUT.pdf against the PR fix(docx): honor in-cell picture row floors #1407 / issue Place your event title here.docx #1219 two-page PDFs: page-1 Sensitivity:Internal changes from the false GT hidden vs output painted mismatch to hidden on both sides; page 2 remains painted on both sides. The report diff contains no other change, and the remaining layout findings stay tracked in DOCX missing-font selection changes table wrapping and placement across hosts #1409.
  • git diff --check
  • Documentation freshness audit: PASS

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added
  • Reason: this changes only trace-based audit classification; office2pdf PDF generation and pixels are unchanged.

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining visual deviations each reference an open issue

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit 64aa9c7 into main Aug 31, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harness: detect text occluded by clipped opaque shadings

1 participant