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

--HG--
extra : rebase_source : 81de26ea74c76b33bd6727297957e42c4441fb43
This commit is contained in:
Olli Pettay 2015-07-07 01:56:10 +03:00
Родитель eac491927d
Коммит e99787e9bc
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -488,7 +488,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
NS_WARN_IF_FALSE(!aTargetFrame ||
!aTargetFrame->GetContent() ||
aTargetFrame->GetContent() == aTargetContent ||
aTargetFrame->GetContent()->GetParent() == aTargetContent,
aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent,
"aTargetFrame should be related with aTargetContent");
mCurrentTarget = aTargetFrame;

Просмотреть файл

@ -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*.