Skip to content

fix: 표 셀 검정 배경 렌더링 — pattern_type 검사 누락 수정 (closes #782)#788

Closed
oksure wants to merge 1 commit into
edwardkim:develfrom
oksure:contrib/hwp-cell-bgcolor-alpha
Closed

fix: 표 셀 검정 배경 렌더링 — pattern_type 검사 누락 수정 (closes #782)#788
oksure wants to merge 1 commit into
edwardkim:develfrom
oksure:contrib/hwp-cell-bgcolor-alpha

Conversation

@oksure

@oksure oksure commented May 10, 2026

Copy link
Copy Markdown
Contributor

요약

HWP 문서의 표 셀이 검정 배경으로 렌더링되는 문제 수정.

원인

style_resolver.rsresolve_single_border_style에서 셀 fill_color 결정 시 pattern_type 검사 누락:

// 기존: alpha만 검사
if (s.background_color >> 24) != 0 { None }

// 수정: pattern_type + alpha 검사
if s.pattern_type > 0 || (s.background_color >> 24) != 0 { None }

pattern_type > 0일 때 background_color는 패턴의 배경색이지 셀의 단색 fill이 아님.
layout/utils.rs(도형 경로)는 이미 동일 로직 적용 중이었으나 style_resolver.rs(표 셀 경로)만 누락.

영향

검증

  • cargo test --release ✅ ALL GREEN
  • cargo clippy -- -D warnings ✅ 경고 없음

감사합니다.

style_resolver의 fill_color 판정에 pattern_type 검사 누락.
pattern_type > 0 (패턴 채우기)인 경우 background_color는 패턴 배경이지
셀 단색 fill이 아님 — fill_color=None으로 처리해야 함.

layout/utils.rs는 이미 동일 패턴 (pattern_type > 0 || alpha != 0 → None)
적용 중이었으나, style_resolver.rs는 alpha만 검사 → 0x00000000(검정)이
fill_color로 통과되어 표 셀이 검정 배경으로 렌더링.
Copilot AI review requested due to automatic review settings May 10, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

HWP 문서에서 **패턴 채우기(border fill의 pattern_type > 0)**가 적용된 표 셀이 단색 채우기로 잘못 해석되어 검정 배경으로 렌더링되는 문제를 수정합니다. 도형(drawing) 경로에서 이미 적용 중인 로직과 동일하게, 표 셀(BorderFill) 경로에서도 pattern_type을 함께 검사해 단색 fill 색상 산출을 방지합니다.

Changes:

  • resolve_single_border_style에서 fill_color 결정 시 pattern_type > 0이면 단색 fill로 처리하지 않도록 조건 추가
  • 패턴 채우기 케이스에 대한 주석 보강

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

edwardkim added a commit that referenced this pull request May 10, 2026
PR #745 (5/10 머지) 영역 영역 작업지시자 시각 검증 영역 발견 결함 (Issue #782) 정정 — samples/aift.hwp 페이지 2 영역 영역 일부 표 셀 검정 단색 fill.

본질: style_resolver.rs (표 셀 경로) 영역 영역 pattern_type 검사 누락. layout/utils.rs (도형 경로) 영역 영역 이미 동일 가드 정합 영역 영역 비대칭 본질.

정정 (style_resolver.rs +2/-1, 1 라인 가드):
- 기존: alpha 만 검사 — if (s.background_color >> 24) != 0 { None }
- 수정: pattern_type + alpha 검사 — if s.pattern_type > 0 || (s.background_color >> 24) != 0 { None }

영향: pattern_type > 0 시 background_color 영역 영역 패턴 배경색 (셀 단색 fill 아님) → 검정 단색 fill 차단.

검증:
- cargo build/test/clippy --release ALL GREEN
- 광범위 sweep 170/170 same (sweep fixture aift 영역 영역 다른 페이지 영역 영역 영향 부재)
- aift.hwp 페이지 2 SVG export 영역 영역 rect 검정 fill 0회 입증 (출력: output/svg/pr788/aift_002.svg)
- 작업지시자 시각 판정 ✅ 통과 (VSCode SVG 뷰어 dark mode 배경 영역 영역 검정 보였음 — 결함 부재)

closes #782
@edwardkim

Copy link
Copy Markdown
Owner

@oksure 검토 완료했습니다. 감사합니다.

처리 결과

Merge commit: 329698f8 (devel)

본질

feedback_image_renderer_paths_separate 권위 사례 강화 — 동일 본질 영역 영역 다른 경로 (도형 vs 표 셀) 비대칭 정정. layout/utils.rs (도형 경로) 영역 영역 이미 정합된 pattern_type > 0 가드 영역 영역 style_resolver.rs (표 셀 경로) 영역 영역 누락 본질을 정확히 발견.

검증

  • cargo build/test/clippy --release ALL GREEN
  • 광범위 sweep 170/170 same
  • aift.hwp 페이지 2 SVG export 영역 영역 rect 검정 fill 0회 입증
  • 작업지시자 시각 판정 통과 (VSCode SVG 뷰어 dark mode 배경 영역 영역 검정 보임 — SVG 자체 정합)

closes #782.

5/11 사이클 3번째 PR — 수고하셨습니다.

@edwardkim

Copy link
Copy Markdown
Owner

Merged. Merge commit: 329698f

@edwardkim edwardkim closed this May 10, 2026
edwardkim added a commit that referenced this pull request May 10, 2026
PR #788 (closes #782) — 표 셀 pattern_type 가드 정정.
feedback_image_renderer_paths_separate 권위 사례 강화 — 도형 vs 표 셀 비대칭 정정.

Merge commit: 329698f
Cherry-pick: b1004ef
SVG export: output/svg/pr788/aift_002.svg (rect 검정 fill 0회 입증)
edwardkim added a commit that referenced this pull request May 10, 2026
5/10 + 5/11 사이클 누적 — 외부 기여자 다수 PR 30+ 머지.

Cargo.toml + rhwp-vscode/package.json + npm/editor/package.json + rhwp-studio/package.json: 0.7.10 → 0.7.11
rhwp-vscode/CHANGELOG.md: [0.7.11] 항목 추가

핵심 변경:
- Skia native raster P8 (#761) + P9 (#769) — Layer IR contract hardening + text replay parity
- HWP3 native 렌더링 (#753) — hwp3-sample10 8 단계 정정 + Git LFS pdf-large/ 신규
- 페이지네이션 정정 (#778) — Task #703 다단 컬럼 분배 회귀 정정
- rhwp-studio 인터랙션 (PR #781/#786/#787/#788) — scrollbar/수식/표 셀/도구 모음 결함 정정
- rhwp-studio editor 신규 기능 (PR #728/#748/#750/#760 등) — 표 편집 Undo/Redo + 다단 설정 + 다수 단축키
@edwardkim edwardkim mentioned this pull request May 10, 2026
4 tasks
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.

3 participants