-
Botond Ballo authored
Bug 1638594 - Handle layout coordinates relative to the RCD viewport frame correctly in the GetECRT slow-path. r=tnikkel, a=jcristau Asking for layout coordinates relative to the RCD viewport frame is a special case because the RCD viewport frame is outside the zoom boundary, and so should technically always use visual coordinates. Nonetheless, we need to use layout coordinates relative to the RCD viewport frame in several places, as we don't have a frame that's inside the zoom boundary and sized to the initial containing block (bug 1641279 may introduce such a frame in the future). This means GetEventCoordinatesRelativeTo needs special handling to apply the visual-to-layout transform when converting from visual coordinates relative to the root document's viewport frame, to layout coordinates relative to the RCD viewport frame. If the RCD is the root document, we take the fast-path which handled this with an explicit check, but if the RCD is not the root document, we take the slow-path which does not handle this. This patch refactors GetECRT so it always checks for this special case at the end. Depends on D79589 Differential Revision: https://phabricator.services.mozilla.com/D79590
fc0e35e1