зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1034240
- Trigger an update of the displayport margins on a new APZC if the content already has margins. r=botond
This commit is contained in:
Родитель
0cd41b2669
Коммит
a1cc48a946
|
@ -2344,6 +2344,15 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
mFrameMetrics = aLayerMetrics;
|
||||
mLastDispatchedPaintMetrics = aLayerMetrics;
|
||||
ShareCompositorFrameMetrics();
|
||||
|
||||
if (mFrameMetrics.GetDisplayPortMargins() != LayerMargin()) {
|
||||
// A non-zero display port margin here indicates a displayport has
|
||||
// been set by a previous APZC for the content at this guid. The
|
||||
// scrollable rect may have changed since then, making the margins
|
||||
// wrong, so we need to calculate a new display port.
|
||||
APZC_LOG("%p detected non-empty margins which probably need updating\n", this);
|
||||
needContentRepaint = true;
|
||||
}
|
||||
} else {
|
||||
// If we're not taking the aLayerMetrics wholesale we still need to pull
|
||||
// in some things into our local mFrameMetrics because these things are
|
||||
|
|
Загрузка…
Ссылка в новой задаче