From 1045b03a1bfdfa267499dada9bab65a6179326bd Mon Sep 17 00:00:00 2001 From: Koji Ishii Date: Mon, 13 Nov 2023 22:11:08 -0800 Subject: [PATCH] [text-autospace] Clone `ShapeResult` if the original is shared The `LayoutNGShapeCache` runtime flag currently in test can share `ShapeResult` for the same text content. This breaks when `text-autospace` modifies the `ShapeResult`. This patch clones `ShapeResult` if it's shared when applying `text-autospace`. Fixed: 1497899, 1463890 Change-Id: Ic4c1dc87143c2f7789d5f6e46d938420707cdc97 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5019431 Reviewed-by: Lingqi Chi Auto-Submit: Koji Ishii Reviewed-by: Kent Tamura Commit-Queue: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1224103} --- .../text-autospace-shape-cache-crash.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 css/css-text/text-autospace/crashtests/text-autospace-shape-cache-crash.html diff --git a/css/css-text/text-autospace/crashtests/text-autospace-shape-cache-crash.html b/css/css-text/text-autospace/crashtests/text-autospace-shape-cache-crash.html new file mode 100644 index 00000000000000..4c4360f5d1fc25 --- /dev/null +++ b/css/css-text/text-autospace/crashtests/text-autospace-shape-cache-crash.html @@ -0,0 +1,15 @@ + + + +
X
+
X
+