Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 960e92b

Browse files
oops
1 parent fdc3f54 commit 960e92b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/web_ui/skwasm/text/paragraph.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ SKWASM_EXPORT bool paragraph_getClosestGlyphInfoAtCoordinate(
7070
bool* booleanFlags) {
7171
Paragraph::GlyphInfo glyphInfo;
7272
if (!paragraph->getClosestUTF16GlyphInfoAt(offsetX, offsetY, &glyphInfo)) {
73-
delete glyphInfo;
7473
return false;
7574
}
7675
// This is more verbose than memcpying the whole struct but ideally we don't
@@ -91,7 +90,6 @@ SKWASM_EXPORT bool paragraph_getGlyphInfoAt(Paragraph* paragraph,
9190
bool* booleanFlags) {
9291
Paragraph::GlyphInfo glyphInfo;
9392
if (!paragraph->getGlyphInfoAtUTF16Offset(index, &glyphInfo)) {
94-
delete glyphInfo;
9593
return false;
9694
}
9795
std::memcpy(graphemeLayoutBounds, &glyphInfo.fGraphemeLayoutBounds,

lib/web_ui/test/html/text_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Future<void> testMain() async {
117117

118118
test('Basic glyph metrics', () {
119119
const double fontSize = 10;
120-
final ParagraphBuilder builder = ParagraphBuilder(CkParagraphStyle(
120+
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle(
121121
fontStyle: FontStyle.normal,
122122
fontWeight: FontWeight.normal,
123123
fontSize: fontSize,
@@ -138,7 +138,7 @@ Future<void> testMain() async {
138138

139139
test('Basic glyph metrics - hit test', () {
140140
const double fontSize = 10.0;
141-
final ParagraphBuilder builder = ParagraphBuilder(CkParagraphStyle(
141+
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle(
142142
fontSize: fontSize,
143143
fontFamily: 'FlutterTest',
144144
))..addText('Test\nTest');

0 commit comments

Comments
 (0)