Repository navigation
Commit 3f1503a
Revert "[skparagraph] Use surrounding run's bidi level in shapeEllipsis"
This reverts commit fcf3a18.
Reason for revert: checking to see if this is breaking builds on the tree
Failure Link: checking to see if this is breaking builds on the tree
Original change's description:
> [skparagraph] Use surrounding run's bidi level in shapeEllipsis
>
> shapeEllipsis passed SkBidiIterator::kLTR to its internal
> BidiRunIterator regardless of the surrounding paragraph's direction,
> so in RTL text the affix's neutral and weak characters resolved LTR.
> For the default "-" and "…" this only gives the shaped run the wrong
> bidi level; the glyphs are the same. But a custom ellipsis that mixes
> RTL letters with a neutral, such as "النهاية!", is split into two
> bidi runs (the "!" resolves LTR), and ShapeHandler supports only one:
> debug builds fail SkASSERT(!fRun), and release builds keep only the
> last run.
>
> The fix uses the bidi level of the surrounding cluster's run, which
> is already in scope via the existing 'cluster' parameter. Both call
> sites (createEllipsis, createSoftHyphen) pass the cluster adjacent
> to the break, so the affix inherits the correct direction at the
> shaping boundary.
>
> This also unblocks a follow-up that exposes a configurable soft
> hyphen string, and addresses reviewer feedback on the Flutter design
> doc for flutter/flutter#18443.
>
> Tests:
> - SkParagraph_SoftHyphenRTLBidiLevel / SoftHyphenLTRBidiLevel assert
> the shaped hyphen run's bidi level matches the paragraph context.
> - SkParagraph_EllipsisRTLCustomStringBidiLevel uses "النهاية!" as a
> custom ellipsis in an RTL paragraph (hits the SkASSERT without
> this change).
> - SkParagraph_EllipsisLTRDefaultBidiLevel guards the common LTR
> path against regression.
>
> GM:
> - paragraph_ellipsis_bidi adds Skia Gold visual coverage across
> LTR/RTL x default/custom affix combinations.
>
> [email protected], [email protected]
>
> Change-Id: Id51f71e4506272662a95baae197bca808d27e7d1
> Bug: flutter/flutter#189617
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1217709
> Reviewed-by: Julia Lavrova <[email protected]>
> Auto-Submit: David H Bebawy <[email protected]>
> Commit-Queue: Alexis Cruz-Ayala <[email protected]>
> Reviewed-by: Alexis Cruz-Ayala <[email protected]>
Bug: flutter/flutter#189617
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ia6f217051a1815171e14b29321ec46d065ce4b54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1394356
Commit-Queue: Robert Phillips <[email protected]>
Reviewed-by: Robert Phillips <[email protected]>
Bot-Commit: [email protected] <[email protected]>1 parent 5e1ccee commit 3f1503a
5 files changed
Lines changed: 3 additions & 313 deletions
File tree
- modules/skparagraph
- gm
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 57 | + | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
| 770 | + | |
777 | 771 | | |
778 | 772 | | |
779 | 773 | | |
780 | 774 | | |
781 | | - | |
| 775 | + | |
782 | 776 | | |
783 | 777 | | |
784 | 778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9086 | 9086 | | |
9087 | 9087 | | |
9088 | 9088 | | |
9089 | | - | |
9090 | | - | |
9091 | | - | |
9092 | | - | |
9093 | | - | |
9094 | | - | |
9095 | | - | |
9096 | | - | |
9097 | | - | |
9098 | | - | |
9099 | | - | |
9100 | | - | |
9101 | | - | |
9102 | | - | |
9103 | | - | |
9104 | | - | |
9105 | | - | |
9106 | | - | |
9107 | | - | |
9108 | | - | |
9109 | | - | |
9110 | | - | |
9111 | | - | |
9112 | | - | |
9113 | | - | |
9114 | | - | |
9115 | | - | |
9116 | | - | |
9117 | | - | |
9118 | | - | |
9119 | | - | |
9120 | | - | |
9121 | | - | |
9122 | | - | |
9123 | | - | |
9124 | | - | |
9125 | | - | |
9126 | | - | |
9127 | | - | |
9128 | | - | |
9129 | | - | |
9130 | | - | |
9131 | | - | |
9132 | | - | |
9133 | | - | |
9134 | | - | |
9135 | | - | |
9136 | | - | |
9137 | | - | |
9138 | | - | |
9139 | | - | |
9140 | | - | |
9141 | | - | |
9142 | | - | |
9143 | | - | |
9144 | | - | |
9145 | | - | |
9146 | | - | |
9147 | | - | |
9148 | | - | |
9149 | | - | |
9150 | | - | |
9151 | | - | |
9152 | | - | |
9153 | | - | |
9154 | | - | |
9155 | | - | |
9156 | | - | |
9157 | | - | |
9158 | | - | |
9159 | | - | |
9160 | | - | |
9161 | | - | |
9162 | | - | |
9163 | | - | |
9164 | | - | |
9165 | | - | |
9166 | | - | |
9167 | | - | |
9168 | | - | |
9169 | | - | |
9170 | | - | |
9171 | | - | |
9172 | | - | |
9173 | | - | |
9174 | | - | |
9175 | | - | |
9176 | | - | |
9177 | | - | |
9178 | | - | |
9179 | | - | |
9180 | | - | |
9181 | | - | |
9182 | | - | |
9183 | | - | |
9184 | | - | |
9185 | | - | |
9186 | | - | |
9187 | | - | |
9188 | | - | |
9189 | | - | |
9190 | | - | |
9191 | | - | |
9192 | | - | |
9193 | | - | |
9194 | | - | |
9195 | | - | |
9196 | | - | |
9197 | | - | |
9198 | | - | |
9199 | | - | |
9200 | | - | |
9201 | | - | |
9202 | | - | |
9203 | | - | |
9204 | | - | |
9205 | | - | |
9206 | | - | |
9207 | | - | |
9208 | | - | |
9209 | | - | |
9210 | | - | |
9211 | | - | |
9212 | | - | |
9213 | | - | |
9214 | | - | |
9215 | | - | |
9216 | | - | |
9217 | | - | |
9218 | | - | |
9219 | | - | |
9220 | | - | |
9221 | | - | |
9222 | | - | |
9223 | | - | |
9224 | | - | |
9225 | | - | |
9226 | | - | |
9227 | | - | |
9228 | | - | |
9229 | | - | |
9230 | | - | |
9231 | | - | |
9232 | | - | |
9233 | | - | |
9234 | | - | |
9235 | | - | |
9236 | | - | |
9237 | | - | |
9238 | | - | |
9239 | | - | |
9240 | 9089 | | |
9241 | 9090 | | |
9242 | 9091 | | |
| |||
0 commit comments