Skip to content

Commit 9a5ad54

Browse files
committed
Remove no longer needed changes
1 parent 3199fce commit 9a5ad54

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/PreparedLayoutTextView.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ internal class PreparedLayoutTextView(context: Context) : ViewGroup(context), Re
101101
overflow = Overflow.HIDDEN
102102
}
103103

104-
override fun dispatchDraw(canvas: Canvas) {
105-
super.dispatchDraw(canvas)
106-
}
107-
108104
override fun onDraw(canvas: Canvas) {
109105
val layout = preparedLayout?.layout
110106
val hasShadow = layout?.text?.let { hasTextShadow(it) } ?: false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ShadowStyleSpan.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ internal class ShadowStyleSpan(
3939
if (fm != null) {
4040
paint.getFontMetricsInt(fm)
4141

42-
// Calculate shadow bounds needed and always expand
4342
val shadowTopNeeded = max(0f, radius - dy)
4443
val shadowBottomNeeded = max(0f, radius + dy)
4544

46-
// Always expand for shadow - view padding will naturally prevent clipping
4745
val topExpansion = shadowTopNeeded.toInt()
4846
val bottomExpansion = shadowBottomNeeded.toInt()
4947

@@ -54,7 +52,6 @@ internal class ShadowStyleSpan(
5452
fm.bottom += bottomExpansion
5553
}
5654

57-
// Calculate horizontal shadow expansion - always expand for shadow
5855
val shadowLeftNeeded = max(0f, radius - dx)
5956
val shadowRightNeeded = max(0f, radius + dx)
6057

@@ -85,10 +82,8 @@ internal class ShadowStyleSpan(
8582
val originalShadowDy = paint.shadowLayerDy
8683
val originalShadowColor = paint.shadowLayerColor
8784

88-
// Apply shadow
8985
paint.setShadowLayer(radius, dx, dy, color)
9086

91-
// Apply other character styles from the spanned text
9287
if (text is android.text.Spanned && paint is android.text.TextPaint) {
9388
val spans = text.getSpans(start, end, android.text.style.CharacterStyle::class.java)
9489
for (span in spans) {

0 commit comments

Comments
 (0)