зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e41fa1543360 (bug 929484)
This commit is contained in:
Родитель
2121f93271
Коммит
dec7071863
|
@ -83,8 +83,6 @@
|
|||
#include "nsCSSProps.h"
|
||||
#include "nsPluginFrame.h"
|
||||
#include "nsSVGMaskFrame.h"
|
||||
#include "nsTableCellFrame.h"
|
||||
#include "nsTableColFrame.h"
|
||||
#include "ClientLayerManager.h"
|
||||
#include "mozilla/layers/WebRenderBridgeChild.h"
|
||||
#include "mozilla/layers/WebRenderLayerManager.h"
|
||||
|
@ -3065,8 +3063,7 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
|||
nsDisplayList* aList,
|
||||
bool aAllowWillPaintBorderOptimization,
|
||||
nsStyleContext* aStyleContext,
|
||||
const nsRect& aBackgroundOriginRect,
|
||||
nsIFrame* aSecondaryReferenceFrame)
|
||||
const nsRect& aBackgroundOriginRect)
|
||||
{
|
||||
nsStyleContext* bgSC = aStyleContext;
|
||||
const nsStyleBackground* bg = nullptr;
|
||||
|
@ -3216,17 +3213,8 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
|||
bgImageClip.Clear();
|
||||
bgItem = new (aBuilder) nsDisplayBackgroundImage(bgData);
|
||||
}
|
||||
if (aSecondaryReferenceFrame) {
|
||||
thisItemList.AppendNewToTop(
|
||||
nsDisplayTableFixedPosition::CreateForFixedBackground(aBuilder,
|
||||
aSecondaryReferenceFrame,
|
||||
bgItem,
|
||||
i,
|
||||
aFrame));
|
||||
} else {
|
||||
thisItemList.AppendNewToTop(
|
||||
nsDisplayFixedPosition::CreateForFixedBackground(aBuilder, aFrame, bgItem, i));
|
||||
}
|
||||
thisItemList.AppendNewToTop(
|
||||
nsDisplayFixedPosition::CreateForFixedBackground(aBuilder, aFrame, bgItem, i));
|
||||
|
||||
} else {
|
||||
thisItemList.AppendNewToTop(new (aBuilder) nsDisplayBackgroundImage(bgData));
|
||||
|
@ -6446,60 +6434,6 @@ bool nsDisplayFixedPosition::TryMerge(nsDisplayItem* aItem) {
|
|||
return true;
|
||||
}
|
||||
|
||||
TableType
|
||||
GetTableTypeFromFrame(nsIFrame* aFrame)
|
||||
{
|
||||
if (aFrame->IsTableFrame()) {
|
||||
return TableType::TABLE;
|
||||
}
|
||||
|
||||
if (aFrame->IsTableColFrame()) {
|
||||
return TableType::TABLE_COL;
|
||||
}
|
||||
|
||||
if (aFrame->IsTableColGroupFrame()) {
|
||||
return TableType::TABLE_COL_GROUP;
|
||||
}
|
||||
|
||||
if (aFrame->IsTableRowFrame()) {
|
||||
return TableType::TABLE_ROW;
|
||||
}
|
||||
|
||||
if (aFrame->IsTableRowGroupFrame()) {
|
||||
return TableType::TABLE_ROW_GROUP;
|
||||
}
|
||||
|
||||
if (aFrame->IsTableCellFrame()) {
|
||||
return TableType::TABLE_CELL;
|
||||
}
|
||||
|
||||
MOZ_ASSERT_UNREACHABLE("Invalid frame.");
|
||||
return TableType::TABLE;
|
||||
}
|
||||
|
||||
nsDisplayTableFixedPosition::nsDisplayTableFixedPosition(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame,
|
||||
nsDisplayList* aList,
|
||||
uint32_t aIndex,
|
||||
nsIFrame* aAncestorFrame)
|
||||
: nsDisplayFixedPosition(aBuilder, aFrame, aList, aIndex)
|
||||
, mTableType(GetTableTypeFromFrame(aAncestorFrame))
|
||||
{
|
||||
}
|
||||
|
||||
/* static */ nsDisplayTableFixedPosition*
|
||||
nsDisplayTableFixedPosition::CreateForFixedBackground(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame,
|
||||
nsDisplayBackgroundImage* aImage,
|
||||
uint32_t aIndex,
|
||||
nsIFrame* aAncestorFrame)
|
||||
{
|
||||
nsDisplayList temp;
|
||||
temp.AppendToTop(aImage);
|
||||
|
||||
return new (aBuilder) nsDisplayTableFixedPosition(aBuilder, aFrame, &temp, aIndex + 1, aAncestorFrame);
|
||||
}
|
||||
|
||||
nsDisplayStickyPosition::nsDisplayStickyPosition(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame,
|
||||
nsDisplayList* aList,
|
||||
|
|
|
@ -3072,8 +3072,7 @@ public:
|
|||
nsDisplayList* aList,
|
||||
bool aAllowWillPaintBorderOptimization = true,
|
||||
nsStyleContext* aStyleContext = nullptr,
|
||||
const nsRect& aBackgroundOriginRect = nsRect(),
|
||||
nsIFrame* aSecondaryReferenceFrame = nullptr);
|
||||
const nsRect& aBackgroundOriginRect = nsRect());
|
||||
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
|
@ -3175,25 +3174,6 @@ protected:
|
|||
bool mShouldFixToViewport;
|
||||
};
|
||||
|
||||
enum class TableType : uint8_t {
|
||||
TABLE,
|
||||
TABLE_COL,
|
||||
TABLE_COL_GROUP,
|
||||
TABLE_ROW,
|
||||
TABLE_ROW_GROUP,
|
||||
TABLE_CELL,
|
||||
|
||||
TABLE_TYPE_MAX
|
||||
};
|
||||
|
||||
enum class TableTypeBits : uint8_t {
|
||||
COUNT = 3
|
||||
};
|
||||
|
||||
static_assert(
|
||||
static_cast<uint8_t>(TableType::TABLE_TYPE_MAX) < (1 << (static_cast<uint8_t>(TableTypeBits::COUNT) + 1)),
|
||||
"TableType cannot fit with TableTypeBits::COUNT");
|
||||
TableType GetTableTypeFromFrame(nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* A display item to paint the native theme background for a frame.
|
||||
|
@ -4143,7 +4123,7 @@ public:
|
|||
return mAnimatedGeometryRootForScrollMetadata;
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
// For background-attachment:fixed
|
||||
nsDisplayFixedPosition(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||
nsDisplayList* aList, uint32_t aIndex);
|
||||
|
@ -4154,27 +4134,6 @@ protected:
|
|||
bool mIsFixedBackground;
|
||||
};
|
||||
|
||||
class nsDisplayTableFixedPosition : public nsDisplayFixedPosition
|
||||
{
|
||||
public:
|
||||
static nsDisplayTableFixedPosition* CreateForFixedBackground(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame,
|
||||
nsDisplayBackgroundImage* aImage,
|
||||
uint32_t aIndex,
|
||||
nsIFrame* aAncestorFrame);
|
||||
|
||||
virtual uint32_t GetPerFrameKey() override {
|
||||
return (mIndex << (nsDisplayItem::TYPE_BITS + static_cast<uint8_t>(TableTypeBits::COUNT))) |
|
||||
(static_cast<uint8_t>(mTableType) << nsDisplayItem::TYPE_BITS) |
|
||||
nsDisplayItem::GetPerFrameKey();
|
||||
}
|
||||
protected:
|
||||
nsDisplayTableFixedPosition(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||
nsDisplayList* aList, uint32_t aIndex, nsIFrame* aAncestorFrame);
|
||||
|
||||
TableType mTableType;
|
||||
};
|
||||
|
||||
/**
|
||||
* This creates an empty scrollable layer. It has no child layers.
|
||||
* It is used to record the existence of a scrollable frame in the layer
|
||||
|
|
|
@ -1311,8 +1311,7 @@ PaintRowBackground(nsTableRowFrame* aRow,
|
|||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect,
|
||||
aLists.BorderBackground(),
|
||||
true, nullptr,
|
||||
aFrame->GetRectRelativeToSelf(),
|
||||
cell);
|
||||
aFrame->GetRectRelativeToSelf());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1344,8 +1343,7 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup,
|
|||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder, aFrame, cellRect,
|
||||
aLists.BorderBackground(),
|
||||
true, nullptr,
|
||||
aFrame->GetRectRelativeToSelf(),
|
||||
cell);
|
||||
aFrame->GetRectRelativeToSelf());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче