From 480869c3d1d820b344d23989d2deae64a594869e Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 20 Sep 2022 21:06:39 -0400 Subject: Exclude documentElement from zoom calculation (#2227) * Exclude documentElement from zoom calculation * Add an option * Refactor zoom coordinate conversion functions * Convert zoom coordinates for text sources * Rename variable * Convert rect coordinate spaces * Handle shadow DOM --- test/test-document-util.js | 5 ++++- test/test-options-util.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test-document-util.js b/test/test-document-util.js index 334c78a5..34f4f8b3 100644 --- a/test/test-document-util.js +++ b/test/test-document-util.js @@ -167,7 +167,10 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR // Test docRangeFromPoint const documentUtil = new DocumentUtil(); - const source = documentUtil.getRangeFromPoint(0, 0, false); + const source = documentUtil.getRangeFromPoint(0, 0, { + deepContentScan: false, + normalizeCssZoom: true + }); switch (resultType) { case 'TextSourceRange': assert.strictEqual(getPrototypeOfOrNull(source), TextSourceRange.prototype); diff --git a/test/test-options-util.js b/test/test-options-util.js index af64e7dd..05af4214 100644 --- a/test/test-options-util.js +++ b/test/test-options-util.js @@ -347,6 +347,7 @@ function createProfileOptionsUpdatedTestData1() { matchTypePrefix: false, hidePopupOnCursorExit: false, hidePopupOnCursorExitDelay: 0, + normalizeCssZoom: true, preventMiddleMouse: { onWebPages: false, onPopupPages: false, -- cgit v1.2.3