From 13ef763222e0e7e6884a439d3937824dbba5d96f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald <jonas.jenwald@gmail.com> Date: Fri, 29 Oct 2021 14:32:13 +0200 Subject: [PATCH] [Google Chrome] Ensure that `markedContent` spans are placed in the top-left corner (issue 14205) *This is a tentative patch, since we unfortunately cannot easily test it (as far as I can tell).* In Firefox this (obviously) works as-is, but in Google Chrome the `markedContent` spans are inserted within the regular text-content (in the DOM) and with non-zero heights. --- web/text_layer_builder.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/text_layer_builder.css b/web/text_layer_builder.css index 21f3613f9..ce74c5732 100644 --- a/web/text_layer_builder.css +++ b/web/text_layer_builder.css @@ -35,6 +35,13 @@ transform-origin: 0% 0%; } +/* Only necessary in Google Chrome, see issue 14205, and most unfortunately + * the problem doesn't show up in "text" reference tests. */ +.textLayer span.markedContent { + top: 0; + height: 0; +} + .textLayer .highlight { margin: -1px; padding: 1px;