Closed Bug 1357637 Opened 6 years ago Closed 6 years ago

"dom.placeholder.show_on_focus" should be referred with var cache in nsTextEditorState

Categories

(Core :: DOM: Editor, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1374117

People

(Reporter: masayuki, Unassigned)

Details

nsTextEditorState::UpdatePlaceholderVisibility() refers "dom.placeholder.show_on_focus" with Preferences::GetBool() when the editor is empty. That is called a lot of times, e.g., every edit action, every frame creation of anonymous <div>, every setting focus.
http://searchfox.org/mozilla-central/rev/214345204f1e7d97abb571b7992b6deedb5ff98f/dom/html/nsTextEditorState.cpp#2701,2709
http://searchfox.org/mozilla-central/search?q=UpdatePlaceholderVisibility&case=false&regexp=false&path=

So, I worry about that if there are too many <input> elements having placeholder *might* cause some damage of page load performance. So, it might be better to use  Preferences::AddBoolVarCache() here.
Priority: -- → P3
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.