зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1163572 - Have ChromeProcessController also handle root-frame repaint requests. r=botond
Original patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>.
This commit is contained in:
Родитель
ba0013b256
Коммит
171ee5bc2c
|
@ -423,6 +423,7 @@ TabChildBase::HandlePossibleViewportChange(const ScreenIntSize& aOldScreenSize)
|
|||
defaultZoom <= viewportInfo.GetMaxZoom());
|
||||
metrics.SetZoom(CSSToParentLayerScale2D(ConvertScaleForRoot(defaultZoom)));
|
||||
|
||||
metrics.SetPresShellId(presShellId);
|
||||
metrics.SetScrollId(viewId);
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ APZCCallbackHelper::UpdateRootFrame(FrameMetrics& aMetrics)
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell(content);
|
||||
if (!shell) {
|
||||
if (!shell || aMetrics.GetPresShellId() != shell->GetPresShellId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,10 +75,14 @@ ChromeProcessController::RequestContentRepaint(const FrameMetrics& aFrameMetrics
|
|||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> targetContent = nsLayoutUtils::FindContentFor(aFrameMetrics.GetScrollId());
|
||||
if (targetContent) {
|
||||
FrameMetrics metrics = aFrameMetrics;
|
||||
APZCCallbackHelper::UpdateSubFrame(targetContent, metrics);
|
||||
FrameMetrics metrics = aFrameMetrics;
|
||||
if (metrics.IsRootContent()) {
|
||||
APZCCallbackHelper::UpdateRootFrame(metrics);
|
||||
} else {
|
||||
nsCOMPtr<nsIContent> targetContent = nsLayoutUtils::FindContentFor(aFrameMetrics.GetScrollId());
|
||||
if (targetContent) {
|
||||
APZCCallbackHelper::UpdateSubFrame(targetContent, metrics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче