summaryrefslogtreecommitdiffstats
path: root/layout/forms
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-06-26 01:51:45 +0300
committerwin7-7 <win7-7@users.noreply.github.com>2019-06-26 01:51:45 +0300
commit00812e30dfa70f9b1a752cf0d09de00f6d401c85 (patch)
treee7eec9b55dd4e5825d3196f196c7f981be56e17a /layout/forms
parentd7359c38b197c221c43def1e24cb48d4aee51bba (diff)
downloadUXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.gz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.lz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.xz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.zip
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.
Diffstat (limited to 'layout/forms')
-rw-r--r--layout/forms/nsTextControlFrame.cpp14
-rw-r--r--layout/forms/nsTextControlFrame.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp
index a7f7d40a8..f8fdf3420 100644
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -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;
}
diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h
index 9d4d0b77c..7fa39c5fb 100644
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -327,7 +327,7 @@ private:
nsresult GetRootNodeAndInitializeEditor(nsIDOMElement **aRootElement);
void FinishedInitializer() {
- Properties().Delete(TextControlInitializer());
+ DeleteProperty(TextControlInitializer());
}
private: