mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
This commit is contained in:
parent
c135831979
commit
922e819d1c
62 changed files with 738 additions and 945 deletions
|
|
@ -124,10 +124,10 @@ nsTextControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||
{
|
||||
mScrollEvent.Revoke();
|
||||
|
||||
EditorInitializer* initializer = Properties().Get(TextControlInitializer());
|
||||
EditorInitializer* initializer = GetProperty(TextControlInitializer());
|
||||
if (initializer) {
|
||||
initializer->Revoke();
|
||||
Properties().Delete(TextControlInitializer());
|
||||
DeleteProperty(TextControlInitializer());
|
||||
}
|
||||
|
||||
// Unbind the text editor state object from the frame. The editor will live
|
||||
|
|
@ -410,12 +410,12 @@ nsTextControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
|
|||
if (initEagerly) {
|
||||
NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
|
||||
"Someone forgot a script blocker?");
|
||||
EditorInitializer* initializer = Properties().Get(TextControlInitializer());
|
||||
EditorInitializer* initializer = GetProperty(TextControlInitializer());
|
||||
if (initializer) {
|
||||
initializer->Revoke();
|
||||
}
|
||||
initializer = new EditorInitializer(this);
|
||||
Properties().Set(TextControlInitializer(),initializer);
|
||||
SetProperty(TextControlInitializer(),initializer);
|
||||
nsContentUtils::AddScriptRunner(initializer);
|
||||
}
|
||||
|
||||
|
|
@ -1262,7 +1262,7 @@ nsTextControlFrame::SetInitialChildList(ChildListID aListID,
|
|||
NS_ASSERTION(txtCtrl, "Content not a text control element");
|
||||
txtCtrl->InitializeKeyboardEventListeners();
|
||||
|
||||
nsPoint* contentScrollPos = Properties().Get(ContentScrollPos());
|
||||
nsPoint* contentScrollPos = GetProperty(ContentScrollPos());
|
||||
if (contentScrollPos) {
|
||||
// If we have a scroll pos stored to be passed to our anonymous
|
||||
// div, do it here!
|
||||
|
|
@ -1271,7 +1271,7 @@ nsTextControlFrame::SetInitialChildList(ChildListID aListID,
|
|||
nsPresState fakePresState;
|
||||
fakePresState.SetScrollState(*contentScrollPos);
|
||||
statefulFrame->RestoreState(&fakePresState);
|
||||
Properties().Remove(ContentScrollPos());
|
||||
RemoveProperty(ContentScrollPos());
|
||||
delete contentScrollPos;
|
||||
}
|
||||
}
|
||||
|
|
@ -1421,7 +1421,7 @@ nsTextControlFrame::RestoreState(nsPresState* aState)
|
|||
// Most likely, we don't have our anonymous content constructed yet, which
|
||||
// would cause us to end up here. In this case, we'll just store the scroll
|
||||
// pos ourselves, and forward it to the scroll frame later when it's created.
|
||||
Properties().Set(ContentScrollPos(), new nsPoint(aState->GetScrollPosition()));
|
||||
SetProperty(ContentScrollPos(), new nsPoint(aState->GetScrollPosition()));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue