Bug 1248913 - Rename nsDisplayMixBlendMode to nsDisplayBlendMode. r=mattwoodrow

We're going to use it both for background-blend-mode and for mix-blend-mode.

MozReview-Commit-ID: 6zKCDSkLspc

--HG--
extra : rebase_source : 81b4691d2b74e56c634bdf08f85636ba2abbf486
This commit is contained in:
Markus Stange 2016-03-05 17:04:02 -05:00
Родитель 14975d0ba1
Коммит 5485807971
4 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -4,6 +4,7 @@ DECLARE_DISPLAY_ITEM_TYPE(BACKGROUND)
DECLARE_DISPLAY_ITEM_TYPE(THEMED_BACKGROUND)
DECLARE_DISPLAY_ITEM_TYPE_FLAGS(BACKGROUND_COLOR,TYPE_RENDERS_NO_IMAGES)
DECLARE_DISPLAY_ITEM_TYPE(BLEND_CONTAINER)
DECLARE_DISPLAY_ITEM_TYPE(BLEND_MODE)
DECLARE_DISPLAY_ITEM_TYPE(BORDER)
DECLARE_DISPLAY_ITEM_TYPE(BOX_SHADOW_OUTER)
DECLARE_DISPLAY_ITEM_TYPE(BOX_SHADOW_INNER)
@ -32,7 +33,6 @@ DECLARE_DISPLAY_ITEM_TYPE(FRAMESET_BLANK)
DECLARE_DISPLAY_ITEM_TYPE(HEADER_FOOTER)
DECLARE_DISPLAY_ITEM_TYPE(IMAGE)
DECLARE_DISPLAY_ITEM_TYPE(LIST_FOCUS)
DECLARE_DISPLAY_ITEM_TYPE(MIX_BLEND_MODE)
DECLARE_DISPLAY_ITEM_TYPE(OPACITY)
DECLARE_DISPLAY_ITEM_TYPE(OPTION_EVENT_GRABBER)
DECLARE_DISPLAY_ITEM_TYPE(OUTLINE)

Просмотреть файл

@ -4317,23 +4317,23 @@ nsDisplayOpacity::WriteDebugInfo(std::stringstream& aStream)
aStream << " (opacity " << mOpacity << ")";
}
nsDisplayMixBlendMode::nsDisplayMixBlendMode(nsDisplayListBuilder* aBuilder,
nsDisplayBlendMode::nsDisplayBlendMode(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, nsDisplayList* aList,
uint8_t aBlendMode,
const DisplayItemScrollClip* aScrollClip)
: nsDisplayWrapList(aBuilder, aFrame, aList, aScrollClip)
, mBlendMode(aBlendMode)
{
MOZ_COUNT_CTOR(nsDisplayMixBlendMode);
MOZ_COUNT_CTOR(nsDisplayBlendMode);
}
#ifdef NS_BUILD_REFCNT_LOGGING
nsDisplayMixBlendMode::~nsDisplayMixBlendMode() {
MOZ_COUNT_DTOR(nsDisplayMixBlendMode);
nsDisplayBlendMode::~nsDisplayBlendMode() {
MOZ_COUNT_DTOR(nsDisplayBlendMode);
}
#endif
nsRegion nsDisplayMixBlendMode::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
nsRegion nsDisplayBlendMode::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
bool* aSnap) {
*aSnap = false;
// We are never considered opaque
@ -4341,16 +4341,16 @@ nsRegion nsDisplayMixBlendMode::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
}
LayerState
nsDisplayMixBlendMode::GetLayerState(nsDisplayListBuilder* aBuilder,
nsDisplayBlendMode::GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aParameters)
{
return LAYER_ACTIVE;
}
// nsDisplayMixBlendMode uses layers for rendering
// nsDisplayBlendMode uses layers for rendering
already_AddRefed<Layer>
nsDisplayMixBlendMode::BuildLayer(nsDisplayListBuilder* aBuilder,
nsDisplayBlendMode::BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters) {
ContainerLayerParameters newContainerParameters = aContainerParameters;
@ -4368,7 +4368,7 @@ nsDisplayMixBlendMode::BuildLayer(nsDisplayListBuilder* aBuilder,
return container.forget();
}
bool nsDisplayMixBlendMode::ComputeVisibility(nsDisplayListBuilder* aBuilder,
bool nsDisplayBlendMode::ComputeVisibility(nsDisplayListBuilder* aBuilder,
nsRegion* aVisibleRegion) {
// Our children are need their backdrop so we should not allow them to subtract
// area from aVisibleRegion. We do need to find out what is visible under
@ -4381,8 +4381,8 @@ bool nsDisplayMixBlendMode::ComputeVisibility(nsDisplayListBuilder* aBuilder,
return nsDisplayWrapList::ComputeVisibility(aBuilder, &visibleUnderChildren);
}
bool nsDisplayMixBlendMode::TryMerge(nsDisplayItem* aItem) {
if (aItem->GetType() != TYPE_MIX_BLEND_MODE)
bool nsDisplayBlendMode::TryMerge(nsDisplayItem* aItem) {
if (aItem->GetType() != TYPE_BLEND_MODE)
return false;
// items for the same content element should be merged into a single
// compositing group
@ -4393,7 +4393,7 @@ bool nsDisplayMixBlendMode::TryMerge(nsDisplayItem* aItem) {
return false;
if (aItem->ScrollClip() != ScrollClip())
return false;
MergeFromTrackingMergedFrames(static_cast<nsDisplayMixBlendMode*>(aItem));
MergeFromTrackingMergedFrames(static_cast<nsDisplayBlendMode*>(aItem));
return true;
}

Просмотреть файл

@ -3382,13 +3382,13 @@ private:
bool mForEventsOnly;
};
class nsDisplayMixBlendMode : public nsDisplayWrapList {
class nsDisplayBlendMode : public nsDisplayWrapList {
public:
nsDisplayMixBlendMode(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
nsDisplayBlendMode(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
nsDisplayList* aList, uint8_t aBlendMode,
const DisplayItemScrollClip* aScrollClip);
#ifdef NS_BUILD_REFCNT_LOGGING
virtual ~nsDisplayMixBlendMode();
virtual ~nsDisplayBlendMode();
#endif
nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
@ -3412,7 +3412,7 @@ public:
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) override {
return false;
}
NS_DISPLAY_DECL_NAME("MixBlendMode", TYPE_MIX_BLEND_MODE)
NS_DISPLAY_DECL_NAME("BlendMode", TYPE_BLEND_MODE)
private:
uint8_t mBlendMode;

Просмотреть файл

@ -2148,7 +2148,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
const DisplayItemScrollClip* containerItemScrollClip =
aBuilder->ClipState().CurrentAncestorScrollClipForStackingContextContents();
/* If adding both a nsDisplayBlendContainer and a nsDisplayMixBlendMode to the
/* If adding both a nsDisplayBlendContainer and a nsDisplayBlendMode to the
* same list, the nsDisplayBlendContainer should be added first. This only
* happens when the element creating this stacking context has mix-blend-mode
* and also contains a child which has mix-blend-mode.
@ -2313,9 +2313,9 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
DisplayListClipState::AutoSaveRestore mixBlendClipState(aBuilder);
mixBlendClipState.Clear();
resultList.AppendNewToTop(
new (aBuilder) nsDisplayMixBlendMode(aBuilder, this, &resultList,
disp->mMixBlendMode,
containerItemScrollClip));
new (aBuilder) nsDisplayBlendMode(aBuilder, this, &resultList,
disp->mMixBlendMode,
containerItemScrollClip));
}
CreateOwnLayerIfNeeded(aBuilder, &resultList);