Redesign AutoStyleCacheArray
Categories
(Core :: DOM: Editor, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
AutoStyleCacheArray
creates 19 StyleCache
instances from constructor. StyleCache
has nsString
member variable and most of the nsString
instance are not used in most cases. Therefore, we should make it create StyleCache
instance when it's necessary.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Currently, AutoStyleCacheArray
has style information of all 19 styles.
However, its element type, StyleCache
has nsString
instance. Therefore,
the initializing cost is not reasonable since in most cases most of the
StyleCache
instances are not used actually.
This patch makes HTMLEditor::GetInlineStyles()
append elements only for
applied styles and HTMLEditor::ReapplyCachedStyles()
look for current
value from an instance with new IndexOf()
method. Therefore, this patch
may make slower if a lot of styles are applied. However, we can expect that
it's rare case.
Updated•5 years ago
|
Comment 3•5 years ago
|
||
bugherder |
Description
•