mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1187151 (part 14) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=baku.
--HG-- extra : rebase_source : c211bfa5c6995b2564c7e356d8edb192a7bdba9e
This commit is contained in:
parent
4d79a620bf
commit
9fa2681d82
@ -5030,19 +5030,17 @@ EventStateManager::SetContentState(nsIContent* aContent, EventStates aState)
|
||||
return true;
|
||||
}
|
||||
|
||||
PLDHashOperator
|
||||
void
|
||||
EventStateManager::ResetLastOverForContent(
|
||||
const uint32_t& aIdx,
|
||||
RefPtr<OverOutElementsWrapper>& aElemWrapper,
|
||||
void* aClosure)
|
||||
nsIContent* aContent)
|
||||
{
|
||||
nsIContent* content = static_cast<nsIContent*>(aClosure);
|
||||
if (aElemWrapper && aElemWrapper->mLastOverElement &&
|
||||
nsContentUtils::ContentIsDescendantOf(aElemWrapper->mLastOverElement, content)) {
|
||||
nsContentUtils::ContentIsDescendantOf(aElemWrapper->mLastOverElement,
|
||||
aContent)) {
|
||||
aElemWrapper->mLastOverElement = nullptr;
|
||||
}
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
void
|
||||
@ -5091,8 +5089,11 @@ EventStateManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent)
|
||||
|
||||
// See bug 292146 for why we want to null this out
|
||||
ResetLastOverForContent(0, mMouseEnterLeaveHelper, aContent);
|
||||
mPointersEnterLeaveHelper.Enumerate(
|
||||
&EventStateManager::ResetLastOverForContent, aContent);
|
||||
for (auto iter = mPointersEnterLeaveHelper.Iter();
|
||||
!iter.Done();
|
||||
iter.Next()) {
|
||||
ResetLastOverForContent(iter.Key(), iter.Data(), aContent);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -875,9 +875,9 @@ private:
|
||||
nsIContent* aStopBefore,
|
||||
EventStates aState,
|
||||
bool aAddState);
|
||||
static PLDHashOperator ResetLastOverForContent(const uint32_t& aIdx,
|
||||
RefPtr<OverOutElementsWrapper>& aChunk,
|
||||
void* aClosure);
|
||||
static void ResetLastOverForContent(const uint32_t& aIdx,
|
||||
RefPtr<OverOutElementsWrapper>& aChunk,
|
||||
nsIContent* aClosure);
|
||||
void PostHandleKeyboardEvent(WidgetKeyboardEvent* aKeyboardEvent,
|
||||
nsEventStatus& aStatus,
|
||||
bool dispatchedToContentProcess);
|
||||
|
Loading…
Reference in New Issue
Block a user