mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-26 11:29:31 +00:00
closes #375: M1353187 (partial)
This commit is contained in:
parent
916d37b9ae
commit
45c95c3dad
|
@ -19,6 +19,7 @@ FramePropertyTable::Set(nsIFrame* aFrame, const FramePropertyDescriptor* aProper
|
||||||
if (mLastFrame != aFrame || !mLastEntry) {
|
if (mLastFrame != aFrame || !mLastEntry) {
|
||||||
mLastFrame = aFrame;
|
mLastFrame = aFrame;
|
||||||
mLastEntry = mEntries.PutEntry(aFrame);
|
mLastEntry = mEntries.PutEntry(aFrame);
|
||||||
|
aFrame->AddStateBits(NS_FRAME_HAS_PROPERTIES);
|
||||||
}
|
}
|
||||||
Entry* entry = mLastEntry;
|
Entry* entry = mLastEntry;
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ FramePropertyTable::Set(nsIFrame* aFrame, const FramePropertyDescriptor* aProper
|
||||||
void*
|
void*
|
||||||
FramePropertyTable::Get(const nsIFrame* aFrame,
|
FramePropertyTable::Get(const nsIFrame* aFrame,
|
||||||
const FramePropertyDescriptor* aProperty,
|
const FramePropertyDescriptor* aProperty,
|
||||||
|
bool aSkipBitCheck,
|
||||||
bool* aFoundResult)
|
bool* aFoundResult)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aFrame, "Null frame?");
|
NS_ASSERTION(aFrame, "Null frame?");
|
||||||
|
@ -70,11 +72,19 @@ FramePropertyTable::Get(const nsIFrame* aFrame,
|
||||||
*aFoundResult = false;
|
*aFoundResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!aSkipBitCheck && !(aFrame->GetStateBits() & NS_FRAME_HAS_PROPERTIES)) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (mLastFrame != aFrame) {
|
if (mLastFrame != aFrame) {
|
||||||
mLastFrame = const_cast<nsIFrame*>(aFrame);
|
mLastFrame = const_cast<nsIFrame*>(aFrame);
|
||||||
mLastEntry = mEntries.GetEntry(mLastFrame);
|
mLastEntry = mEntries.GetEntry(mLastFrame);
|
||||||
}
|
}
|
||||||
Entry* entry = mLastEntry;
|
Entry* entry = mLastEntry;
|
||||||
|
|
||||||
|
// If this assertion fires, see bug 1353187 (TenFourFox issue 375).
|
||||||
|
MOZ_ASSERT(entry || aSkipBitCheck,
|
||||||
|
"NS_FRAME_HAS_PROPERTIES bit should match whether entry exists");
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -103,7 +113,9 @@ FramePropertyTable::Get(const nsIFrame* aFrame,
|
||||||
}
|
}
|
||||||
|
|
||||||
void*
|
void*
|
||||||
FramePropertyTable::Remove(nsIFrame* aFrame, const FramePropertyDescriptor* aProperty,
|
FramePropertyTable::Remove(nsIFrame* aFrame,
|
||||||
|
const FramePropertyDescriptor* aProperty,
|
||||||
|
bool aSkipBitCheck,
|
||||||
bool* aFoundResult)
|
bool* aFoundResult)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aFrame, "Null frame?");
|
NS_ASSERTION(aFrame, "Null frame?");
|
||||||
|
@ -113,11 +125,19 @@ FramePropertyTable::Remove(nsIFrame* aFrame, const FramePropertyDescriptor* aPro
|
||||||
*aFoundResult = false;
|
*aFoundResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!aSkipBitCheck && !(aFrame->GetStateBits() & NS_FRAME_HAS_PROPERTIES)) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (mLastFrame != aFrame) {
|
if (mLastFrame != aFrame) {
|
||||||
mLastFrame = aFrame;
|
mLastFrame = aFrame;
|
||||||
mLastEntry = mEntries.GetEntry(aFrame);
|
mLastEntry = mEntries.GetEntry(aFrame);
|
||||||
}
|
}
|
||||||
Entry* entry = mLastEntry;
|
Entry* entry = mLastEntry;
|
||||||
|
|
||||||
|
// If this assertion fires, see bug 1353187 (TenFourFox issue 375).
|
||||||
|
MOZ_ASSERT(entry || aSkipBitCheck,
|
||||||
|
"NS_FRAME_HAS_PROPERTIES bit should match whether entry exists");
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -125,6 +145,7 @@ FramePropertyTable::Remove(nsIFrame* aFrame, const FramePropertyDescriptor* aPro
|
||||||
// There's only one entry and it's the one we want
|
// There's only one entry and it's the one we want
|
||||||
void* value = entry->mProp.mValue;
|
void* value = entry->mProp.mValue;
|
||||||
mEntries.RawRemoveEntry(entry);
|
mEntries.RawRemoveEntry(entry);
|
||||||
|
aFrame->RemoveStateBits(NS_FRAME_HAS_PROPERTIES);
|
||||||
mLastEntry = nullptr;
|
mLastEntry = nullptr;
|
||||||
if (aFoundResult) {
|
if (aFoundResult) {
|
||||||
*aFoundResult = true;
|
*aFoundResult = true;
|
||||||
|
@ -164,13 +185,15 @@ FramePropertyTable::Remove(nsIFrame* aFrame, const FramePropertyDescriptor* aPro
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FramePropertyTable::Delete(nsIFrame* aFrame, const FramePropertyDescriptor* aProperty)
|
FramePropertyTable::Delete(nsIFrame* aFrame,
|
||||||
|
const FramePropertyDescriptor* aProperty,
|
||||||
|
bool aSkipBitCheck)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aFrame, "Null frame?");
|
NS_ASSERTION(aFrame, "Null frame?");
|
||||||
NS_ASSERTION(aProperty, "Null property?");
|
NS_ASSERTION(aProperty, "Null property?");
|
||||||
|
|
||||||
bool found;
|
bool found;
|
||||||
void* v = Remove(aFrame, aProperty, &found);
|
void* v = Remove(aFrame, aProperty, aSkipBitCheck, &found);
|
||||||
if (found) {
|
if (found) {
|
||||||
PropertyValue pv(aProperty, v);
|
PropertyValue pv(aProperty, v);
|
||||||
pv.DestroyValueFor(aFrame);
|
pv.DestroyValueFor(aFrame);
|
||||||
|
@ -197,7 +220,14 @@ FramePropertyTable::DeleteAllFor(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aFrame, "Null frame?");
|
NS_ASSERTION(aFrame, "Null frame?");
|
||||||
|
|
||||||
|
if (!(aFrame->GetStateBits() & NS_FRAME_HAS_PROPERTIES)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Entry* entry = mEntries.GetEntry(aFrame);
|
Entry* entry = mEntries.GetEntry(aFrame);
|
||||||
|
// If this assertion fires, see bug 1353187 (TenFourFox issue 375).
|
||||||
|
MOZ_ASSERT(entry,
|
||||||
|
"NS_FRAME_HAS_PROPERTIES bit should match whether entry exists");
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -210,6 +240,8 @@ FramePropertyTable::DeleteAllFor(nsIFrame* aFrame)
|
||||||
|
|
||||||
DeleteAllForEntry(entry);
|
DeleteAllForEntry(entry);
|
||||||
mEntries.RawRemoveEntry(entry);
|
mEntries.RawRemoveEntry(entry);
|
||||||
|
|
||||||
|
// Don't bother unsetting NS_FRAME_HAS_PROPERTIES, since aFrame is going away
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -92,6 +92,7 @@ public:
|
||||||
* 'property value is null'.
|
* 'property value is null'.
|
||||||
*/
|
*/
|
||||||
void* Get(const nsIFrame* aFrame, const FramePropertyDescriptor* aProperty,
|
void* Get(const nsIFrame* aFrame, const FramePropertyDescriptor* aProperty,
|
||||||
|
bool aSkipBitCheck,
|
||||||
bool* aFoundResult = nullptr);
|
bool* aFoundResult = nullptr);
|
||||||
/**
|
/**
|
||||||
* Remove a property value for a frame. This requires one hashtable
|
* Remove a property value for a frame. This requires one hashtable
|
||||||
|
@ -105,14 +106,30 @@ public:
|
||||||
* 'property value is null'.
|
* 'property value is null'.
|
||||||
*/
|
*/
|
||||||
void* Remove(nsIFrame* aFrame, const FramePropertyDescriptor* aProperty,
|
void* Remove(nsIFrame* aFrame, const FramePropertyDescriptor* aProperty,
|
||||||
|
bool aSkipBitCheck,
|
||||||
bool* aFoundResult = nullptr);
|
bool* aFoundResult = nullptr);
|
||||||
/**
|
/**
|
||||||
* Remove and destroy a property value for a frame. This requires one
|
* Remove and destroy a property value for a frame. This requires one
|
||||||
* hashtable lookup (using the frame as the key) and a linear search
|
* hashtable lookup (using the frame as the key) and a linear search
|
||||||
* through the properties of that frame. If the frame has no such
|
* through the properties of that frame. If the frame has no such
|
||||||
* property, nothing happens.
|
* property, nothing happens.
|
||||||
|
*
|
||||||
|
* The DeleteSkippingBitCheck variant doesn't test
|
||||||
|
* NS_FRAME_HAS_PROPERTIES on aFrame, so it is safe to call after
|
||||||
|
* aFrame has been destroyed as long as, since that destruction
|
||||||
|
* happened, it isn't possible for a new frame to have been created
|
||||||
|
* and the same property added.
|
||||||
*/
|
*/
|
||||||
void Delete(nsIFrame* aFrame, const FramePropertyDescriptor* aProperty);
|
void Delete(nsIFrame* aFrame, const FramePropertyDescriptor* aProperty,
|
||||||
|
bool aSkipBitCheck);
|
||||||
|
|
||||||
|
// TenFourFox issue 375, from M1353187.
|
||||||
|
void DeleteSkippingBitCheck(nsIFrame* aFrame,
|
||||||
|
const FramePropertyDescriptor* aProperty)
|
||||||
|
{
|
||||||
|
Delete(aFrame, aProperty, true /* aSkipBitCheck */);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove and destroy all property values for a frame. This requires one
|
* Remove and destroy all property values for a frame. This requires one
|
||||||
* hashtable lookup (using the frame as the key).
|
* hashtable lookup (using the frame as the key).
|
||||||
|
@ -129,7 +146,16 @@ public:
|
||||||
bool Has(const nsIFrame* aFrame, const FramePropertyDescriptor* aProperty)
|
bool Has(const nsIFrame* aFrame, const FramePropertyDescriptor* aProperty)
|
||||||
{
|
{
|
||||||
bool foundResult = false;
|
bool foundResult = false;
|
||||||
(void)Get(aFrame, aProperty, &foundResult);
|
(void)Get(aFrame, aProperty, false /* aSkipBitCheck */, &foundResult);
|
||||||
|
return foundResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TenFourFox issue 375, from M1353187.
|
||||||
|
bool HasSkippingBitCheck(const nsIFrame* aFrame,
|
||||||
|
const FramePropertyDescriptor* aProperty)
|
||||||
|
{
|
||||||
|
bool foundResult = false;
|
||||||
|
(void)Get(aFrame, aProperty, true /* aSkipBitCheck */, &foundResult);
|
||||||
return foundResult;
|
return foundResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,22 +263,22 @@ public:
|
||||||
void* Get(const FramePropertyDescriptor* aProperty,
|
void* Get(const FramePropertyDescriptor* aProperty,
|
||||||
bool* aFoundResult = nullptr) const
|
bool* aFoundResult = nullptr) const
|
||||||
{
|
{
|
||||||
return mTable->Get(mFrame, aProperty, aFoundResult);
|
return mTable->Get(mFrame, aProperty, false /* aSkipBitCheck */, aFoundResult);
|
||||||
}
|
}
|
||||||
void* Remove(const FramePropertyDescriptor* aProperty,
|
void* Remove(const FramePropertyDescriptor* aProperty,
|
||||||
bool* aFoundResult = nullptr) const
|
bool* aFoundResult = nullptr) const
|
||||||
{
|
{
|
||||||
return mTable->Remove(mFrame, aProperty, aFoundResult);
|
return mTable->Remove(mFrame, aProperty, false /* aSkipBitCheck */, aFoundResult);
|
||||||
}
|
}
|
||||||
void Delete(const FramePropertyDescriptor* aProperty)
|
void Delete(const FramePropertyDescriptor* aProperty)
|
||||||
{
|
{
|
||||||
mTable->Delete(mFrame, aProperty);
|
mTable->Delete(mFrame, aProperty, false /* aSkipBitCheck */);
|
||||||
}
|
}
|
||||||
// TenFourFox issue 493
|
// TenFourFox issue 493
|
||||||
bool Has(const FramePropertyDescriptor* aProperty)
|
bool Has(const FramePropertyDescriptor* aProperty)
|
||||||
{
|
{
|
||||||
bool foundResult;
|
bool foundResult;
|
||||||
(void)mTable->Get(mFrame, aProperty, &foundResult);
|
(void)mTable->Get(mFrame, aProperty, false /* aSkipBitCheck */, &foundResult);
|
||||||
return foundResult;
|
return foundResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ GetNextBlockInInlineSibling(FramePropertyTable* aPropTable, nsIFrame* aFrame)
|
||||||
}
|
}
|
||||||
|
|
||||||
return static_cast<nsIFrame*>
|
return static_cast<nsIFrame*>
|
||||||
(aPropTable->Get(aFrame, nsIFrame::IBSplitSibling()));
|
(aPropTable->Get(aFrame, nsIFrame::IBSplitSibling(), false /* aSkipBitCheck */));
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsIFrame*
|
static nsIFrame*
|
||||||
|
@ -757,7 +757,13 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||||
"Reflow hint bits set without actually asking for a reflow");
|
"Reflow hint bits set without actually asking for a reflow");
|
||||||
|
|
||||||
// skip any frame that has been destroyed due to a ripple effect
|
// skip any frame that has been destroyed due to a ripple effect
|
||||||
if (frame && !propTable->Get(frame, ChangeListProperty())) {
|
if (frame && !propTable->HasSkippingBitCheck(frame, ChangeListProperty())) {
|
||||||
|
// Null out the pointer since the frame was already destroyed.
|
||||||
|
// This is important so we don't try to delete its
|
||||||
|
// ChangeListProperty() below. (marked as YYYY)
|
||||||
|
nsStyleChangeData* changeData;
|
||||||
|
aChangeList.ChangeAt(index, &changeData);
|
||||||
|
changeData->mFrame = nullptr;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -806,6 +812,13 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hint & nsChangeHint_ReconstructFrame) {
|
if (hint & nsChangeHint_ReconstructFrame) {
|
||||||
|
// We're about to destroy data.mFrame, so null out the pointer.
|
||||||
|
// This is important so we don't try to delete its
|
||||||
|
// ChangeListProperty() below. (marked as YYYY)
|
||||||
|
nsStyleChangeData* changeData;
|
||||||
|
aChangeList.ChangeAt(index, &changeData);
|
||||||
|
changeData->mFrame = nullptr;
|
||||||
|
|
||||||
// If we ever start passing true here, be careful of restyles
|
// If we ever start passing true here, be careful of restyles
|
||||||
// that involve a reframe and animations. In particular, if the
|
// that involve a reframe and animations. In particular, if the
|
||||||
// restyle we're processing here is an animation restyle, but
|
// restyle we're processing here is an animation restyle, but
|
||||||
|
@ -980,8 +993,8 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||||
while (0 <= --index) {
|
while (0 <= --index) {
|
||||||
const nsStyleChangeData* changeData;
|
const nsStyleChangeData* changeData;
|
||||||
aChangeList.ChangeAt(index, &changeData);
|
aChangeList.ChangeAt(index, &changeData);
|
||||||
if (changeData->mFrame) {
|
if (changeData->mFrame) { // YYYY see above
|
||||||
propTable->Delete(changeData->mFrame, ChangeListProperty());
|
propTable->DeleteSkippingBitCheck(changeData->mFrame, ChangeListProperty());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -822,7 +822,8 @@ void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
||||||
static void UnmarkFrameForDisplay(nsIFrame* aFrame) {
|
static void UnmarkFrameForDisplay(nsIFrame* aFrame) {
|
||||||
nsPresContext* presContext = aFrame->PresContext();
|
nsPresContext* presContext = aFrame->PresContext();
|
||||||
presContext->PropertyTable()->
|
presContext->PropertyTable()->
|
||||||
Delete(aFrame, nsDisplayListBuilder::OutOfFlowDisplayDataProperty());
|
Delete(aFrame, nsDisplayListBuilder::OutOfFlowDisplayDataProperty(),
|
||||||
|
false /* aSkipBitCheck */);
|
||||||
|
|
||||||
for (nsIFrame* f = aFrame; f;
|
for (nsIFrame* f = aFrame; f;
|
||||||
f = nsLayoutUtils::GetParentOrPlaceholderFor(f)) {
|
f = nsLayoutUtils::GetParentOrPlaceholderFor(f)) {
|
||||||
|
|
|
@ -1995,7 +1995,8 @@ PresShell::NotifyDestroyingFrame(nsIFrame* aFrame)
|
||||||
// the DisplayItemData destructor will use the destroyed frame when it
|
// the DisplayItemData destructor will use the destroyed frame when it
|
||||||
// tries to remove it from the (array) value of this property.
|
// tries to remove it from the (array) value of this property.
|
||||||
mPresContext->PropertyTable()->
|
mPresContext->PropertyTable()->
|
||||||
Delete(aFrame, FrameLayerBuilder::LayerManagerDataProperty());
|
Delete(aFrame, FrameLayerBuilder::LayerManagerDataProperty(),
|
||||||
|
false /* aSkipBitCheck */);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,12 +169,12 @@ nsContainerFrame::SafelyDestroyFrameListProp(nsIFrame* aDestructRoot,
|
||||||
// delete the property -- that's why we fetch the property again before
|
// delete the property -- that's why we fetch the property again before
|
||||||
// removing each frame rather than fetching it once and iterating the list.
|
// removing each frame rather than fetching it once and iterating the list.
|
||||||
while (nsFrameList* frameList =
|
while (nsFrameList* frameList =
|
||||||
static_cast<nsFrameList*>(aPropTable->Get(this, aProp))) {
|
static_cast<nsFrameList*>(aPropTable->Get(this, aProp, false /* aSkipBitCheck */))) {
|
||||||
nsIFrame* frame = frameList->RemoveFirstChild();
|
nsIFrame* frame = frameList->RemoveFirstChild();
|
||||||
if (MOZ_LIKELY(frame)) {
|
if (MOZ_LIKELY(frame)) {
|
||||||
frame->DestroyFrom(aDestructRoot);
|
frame->DestroyFrom(aDestructRoot);
|
||||||
} else {
|
} else {
|
||||||
aPropTable->Remove(this, aProp);
|
aPropTable->Remove(this, aProp, false /* aSkipBitCheck */);
|
||||||
frameList->Delete(aPresShell);
|
frameList->Delete(aPresShell);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -201,8 +201,8 @@ nsContainerFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
SafelyDestroyFrameListProp(aDestructRoot, shell, props, OverflowProperty());
|
SafelyDestroyFrameListProp(aDestructRoot, shell, props, OverflowProperty());
|
||||||
|
|
||||||
MOZ_ASSERT(IsFrameOfType(nsIFrame::eCanContainOverflowContainers) ||
|
MOZ_ASSERT(IsFrameOfType(nsIFrame::eCanContainOverflowContainers) ||
|
||||||
!(props->Get(this, nsContainerFrame::OverflowContainersProperty()) ||
|
!(props->Get(this, nsContainerFrame::OverflowContainersProperty(), false /* aSkipBitCheck */) ||
|
||||||
props->Get(this, nsContainerFrame::ExcessOverflowContainersProperty())),
|
props->Get(this, nsContainerFrame::ExcessOverflowContainersProperty(), false /* aSkipBitCheck */)),
|
||||||
"this type of frame should't have overflow containers");
|
"this type of frame should't have overflow containers");
|
||||||
|
|
||||||
SafelyDestroyFrameListProp(aDestructRoot, shell, props,
|
SafelyDestroyFrameListProp(aDestructRoot, shell, props,
|
||||||
|
@ -248,7 +248,7 @@ static void AppendIfNonempty(const nsIFrame* aFrame,
|
||||||
nsIFrame::ChildListID aListID)
|
nsIFrame::ChildListID aListID)
|
||||||
{
|
{
|
||||||
nsFrameList* list = static_cast<nsFrameList*>(
|
nsFrameList* list = static_cast<nsFrameList*>(
|
||||||
aPropTable->Get(aFrame, aProperty));
|
aPropTable->Get(aFrame, aProperty, false /* aSkipBitCheck */));
|
||||||
if (list) {
|
if (list) {
|
||||||
list->AppendIfNonempty(aLists, aListID);
|
list->AppendIfNonempty(aLists, aListID);
|
||||||
}
|
}
|
||||||
|
@ -1337,11 +1337,11 @@ static bool
|
||||||
TryRemoveFrame(nsIFrame* aFrame, FramePropertyTable* aPropTable,
|
TryRemoveFrame(nsIFrame* aFrame, FramePropertyTable* aPropTable,
|
||||||
const FramePropertyDescriptor* aProp, nsIFrame* aChildToRemove)
|
const FramePropertyDescriptor* aProp, nsIFrame* aChildToRemove)
|
||||||
{
|
{
|
||||||
nsFrameList* list = static_cast<nsFrameList*>(aPropTable->Get(aFrame, aProp));
|
nsFrameList* list = static_cast<nsFrameList*>(aPropTable->Get(aFrame, aProp, false /* aSkipBitCheck */));
|
||||||
if (list && list->StartRemoveFrame(aChildToRemove)) {
|
if (list && list->StartRemoveFrame(aChildToRemove)) {
|
||||||
// aChildToRemove *may* have been removed from this list.
|
// aChildToRemove *may* have been removed from this list.
|
||||||
if (list->IsEmpty()) {
|
if (list->IsEmpty()) {
|
||||||
aPropTable->Remove(aFrame, aProp);
|
aPropTable->Remove(aFrame, aProp, false /* aSkipBitCheck */);
|
||||||
list->Delete(aFrame->PresContext()->PresShell());
|
list->Delete(aFrame->PresContext()->PresShell());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1359,10 +1359,10 @@ nsContainerFrame::StealFrame(nsIFrame* aChild,
|
||||||
if (!list || !list->ContainsFrame(aChild)) {
|
if (!list || !list->ContainsFrame(aChild)) {
|
||||||
FramePropertyTable* propTable = PresContext()->PropertyTable();
|
FramePropertyTable* propTable = PresContext()->PropertyTable();
|
||||||
list = static_cast<nsFrameList*>(
|
list = static_cast<nsFrameList*>(
|
||||||
propTable->Get(this, OverflowContainersProperty()));
|
propTable->Get(this, OverflowContainersProperty(), false /* aSkipBitCheck */));
|
||||||
if (!list || !list->ContainsFrame(aChild)) {
|
if (!list || !list->ContainsFrame(aChild)) {
|
||||||
list = static_cast<nsFrameList*>(
|
list = static_cast<nsFrameList*>(
|
||||||
propTable->Get(this, ExcessOverflowContainersProperty()));
|
propTable->Get(this, ExcessOverflowContainersProperty(), false /* aSkipBitCheck */));
|
||||||
MOZ_ASSERT(list && list->ContainsFrame(aChild), "aChild isn't our child"
|
MOZ_ASSERT(list && list->ContainsFrame(aChild), "aChild isn't our child"
|
||||||
" or on a frame list not supported by StealFrame");
|
" or on a frame list not supported by StealFrame");
|
||||||
}
|
}
|
||||||
|
@ -1534,14 +1534,14 @@ nsFrameList*
|
||||||
nsContainerFrame::GetPropTableFrames(const FramePropertyDescriptor* aProperty) const
|
nsContainerFrame::GetPropTableFrames(const FramePropertyDescriptor* aProperty) const
|
||||||
{
|
{
|
||||||
FramePropertyTable* propTable = PresContext()->PropertyTable();
|
FramePropertyTable* propTable = PresContext()->PropertyTable();
|
||||||
return static_cast<nsFrameList*>(propTable->Get(this, aProperty));
|
return static_cast<nsFrameList*>(propTable->Get(this, aProperty, false /* aSkipBitCheck */));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsFrameList*
|
nsFrameList*
|
||||||
nsContainerFrame::RemovePropTableFrames(const FramePropertyDescriptor* aProperty)
|
nsContainerFrame::RemovePropTableFrames(const FramePropertyDescriptor* aProperty)
|
||||||
{
|
{
|
||||||
FramePropertyTable* propTable = PresContext()->PropertyTable();
|
FramePropertyTable* propTable = PresContext()->PropertyTable();
|
||||||
return static_cast<nsFrameList*>(propTable->Remove(this, aProperty));
|
return static_cast<nsFrameList*>(propTable->Remove(this, aProperty, false /* aSkipBitCheck */));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1957,10 +1957,12 @@ nsOverflowContinuationTracker::EndFinish(nsIFrame* aChild)
|
||||||
nsPresContext* pc = aChild->PresContext();
|
nsPresContext* pc = aChild->PresContext();
|
||||||
FramePropertyTable* propTable = pc->PropertyTable();
|
FramePropertyTable* propTable = pc->PropertyTable();
|
||||||
nsFrameList* eoc = static_cast<nsFrameList*>(propTable->Get(mParent,
|
nsFrameList* eoc = static_cast<nsFrameList*>(propTable->Get(mParent,
|
||||||
nsContainerFrame::ExcessOverflowContainersProperty()));
|
nsContainerFrame::ExcessOverflowContainersProperty(),
|
||||||
|
false /* aSkipBitCheck */));
|
||||||
if (eoc != mOverflowContList) {
|
if (eoc != mOverflowContList) {
|
||||||
nsFrameList* oc = static_cast<nsFrameList*>(propTable->Get(mParent,
|
nsFrameList* oc = static_cast<nsFrameList*>(propTable->Get(mParent,
|
||||||
nsContainerFrame::OverflowContainersProperty()));
|
nsContainerFrame::OverflowContainersProperty(),
|
||||||
|
false /* aSkipBitCheck */));
|
||||||
if (oc != mOverflowContList) {
|
if (oc != mOverflowContList) {
|
||||||
// mOverflowContList was deleted
|
// mOverflowContList was deleted
|
||||||
mPrevOverflowCont = nullptr;
|
mPrevOverflowCont = nullptr;
|
||||||
|
|
|
@ -8914,8 +8914,9 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
|
||||||
parentReflowState(aPresContext, parentFrame, aRenderingContext,
|
parentReflowState(aPresContext, parentFrame, aRenderingContext,
|
||||||
LogicalSize(parentWM, parentSize),
|
LogicalSize(parentWM, parentSize),
|
||||||
nsHTMLReflowState::DUMMY_PARENT_REFLOW_STATE);
|
nsHTMLReflowState::DUMMY_PARENT_REFLOW_STATE);
|
||||||
parentFrame->RemoveStateBits(~nsFrameState(0));
|
const nsFrameState bitsToLeaveUntouched = NS_FRAME_HAS_PROPERTIES;
|
||||||
parentFrame->AddStateBits(savedState);
|
parentFrame->RemoveStateBits(~bitsToLeaveUntouched);
|
||||||
|
parentFrame->AddStateBits(savedState & ~bitsToLeaveUntouched);
|
||||||
|
|
||||||
// This may not do very much useful, but it's probably worth trying.
|
// This may not do very much useful, but it's probably worth trying.
|
||||||
if (parentSize.width != NS_INTRINSICSIZE)
|
if (parentSize.width != NS_INTRINSICSIZE)
|
||||||
|
|
|
@ -255,13 +255,17 @@ FRAME_STATE_BIT(Generic, 53, NS_FRAME_IS_NONDISPLAY)
|
||||||
FRAME_STATE_BIT(Generic, 54, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY)
|
FRAME_STATE_BIT(Generic, 54, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY)
|
||||||
|
|
||||||
// The display list of the frame can be handled by the shortcut for
|
// The display list of the frame can be handled by the shortcut for
|
||||||
// COMMON CASE. This is bug 1342009, but it uses bit 57. Since we might
|
// COMMON CASE. This is bug 1342009, but it uses bit 57. Since we have now
|
||||||
// implement NS_FRAME_HAS_PROPERTIES (56) in the near future, we will use bit
|
// implemented NS_FRAME_HAS_PROPERTIES (56) in TenFourFox, we will use bit
|
||||||
// 55. XXX: Dump bit 57 and make it all work out -- we'd need the backout
|
// 55. XXX: Dump bit 57 and make it all work out -- we'd need the backout
|
||||||
// bits from bug 1250244 and then just not implement the replacement API.
|
// bits from bug 1250244 and then just not implement the replacement API.
|
||||||
// However, that's only worth doing if we're really short on bits later.
|
// However, that's only worth doing if we're really short on bits later.
|
||||||
FRAME_STATE_BIT(Generic, 55, NS_FRAME_SIMPLE_DISPLAYLIST)
|
FRAME_STATE_BIT(Generic, 55, NS_FRAME_SIMPLE_DISPLAYLIST)
|
||||||
|
|
||||||
|
// Frame has properties in the nsIFrame::Properties() hash.
|
||||||
|
// See bug 1353187 (TenFourFox issue 375).
|
||||||
|
FRAME_STATE_BIT(Generic, 56, NS_FRAME_HAS_PROPERTIES)
|
||||||
|
|
||||||
// Frame has VR content, and needs VR display items created
|
// Frame has VR content, and needs VR display items created
|
||||||
FRAME_STATE_BIT(Generic, 57, NS_FRAME_HAS_VR_CONTENT)
|
FRAME_STATE_BIT(Generic, 57, NS_FRAME_HAS_VR_CONTENT)
|
||||||
|
|
||||||
|
|
|
@ -4213,9 +4213,12 @@ nsContinuingTextFrame::Init(nsIContent* aContent,
|
||||||
FramePropertyTable *propTable = PresContext()->PropertyTable();
|
FramePropertyTable *propTable = PresContext()->PropertyTable();
|
||||||
// Get all the properties from the prev-in-flow first to take
|
// Get all the properties from the prev-in-flow first to take
|
||||||
// advantage of the propTable's cache and simplify the assertion below
|
// advantage of the propTable's cache and simplify the assertion below
|
||||||
void* embeddingLevel = propTable->Get(aPrevInFlow, EmbeddingLevelProperty());
|
void* embeddingLevel = propTable->Get(aPrevInFlow, EmbeddingLevelProperty(),
|
||||||
void* baseLevel = propTable->Get(aPrevInFlow, BaseLevelProperty());
|
false /* aSkipBitCheck */);
|
||||||
void* paragraphDepth = propTable->Get(aPrevInFlow, ParagraphDepthProperty());
|
void* baseLevel = propTable->Get(aPrevInFlow, BaseLevelProperty(), false /*
|
||||||
|
aSkipBitCheck */);
|
||||||
|
void* paragraphDepth = propTable->Get(aPrevInFlow, ParagraphDepthProperty(),
|
||||||
|
false /* aSkipBitCheck */);
|
||||||
propTable->Set(this, EmbeddingLevelProperty(), embeddingLevel);
|
propTable->Set(this, EmbeddingLevelProperty(), embeddingLevel);
|
||||||
propTable->Set(this, BaseLevelProperty(), baseLevel);
|
propTable->Set(this, BaseLevelProperty(), baseLevel);
|
||||||
propTable->Set(this, ParagraphDepthProperty(), paragraphDepth);
|
propTable->Set(this, ParagraphDepthProperty(), paragraphDepth);
|
||||||
|
@ -4227,9 +4230,12 @@ nsContinuingTextFrame::Init(nsIContent* aContent,
|
||||||
while (nextContinuation &&
|
while (nextContinuation &&
|
||||||
nextContinuation->GetContentOffset() < mContentOffset) {
|
nextContinuation->GetContentOffset() < mContentOffset) {
|
||||||
NS_ASSERTION(
|
NS_ASSERTION(
|
||||||
embeddingLevel == propTable->Get(nextContinuation, EmbeddingLevelProperty()) &&
|
embeddingLevel == propTable->Get(nextContinuation,
|
||||||
baseLevel == propTable->Get(nextContinuation, BaseLevelProperty()) &&
|
EmbeddingLevelProperty(), false /* aSkipBitCheck */) &&
|
||||||
paragraphDepth == propTable->Get(nextContinuation, ParagraphDepthProperty()),
|
baseLevel == propTable->Get(nextContinuation, BaseLevelProperty(),
|
||||||
|
false /* aSkipBitCheck */) &&
|
||||||
|
paragraphDepth == propTable->Get(nextContinuation,
|
||||||
|
ParagraphDepthProperty(), false /* aSkipBitCheck */),
|
||||||
"stealing text from different type of BIDI continuation");
|
"stealing text from different type of BIDI continuation");
|
||||||
nextContinuation->mContentOffset = mContentOffset;
|
nextContinuation->mContentOffset = mContentOffset;
|
||||||
nextContinuation = static_cast<nsTextFrame*>(nextContinuation->GetNextContinuation());
|
nextContinuation = static_cast<nsTextFrame*>(nextContinuation->GetNextContinuation());
|
||||||
|
|
|
@ -180,7 +180,7 @@ nsMathMLContainerFrame::ClearSavedChildMetrics()
|
||||||
nsIFrame* childFrame = mFrames.FirstChild();
|
nsIFrame* childFrame = mFrames.FirstChild();
|
||||||
FramePropertyTable* props = PresContext()->PropertyTable();
|
FramePropertyTable* props = PresContext()->PropertyTable();
|
||||||
while (childFrame) {
|
while (childFrame) {
|
||||||
props->Delete(childFrame, HTMLReflowMetricsProperty());
|
props->Delete(childFrame, HTMLReflowMetricsProperty(), false /* aSkipBitCheck */);
|
||||||
childFrame = childFrame->GetNextSibling();
|
childFrame = childFrame->GetNextSibling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -765,7 +765,7 @@ nsMathMLmtableOuterFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||||
aAttribute == nsGkAtoms::columnlines_) {
|
aAttribute == nsGkAtoms::columnlines_) {
|
||||||
// clear any cached property list for this table
|
// clear any cached property list for this table
|
||||||
presContext->PropertyTable()->
|
presContext->PropertyTable()->
|
||||||
Delete(tableFrame, AttributeToProperty(aAttribute));
|
Delete(tableFrame, AttributeToProperty(aAttribute), false /* aSkipBitCheck */);
|
||||||
// Reparse the new attribute on the table.
|
// Reparse the new attribute on the table.
|
||||||
ParseFrameAttribute(tableFrame, aAttribute, true);
|
ParseFrameAttribute(tableFrame, aAttribute, true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1117,7 +1117,7 @@ nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
presContext->PropertyTable()->Delete(this, AttributeToProperty(aAttribute));
|
presContext->PropertyTable()->Delete(this, AttributeToProperty(aAttribute), false /* aSkipBitCheck */);
|
||||||
|
|
||||||
bool allowMultiValues = (aAttribute == nsGkAtoms::columnalign_);
|
bool allowMultiValues = (aAttribute == nsGkAtoms::columnalign_);
|
||||||
|
|
||||||
|
@ -1175,7 +1175,7 @@ nsMathMLmtdFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||||
aAttribute == nsGkAtoms::columnalign_) {
|
aAttribute == nsGkAtoms::columnalign_) {
|
||||||
|
|
||||||
nsPresContext* presContext = PresContext();
|
nsPresContext* presContext = PresContext();
|
||||||
presContext->PropertyTable()->Delete(this, AttributeToProperty(aAttribute));
|
presContext->PropertyTable()->Delete(this, AttributeToProperty(aAttribute), false /* aSkipBitCheck */);
|
||||||
|
|
||||||
// Reparse the attribute.
|
// Reparse the attribute.
|
||||||
ParseFrameAttribute(this, aAttribute, false);
|
ParseFrameAttribute(this, aAttribute, false);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user