mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 949310. r=BenWa
This commit is contained in:
parent
0fa48bbcb2
commit
f5fa7a6026
@ -175,7 +175,8 @@ Layer::Layer(LayerManager* aManager, void* aImplData) :
|
||||
mIsFixedPosition(false),
|
||||
mMargins(0, 0, 0, 0),
|
||||
mStickyPositionData(nullptr),
|
||||
mIsScrollbar(false),
|
||||
mScrollbarTargetId(FrameMetrics::NULL_SCROLL_ID),
|
||||
mScrollbarDirection(ScrollDirection::NONE),
|
||||
mDebugColorIndex(0),
|
||||
mAnimationGeneration(0)
|
||||
{}
|
||||
@ -1268,12 +1269,11 @@ Layer::PrintInfo(nsACString& aTo, const char* aPrefix)
|
||||
if (GetContentFlags() & CONTENT_COMPONENT_ALPHA) {
|
||||
aTo += " [componentAlpha]";
|
||||
}
|
||||
if (GetIsScrollbar()) {
|
||||
if (GetScrollbarDirection() == VERTICAL) {
|
||||
aTo.AppendPrintf(" [vscrollbar=%lld]", GetScrollbarTargetContainerId());
|
||||
} else {
|
||||
aTo.AppendPrintf(" [hscrollbar=%lld]", GetScrollbarTargetContainerId());
|
||||
}
|
||||
if (GetScrollbarDirection() == VERTICAL) {
|
||||
aTo.AppendPrintf(" [vscrollbar=%lld]", GetScrollbarTargetContainerId());
|
||||
}
|
||||
if (GetScrollbarDirection() == HORIZONTAL) {
|
||||
aTo.AppendPrintf(" [hscrollbar=%lld]", GetScrollbarTargetContainerId());
|
||||
}
|
||||
if (GetIsFixedPosition()) {
|
||||
aTo.AppendPrintf(" [isFixedPosition anchor=%f,%f]", mAnchor.x, mAnchor.y);
|
||||
|
@ -967,6 +967,7 @@ public:
|
||||
}
|
||||
|
||||
enum ScrollDirection {
|
||||
NONE,
|
||||
VERTICAL,
|
||||
HORIZONTAL
|
||||
};
|
||||
@ -978,11 +979,9 @@ public:
|
||||
*/
|
||||
void SetScrollbarData(FrameMetrics::ViewID aScrollId, ScrollDirection aDir)
|
||||
{
|
||||
if (mIsScrollbar ||
|
||||
mScrollbarTargetId != aScrollId ||
|
||||
if (mScrollbarTargetId != aScrollId ||
|
||||
mScrollbarDirection != aDir) {
|
||||
MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) ScrollbarData", this));
|
||||
mIsScrollbar = true;
|
||||
mScrollbarTargetId = aScrollId;
|
||||
mScrollbarDirection = aDir;
|
||||
Mutated();
|
||||
@ -1013,7 +1012,6 @@ public:
|
||||
FrameMetrics::ViewID GetStickyScrollContainerId() { return mStickyPositionData->mScrollId; }
|
||||
const LayerRect& GetStickyScrollRangeOuter() { return mStickyPositionData->mOuter; }
|
||||
const LayerRect& GetStickyScrollRangeInner() { return mStickyPositionData->mInner; }
|
||||
bool GetIsScrollbar() { return mIsScrollbar; }
|
||||
FrameMetrics::ViewID GetScrollbarTargetContainerId() { return mScrollbarTargetId; }
|
||||
ScrollDirection GetScrollbarDirection() { return mScrollbarDirection; }
|
||||
Layer* GetMaskLayer() const { return mMaskLayer; }
|
||||
@ -1387,7 +1385,6 @@ protected:
|
||||
LayerRect mInner;
|
||||
};
|
||||
nsAutoPtr<StickyPositionData> mStickyPositionData;
|
||||
bool mIsScrollbar;
|
||||
FrameMetrics::ViewID mScrollbarTargetId;
|
||||
ScrollDirection mScrollbarDirection;
|
||||
DebugOnly<uint32_t> mDebugColorIndex;
|
||||
|
@ -525,7 +525,7 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(TimeStamp aCurrentFram
|
||||
appliedTransform = true;
|
||||
}
|
||||
|
||||
if (container->GetIsScrollbar()) {
|
||||
if (container->GetScrollbarDirection() != Layer::NONE) {
|
||||
ApplyAsyncTransformToScrollbar(container);
|
||||
}
|
||||
return appliedTransform;
|
||||
|
@ -280,10 +280,8 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||
common.stickyScrollRangeOuter(),
|
||||
common.stickyScrollRangeInner());
|
||||
}
|
||||
if (common.isScrollbar()) {
|
||||
layer->SetScrollbarData(common.scrollbarTargetContainerId(),
|
||||
static_cast<Layer::ScrollDirection>(common.scrollbarDirection()));
|
||||
}
|
||||
layer->SetScrollbarData(common.scrollbarTargetContainerId(),
|
||||
static_cast<Layer::ScrollDirection>(common.scrollbarDirection()));
|
||||
if (PLayerParent* maskLayer = common.maskLayerParent()) {
|
||||
layer->SetMaskLayer(cast(maskLayer)->AsLayer());
|
||||
} else {
|
||||
|
@ -198,7 +198,6 @@ struct CommonLayerAttributes {
|
||||
uint64_t stickyScrollContainerId;
|
||||
LayerRect stickyScrollRangeOuter;
|
||||
LayerRect stickyScrollRangeInner;
|
||||
bool isScrollbar;
|
||||
uint64_t scrollbarTargetContainerId;
|
||||
uint32_t scrollbarDirection;
|
||||
nullable PLayer maskLayer;
|
||||
|
@ -501,11 +501,8 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool
|
||||
common.stickyScrollRangeOuter() = mutant->GetStickyScrollRangeOuter();
|
||||
common.stickyScrollRangeInner() = mutant->GetStickyScrollRangeInner();
|
||||
}
|
||||
common.isScrollbar() = mutant->GetIsScrollbar();
|
||||
if (mutant->GetIsScrollbar()) {
|
||||
common.scrollbarTargetContainerId() = mutant->GetScrollbarTargetContainerId();
|
||||
common.scrollbarDirection() = mutant->GetScrollbarDirection();
|
||||
}
|
||||
common.scrollbarTargetContainerId() = mutant->GetScrollbarTargetContainerId();
|
||||
common.scrollbarDirection() = mutant->GetScrollbarDirection();
|
||||
if (Layer* maskLayer = mutant->GetMaskLayer()) {
|
||||
common.maskLayerChild() = Shadow(maskLayer->AsShadowableLayer());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user