mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 07:17:30 +09:00
Bug 1296516 - Cleanup a bit of code in layout/base
* Tidy RestyleManager::ContentStateChanged * Convert UndisplayedMap to a typed hashtable * Cleanup infallible or unchecked nsCSSFrameConstructor methods Tag #1375
This commit is contained in:
parent
c37b4d0c63
commit
e1195a86e0
13 changed files with 358 additions and 459 deletions
|
|
@ -33,32 +33,19 @@ namespace mozilla {
|
|||
* Node in a linked list, containing the style for an element that
|
||||
* does not have a frame but whose parent does have a frame.
|
||||
*/
|
||||
struct UndisplayedNode {
|
||||
struct UndisplayedNode : public LinkedListElement<UndisplayedNode>
|
||||
{
|
||||
UndisplayedNode(nsIContent* aContent, nsStyleContext* aStyle)
|
||||
: mContent(aContent),
|
||||
mStyle(aStyle),
|
||||
mNext(nullptr)
|
||||
: mContent(aContent)
|
||||
, mStyle(aStyle)
|
||||
{
|
||||
MOZ_COUNT_CTOR(mozilla::UndisplayedNode);
|
||||
}
|
||||
|
||||
~UndisplayedNode()
|
||||
{
|
||||
MOZ_COUNT_DTOR(mozilla::UndisplayedNode);
|
||||
~UndisplayedNode() { MOZ_COUNT_DTOR(mozilla::UndisplayedNode); }
|
||||
|
||||
// Delete mNext iteratively to avoid blowing up the stack (bug 460461).
|
||||
UndisplayedNode* cur = mNext;
|
||||
while (cur) {
|
||||
UndisplayedNode* next = cur->mNext;
|
||||
cur->mNext = nullptr;
|
||||
delete cur;
|
||||
cur = next;
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
RefPtr<nsStyleContext> mStyle;
|
||||
UndisplayedNode* mNext;
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
RefPtr<nsStyleContext> mStyle;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue