mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1187144 (part 1) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=heycam.
This commit is contained in:
parent
448ecbd81b
commit
d6ab162415
@ -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; ) {
|
||||
|
Loading…
Reference in New Issue
Block a user