File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -346,14 +346,8 @@ class TextLayer {
346346 const divStyle = textDiv . style ;
347347 // Setting the style properties individually, rather than all at once,
348348 // should be OK since the `textDiv` isn't appended to the document yet.
349- if ( this . #container === this . #rootContainer) {
350- divStyle . left = `${ ( ( 100 * left ) / this . #pageWidth) . toFixed ( 2 ) } %` ;
351- divStyle . top = `${ ( ( 100 * top ) / this . #pageHeight) . toFixed ( 2 ) } %` ;
352- } else {
353- // We're in a marked content span, hence we can't use percents.
354- divStyle . left = `calc(var(--total-scale-factor) * ${ left . toFixed ( 2 ) } px)` ;
355- divStyle . top = `calc(var(--total-scale-factor) * ${ top . toFixed ( 2 ) } px)` ;
356- }
349+ divStyle . left = `${ ( ( 100 * left ) / this . #pageWidth) . toFixed ( 2 ) } %` ;
350+ divStyle . top = `${ ( ( 100 * top ) / this . #pageHeight) . toFixed ( 2 ) } %` ;
357351 divStyle . setProperty ( "--font-height" , `${ fontHeight . toFixed ( 2 ) } px` ) ;
358352 divStyle . fontFamily = fontFamily ;
359353
Original file line number Diff line number Diff line change 5959 scale (var (--min-font-size-inv ));
6060 }
6161
62- /* Only necessary in Google Chrome, see issue 14205, and most unfortunately
63- * the problem doesn't show up in "text" reference tests. */
64- /*#if !MOZCENTRAL*/
65- span .markedContent {
66- top : 0 ;
67- height : 0 ;
62+ .markedContent {
63+ display : contents;
6864 }
69- /*#endif*/
7065
7166 span [role = "img" ] {
7267 user-select : none;
Original file line number Diff line number Diff line change @@ -321,6 +321,7 @@ class TextLayerBuilder {
321321 if ( endDiv ) {
322322 endDiv . style . width = parentTextLayer . style . width ;
323323 endDiv . style . height = parentTextLayer . style . height ;
324+ endDiv . style . userSelect = "text" ;
324325 anchor . parentElement . insertBefore (
325326 endDiv ,
326327 modifyStart ? anchor : anchor . nextSibling
You can’t perform that action at this time.
0 commit comments