зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1050096. Clip scrollparts to the viewport for root scrollframes. r=tnikkel
This commit is contained in:
Родитель
861267f74f
Коммит
f4028459f4
|
@ -2388,6 +2388,9 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
scrollParts.AppendElement(kid);
|
||||
}
|
||||
if (scrollParts.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mozilla::layers::FrameMetrics::ViewID scrollTargetId = IsScrollingActive()
|
||||
? nsLayoutUtils::FindOrCreateIDFor(mScrolledFrame->GetContent())
|
||||
|
@ -2395,6 +2398,15 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
scrollParts.Sort(HoveredStateComparator());
|
||||
|
||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||
// Don't let scrollparts extent outside our frame's border-box, if these are
|
||||
// viewport scrollbars. They would create layerization problems. This wouldn't
|
||||
// normally be an issue but themes can add overflow areas to scrollbar parts.
|
||||
if (mIsRoot) {
|
||||
clipState.ClipContentDescendants(
|
||||
mOuter->GetRectRelativeToSelf() + aBuilder->ToReferenceFrame(mOuter));
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < scrollParts.Length(); ++i) {
|
||||
uint32_t flags = 0;
|
||||
if (scrollParts[i] == mVScrollbarBox) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче