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

RESOLVED DUPLICATE of bug 1374117

Status

()

P3
normal
RESOLVED DUPLICATE of bug 1374117
a year ago
a year ago

People

(Reporter: masayuki, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

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
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1374117
You need to log in before you can comment on or make changes to this bug.