зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1178745 - Add an nsIScrollableFrame API for getting the scroll clip. r=roc
--HG-- extra : rebase_source : 8f2b62b0ce23dcfece6984d89a774a96453ecb6e extra : histedit_source : 586e99a17ecbb86dc243568cee1ebf1d24f37717
This commit is contained in:
Родитель
472ba62ba8
Коммит
c15627a716
|
@ -3089,6 +3089,17 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
scrolledContent.MoveTo(aLists);
|
||||
}
|
||||
|
||||
const DisplayItemClip*
|
||||
ScrollFrameHelper::ComputeScrollClip(bool aIsForCaret) const
|
||||
{
|
||||
const DisplayItemClip* ancestorClip = aIsForCaret ? mAncestorClipForCaret : mAncestorClip;
|
||||
if (!mShouldBuildScrollableLayer || mIsScrollableLayerInRootContainer) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return ancestorClip;
|
||||
}
|
||||
|
||||
Maybe<FrameMetricsAndClip>
|
||||
ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer,
|
||||
nsIFrame* aContainerReferenceFrame,
|
||||
|
|
|
@ -381,6 +381,7 @@ public:
|
|||
Layer* aLayer, nsIFrame* aContainerReferenceFrame,
|
||||
const ContainerLayerParameters& aParameters,
|
||||
bool aIsForCaret) const;
|
||||
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const;
|
||||
|
||||
// nsIScrollbarMediator
|
||||
void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection,
|
||||
|
@ -843,6 +844,10 @@ public:
|
|||
{
|
||||
return mHelper.ComputeFrameMetrics(aLayer, aContainerReferenceFrame, aParameters, aIsForCaret);
|
||||
}
|
||||
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const
|
||||
{
|
||||
return mHelper.ComputeScrollClip(aIsForCaret);
|
||||
}
|
||||
virtual bool IsIgnoringViewportClipping() const override {
|
||||
return mHelper.IsIgnoringViewportClipping();
|
||||
}
|
||||
|
@ -1239,6 +1244,10 @@ public:
|
|||
{
|
||||
return mHelper.ComputeFrameMetrics(aLayer, aContainerReferenceFrame, aParameters, aIsForCaret);
|
||||
}
|
||||
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const
|
||||
{
|
||||
return mHelper.ComputeScrollClip(aIsForCaret);
|
||||
}
|
||||
virtual bool IsIgnoringViewportClipping() const override {
|
||||
return mHelper.IsIgnoringViewportClipping();
|
||||
}
|
||||
|
|
|
@ -446,6 +446,8 @@ public:
|
|||
* Whether or not this frame uses containerful scrolling.
|
||||
*/
|
||||
virtual bool UsesContainerScrolling() const = 0;
|
||||
|
||||
virtual const mozilla::DisplayItemClip* ComputeScrollClip(bool aIsForCaret) const = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче