mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Issue #1375 - Include content rules from HTMLTableCellElement::WalkContentStyleRules and move to the mapped attr functionality
* Bugs 1341647 and 1341648
This commit is contained in:
parent
922cbf0217
commit
6b48075b57
16 changed files with 158 additions and 259 deletions
|
|
@ -62,11 +62,17 @@ nsMappedAttributes::Clone(bool aWillAddAttr)
|
|||
|
||||
void* nsMappedAttributes::operator new(size_t aSize, uint32_t aAttrCount) CPP_THROW_NEW
|
||||
{
|
||||
NS_ASSERTION(aAttrCount > 0, "zero-attribute nsMappedAttributes requested");
|
||||
size_t size = aSize + aAttrCount * sizeof(InternalAttr);
|
||||
|
||||
// aSize will include the mAttrs buffer so subtract that.
|
||||
void* newAttrs = ::operator new(aSize - sizeof(void*[1]) +
|
||||
aAttrCount * sizeof(InternalAttr));
|
||||
// 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);
|
||||
|
||||
#ifdef DEBUG
|
||||
static_cast<nsMappedAttributes*>(newAttrs)->mBufferSize = aAttrCount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue