mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1797186. Rework ClipManager::PopOverrideForASR. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D160123
This commit is contained in:
parent
81c86f9a79
commit
c4dfda1c19
@ -124,19 +124,26 @@ void ClipManager::PopOverrideForASR(const ActiveScrolledRoot* aASR) {
|
||||
MOZ_ASSERT(space.isSome());
|
||||
|
||||
auto it = mASROverride.find(*space);
|
||||
|
||||
if (it == mASROverride.end()) {
|
||||
MOZ_ASSERT_UNREACHABLE("Push/PopOverrideForASR should be balanced");
|
||||
} else {
|
||||
CLIP_LOG("Popping %p override %zu -> %s\n", aASR, space->id,
|
||||
ToString(it->second.top().id).c_str());
|
||||
|
||||
it->second.pop();
|
||||
}
|
||||
|
||||
if (!mItemClipStack.empty()) {
|
||||
auto& top = mItemClipStack.top();
|
||||
if (top.mASR == aASR) {
|
||||
top.mScrollId = it->second.empty() ? *space : it->second.top();
|
||||
top.mScrollId = (it == mASROverride.end() || it->second.empty())
|
||||
? *space
|
||||
: it->second.top();
|
||||
}
|
||||
}
|
||||
|
||||
if (it->second.empty()) {
|
||||
if (it != mASROverride.end() && it->second.empty()) {
|
||||
mASROverride.erase(it);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user