Closed Bug 1482022 Opened 2 years ago Closed 2 years ago

Split HTMLEditor::RemoveOverrideStyleSheet() for internal use

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

HTMLEditor::RemoveOverrideStyleSheet() is an XPCOM method but used internally.
So, we should create non-virtual method for this.

Additionally, it calls GetStyleSheetForURL() and RemoveStyleSheetFromList(),
but they search index of internal override style sheet array redundantly.
Moreover, RemoveStyleSheetFromList() returns error only when given URL is
not found, but RemoveOverrideStyleSheet() which is the only one caller, ignores
the error.  Therefore, for saving the redundant cost, this patch makes
RemoveStyleSheetFromList() return removing StyleSheet which is retrieved
with the call of GetStyleSheetForURL().  So, RemoveOverrideStyleSheetInternal()
stops calling GetStyleSheetForURL().
Comment on attachment 9001455 [details]
Bug 1482022 - Create HTMLEditor::RemoveOverrideStyleSheetInternal() for internal use

Makoto Kato [:m_kato] has approved the revision.
Attachment #9001455 - Flags: review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/4c023e0cd20f
Create HTMLEditor::RemoveOverrideStyleSheetInternal() for internal use r=m_kato
https://hg.mozilla.org/mozilla-central/rev/4c023e0cd20f
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.