зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
eac491927d
Коммит
e99787e9bc
|
@ -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*.
|
||||
|
|
Загрузка…
Ссылка в новой задаче