Issue #3049 - Undo Stylo nonsense that breaks body and frame margins.

This restores support for using HTML tag styling of margins on the body.
Reftests post bug still pass for dynamic changes, so does the newly-added
test for body margins and frames that tests the old styling method.
This also removes the reftest list for stylo testing for obvious reasons.
This commit is contained in:
Moonchild 2022-01-07 20:09:13 +00:00 committed by roytam1
commit 0f56697eb9
15 changed files with 283 additions and 171 deletions

View file

@ -61,17 +61,11 @@ nsMappedAttributes::Clone(bool aWillAddAttr)
void* nsMappedAttributes::operator new(size_t aSize, uint32_t aAttrCount) CPP_THROW_NEW
{
size_t size = aSize + aAttrCount * sizeof(InternalAttr);
NS_ASSERTION(aAttrCount > 0, "zero-attribute nsMappedAttributes requested");
// aSize will include the mAttrs buffer so subtract that.
// We don't want to under-allocate, however, so do not subtract
// if we have zero attributes. The zero attribute case only happens
// for <body>'s mapped attributes
if (aAttrCount != 0) {
size -= sizeof(void*[1]);
}
void* newAttrs = ::operator new(size);
void* newAttrs = ::operator new(aSize - sizeof(void*[1]) +
aAttrCount * sizeof(InternalAttr));
#ifdef DEBUG
static_cast<nsMappedAttributes*>(newAttrs)->mBufferSize = aAttrCount;