зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187144 (part 1) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=heycam.
--HG-- extra : rebase_source : 0d92d0cc642a59d7229062c4b5519ecc12a06149
This commit is contained in:
Родитель
4669b76df0
Коммит
a12d073206
|
@ -6581,22 +6581,6 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
|
|||
}
|
||||
}
|
||||
|
||||
static PLDHashOperator
|
||||
FindAnyTarget(const uint32_t& aKey, RefPtr<dom::Touch>& aData,
|
||||
void* aAnyTarget)
|
||||
{
|
||||
if (aData) {
|
||||
dom::EventTarget* target = aData->GetTarget();
|
||||
if (target) {
|
||||
nsCOMPtr<nsIContent>* content =
|
||||
static_cast<nsCOMPtr<nsIContent>*>(aAnyTarget);
|
||||
*content = do_QueryInterface(target);
|
||||
return PL_DHASH_STOP;
|
||||
}
|
||||
}
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
nsIFrame* GetNearestFrameContainingPresShell(nsIPresShell* aPresShell)
|
||||
{
|
||||
nsView* view = aPresShell->GetViewManager()->GetRootView();
|
||||
|
@ -7304,7 +7288,18 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
|||
// the capture list
|
||||
nsCOMPtr<nsIContent> anyTarget;
|
||||
if (TouchManager::gCaptureTouchList->Count() > 0 && touchEvent->touches.Length() > 1) {
|
||||
TouchManager::gCaptureTouchList->Enumerate(&FindAnyTarget, &anyTarget);
|
||||
for (auto iter = TouchManager::gCaptureTouchList->Iter();
|
||||
!iter.Done();
|
||||
iter.Next()) {
|
||||
RefPtr<dom::Touch>& touch = iter.Data();
|
||||
if (touch) {
|
||||
dom::EventTarget* target = touch->GetTarget();
|
||||
if (target) {
|
||||
anyTarget = do_QueryInterface(target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int32_t i = touchEvent->touches.Length(); i; ) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче