Bug 1144418 - target events for text nodes in shadow dom to the nearest element in the flattened tree. r=wchen

This commit is contained in:
Olli Pettay
2015-07-07 01:56:10 +03:00
parent 257c22bb6b
commit 593ae12d5e
2 changed files with 2 additions and 2 deletions

View File

@@ -7734,7 +7734,7 @@ PresShell::HandlePositionedEvent(nsIFrame* aTargetFrame,
// We use weak pointers because during this tight loop, the node
// will *not* go away. And this happens on every mousemove.
while (targetElement && !targetElement->IsElement()) {
targetElement = targetElement->GetParent();
targetElement = targetElement->GetFlattenedTreeParent();
}
// If we found an element, target it. Otherwise, target *nothing*.