|
1 | 1 | diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt |
2 | | -index 0f1f176..53faf04 100644 |
| 2 | +index 0f1f176d50c..53faf049df6 100644 |
3 | 3 | --- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt |
4 | 4 | +++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt |
5 | 5 | @@ -80,6 +80,54 @@ public class TextAttributeProps private constructor() { |
@@ -92,7 +92,7 @@ index 0f1f176..53faf04 100644 |
92 | 92 | } |
93 | 93 |
|
94 | 94 | diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt |
95 | | -index 5e7895c..7d2774b 100644 |
| 95 | +index 5e7895c3c50..7d2774b443f 100644 |
96 | 96 | --- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt |
97 | 97 | +++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt |
98 | 98 | @@ -268,27 +268,44 @@ internal object TextLayoutManager { |
@@ -225,7 +225,7 @@ index 5e7895c..7d2774b 100644 |
225 | 225 | } |
226 | 226 |
|
227 | 227 | diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactBackgroundDrawSpan.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactBackgroundDrawSpan.kt |
228 | | -index 326b049..48f6592 100644 |
| 228 | +index 326b049ce2e..80f8d389475 100644 |
229 | 229 | --- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactBackgroundDrawSpan.kt |
230 | 230 | +++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactBackgroundDrawSpan.kt |
231 | 231 | @@ -14,11 +14,15 @@ import android.text.Layout |
@@ -284,37 +284,16 @@ index 326b049..48f6592 100644 |
284 | 284 |
|
285 | 285 | override fun onPreDraw(start: Int, end: Int, canvas: Canvas, layout: Layout) { |
286 | 286 | if (start >= end) return |
287 | | -@@ -48,70 +69,132 @@ internal class ReactBackgroundDrawSpan( |
288 | | - val lineStart = layout.getLineStart(line) |
289 | | - val lineEnd = layout.getLineEnd(line) |
290 | | - |
291 | | -- // When the span starts at or before this line, use the line's left edge. |
292 | | -- // Otherwise use the actual character position of the span start. |
| 287 | +@@ -52,7 +73,7 @@ internal class ReactBackgroundDrawSpan( |
| 288 | + // Otherwise use the actual character position of the span start. |
293 | 289 | val left = |
294 | | -- if (start <= lineStart) { |
| 290 | + if (start <= lineStart) { |
295 | 291 | - layout.getLineLeft(line) |
296 | | -- } else { |
297 | | -- layout.getPrimaryHorizontal(start) |
298 | | -- } |
299 | | -- |
300 | | -- // When the span extends past this line, use the line's right edge. |
301 | | -- // getLineEnd() returns the offset of the first char on the NEXT line for |
302 | | -- // soft-wrapped lines, so getPrimaryHorizontal(lineEnd) would incorrectly |
303 | | -- // give us the left margin of the next line instead of the right edge. |
304 | | -+ if (start <= lineStart) layout.getLineLeft(line) |
305 | | -+ else layout.getPrimaryHorizontal(start) |
306 | | -+ |
307 | | - val right = |
308 | | -- if (end >= lineEnd) { |
309 | | -- layout.getLineRight(line) |
310 | | -- } else { |
311 | | -- layout.getPrimaryHorizontal(end) |
312 | | -- } |
313 | | -+ if (end >= lineEnd) layout.getLineRight(line) |
314 | | -+ else layout.getPrimaryHorizontal(end) |
315 | | - |
316 | | - val baseline = layout.getLineBaseline(line).toFloat() |
317 | | - val fm = layout.paint.fontMetrics |
| 292 | ++ layout.getPrimaryHorizontal(lineStart) |
| 293 | + } else { |
| 294 | + layout.getPrimaryHorizontal(start) |
| 295 | + } |
| 296 | +@@ -73,45 +94,119 @@ internal class ReactBackgroundDrawSpan( |
318 | 297 | val top = baseline + fm.ascent |
319 | 298 | val bottom = baseline + fm.descent |
320 | 299 |
|
@@ -463,7 +442,7 @@ index 326b049..48f6592 100644 |
463 | 442 | } |
464 | 443 | } |
465 | 444 | diff --git a/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp b/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp |
466 | | -index 6eb899f..eb0d85b 100644 |
| 445 | +index 6eb899f38a9..eb0d85b4b69 100644 |
467 | 446 | --- a/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp |
468 | 447 | +++ b/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp |
469 | 448 | @@ -42,6 +42,36 @@ void TextAttributes::apply(TextAttributes textAttributes) { |
@@ -581,7 +560,7 @@ index 6eb899f..eb0d85b 100644 |
581 | 560 | // Font |
582 | 561 | debugStringConvertibleItem( |
583 | 562 | diff --git a/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h b/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h |
584 | | -index 2eaa3bc..af278a3 100644 |
| 563 | +index 2eaa3bc26f3..af278a3921a 100644 |
585 | 564 | --- a/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h |
586 | 565 | +++ b/node_modules/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h |
587 | 566 | @@ -47,6 +47,16 @@ class TextAttributes : public DebugStringConvertible { |
@@ -621,7 +600,7 @@ index 2eaa3bc..af278a3 100644 |
621 | 600 | }; |
622 | 601 | } // namespace std |
623 | 602 | diff --git a/node_modules/react-native/ReactCommon/react/renderer/attributedstring/conversions.h b/node_modules/react-native/ReactCommon/react/renderer/attributedstring/conversions.h |
624 | | -index 48c1fe2..3f7b481 100644 |
| 603 | +index 48c1fe23ae2..3f7b4818f9e 100644 |
625 | 604 | --- a/node_modules/react-native/ReactCommon/react/renderer/attributedstring/conversions.h |
626 | 605 | +++ b/node_modules/react-native/ReactCommon/react/renderer/attributedstring/conversions.h |
627 | 606 | @@ -1031,6 +1031,14 @@ constexpr static MapBuffer::Key TA_KEY_BORDER_TOP_LEFT_RADIUS = 30; |
@@ -690,7 +669,7 @@ index 48c1fe2..3f7b481 100644 |
690 | 669 | } |
691 | 670 |
|
692 | 671 | diff --git a/node_modules/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp b/node_modules/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp |
693 | | -index 44ef461..b9ae418 100644 |
| 672 | +index 44ef4619b05..b9ae418a0fa 100644 |
694 | 673 | --- a/node_modules/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp |
695 | 674 | +++ b/node_modules/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.cpp |
696 | 675 | @@ -252,6 +252,66 @@ static TextAttributes convertRawProp( |
@@ -861,7 +840,7 @@ index 44ef461..b9ae418 100644 |
861 | 840 |
|
862 | 841 | #endif |
863 | 842 | diff --git a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm |
864 | | -index 3bec610..ed7ee76 100644 |
| 843 | +index 3bec61013b8..ed7ee76ce6a 100644 |
865 | 844 | --- a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm |
866 | 845 | +++ b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm |
867 | 846 | @@ -184,19 +184,52 @@ NSMutableDictionary<NSAttributedStringKey, id> *RCTNSTextAttributesFromTextAttri |
@@ -929,7 +908,7 @@ index 3bec610..ed7ee76 100644 |
929 | 908 | } else { |
930 | 909 | attributes[NSBackgroundColorAttributeName] = bgColor; |
931 | 910 | diff --git a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManagerWithBorderRadius.mm b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManagerWithBorderRadius.mm |
932 | | -index fd401a9..3ae5c60 100644 |
| 911 | +index de879555fcf..c2320fe9792 100644 |
933 | 912 | --- a/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManagerWithBorderRadius.mm |
934 | 913 | +++ b/node_modules/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManagerWithBorderRadius.mm |
935 | 914 | @@ -26,13 +26,32 @@ |
@@ -979,15 +958,15 @@ index fd401a9..3ae5c60 100644 |
979 | 958 |
|
980 | 959 | __block NSUInteger lineIdx = 0; |
981 | 960 | [self enumerateLineFragmentsForGlyphRange:spanGlyphRange |
982 | | -@@ -76,6 +94,7 @@ |
| 961 | +@@ -92,6 +110,7 @@ |
983 | 962 | BOOL isFirst = (lineIdx == 0); |
984 | 963 | BOOL isLast = (lineIdx == totalLines - 1); |
985 | 964 |
|
986 | 965 | + // Left/right corners follow the same rule as fill: left on first line, right on last. |
987 | 966 | CGFloat effectiveTL = isFirst ? tl : 0; |
988 | 967 | CGFloat effectiveBL = isFirst ? bl : 0; |
989 | 968 | CGFloat effectiveTR = isLast ? tr : 0; |
990 | | -@@ -86,24 +105,97 @@ |
| 969 | +@@ -102,24 +121,97 @@ |
991 | 970 | CGFloat w = CGRectGetWidth(spanRect); |
992 | 971 | CGFloat h = CGRectGetHeight(spanRect); |
993 | 972 |
|
|
0 commit comments