зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1365333 - Avoid quadratic performance in nsDisplayLayerEventRegions::AddFrame() when the maybe-hit region has many rects. r=tnikkel
MozReview-Commit-ID: 99QrhFpHw15 --HG-- extra : rebase_source : 07201ca9b9728e9b1fa77755614ce8cd95753430
This commit is contained in:
Родитель
0a31d50d11
Коммит
6e273c8fd1
|
@ -4422,6 +4422,10 @@ nsDisplayLayerEventRegions::AddFrame(nsDisplayListBuilder* aBuilder,
|
|||
if (borderBoxHasRoundedCorners ||
|
||||
(aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT)) {
|
||||
mMaybeHitRegion.Or(mMaybeHitRegion, borderBox);
|
||||
|
||||
// Avoid quadratic performance as a result of the region growing to include
|
||||
// an arbitrarily large number of rects, which can happen on some pages.
|
||||
mMaybeHitRegion.SimplifyOutward(8);
|
||||
} else {
|
||||
mHitRegion.Or(mHitRegion, borderBox);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче