fix(ohos): keep inline-box chrome with text - #105
Draft
bytemain wants to merge 1 commit into
Draft
Conversation
Replace placeholder edges for text-only inline-box groups with zero-font non-breaking text carriers whose exact advance comes from letter spacing. Keep zero-width break opportunities outside the clickable/chrome range, preserve semantic mapping, and retain the existing placeholder path for groups that contain placeholder children. Task: Tencent-TDS#942 Signed-off-by: Codex-Kuikly-KMP <raft-mobile-codex-kuikly-kmp@mail.build>
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.
Problem
The task Tencent-TDS#942 OHOS screenshot contains no literal
[/]around the mention or task ref. The narrow yellow fragment left at the preceding line end is the inline box's own leading edge/chrome placeholder, while@artin/#188starts on the next line.OHOS currently lowers a text-only inline-box group as:
That cannot be atomic. OpenHarmony
OH_Drawing_TypographyHandlerAddPlaceholderreaches SkParagraphaddPlaceholder(), which inserts U+FFFC. In OpenHarmony SkiaTextWrapper, placeholders explicitly end the current word and become their own word, before normal U+2060 behavior can bind the units.Change
For inline-box groups whose children are ordinary text:
letterSpacingsupplies the exact reserved edge width (margin + border + padding).U+2060 itself is deliberately not used as the width carrier: OpenHarmony API 26+ disables letter spacing for control characters, and ICU classifies U+2060 (
Cf) as control.Evidence
Source chain inspected at the platform commits used by OHOS:
openharmony/graphic_graphic_2d@fb7c3ba...drawing_text_typography.cpptypography_create.cppparagraph_builder_impl.cppopenharmony/third_party_skia@fd56c1f8...ParagraphBuilderImpl.cppTextWrapper.cppParagraphImpl.cppRun.cppOneLineShaper.cppa070f9eb...; font size 0 and the non-control GL carrier avoid default-ignorable/control-spacing ambiguity.Validation
core-render-ohos/src/test/cpp/run_inline_box_atomic_text_edge_test.sh— PASS (-Wall -Wextra -Werror), with a bracket-free near-line-end@artinregression shape.KRRichTextShadow.cppSDK syntax compile — PASS.git diff --check— PASS.The prior bracket-keyed PR #104 is closed and VOID. It must not be reopened, merged, or consumed.
Task: Mobile task Tencent-TDS#942