зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1556556
- Use FrameForPointOption::IsRelativeToLayoutViewport when passing layout-relative coordinates to GetFrameForPoint(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D71455
This commit is contained in:
Родитель
405c8807cd
Коммит
c2e68749af
|
@ -2552,7 +2552,9 @@ nsresult ContentEventHandler::OnQueryCharacterAtPoint(
|
|||
nsPoint ptInRoot = nsLayoutUtils::GetEventCoordinatesRelativeTo(
|
||||
&eventOnRoot, RelativeTo{rootFrame});
|
||||
|
||||
nsIFrame* targetFrame = nsLayoutUtils::GetFrameForPoint(rootFrame, ptInRoot);
|
||||
nsIFrame* targetFrame = nsLayoutUtils::GetFrameForPoint(
|
||||
rootFrame, ptInRoot,
|
||||
{nsLayoutUtils::FrameForPointOption::IsRelativeToLayoutViewport});
|
||||
if (!targetFrame || !targetFrame->GetContent() ||
|
||||
!targetFrame->GetContent()->IsInclusiveDescendantOf(mRootContent)) {
|
||||
// There is no character at the point.
|
||||
|
|
|
@ -409,6 +409,9 @@ nsIFrame* FindFrameTargetedByInputEvent(
|
|||
if (aFlags & INPUT_IGNORE_ROOT_SCROLL_FRAME) {
|
||||
options += FrameForPointOption::IgnoreRootScrollFrame;
|
||||
}
|
||||
if (aRootFrame.mViewportType == ViewportType::Layout) {
|
||||
options += FrameForPointOption::IsRelativeToLayoutViewport;
|
||||
}
|
||||
nsIFrame* target = nsLayoutUtils::GetFrameForPoint(
|
||||
aRootFrame.mFrame, aPointRelativeToRootFrame, options);
|
||||
PET_LOG(
|
||||
|
|
Загрузка…
Ссылка в новой задаче