Closed Bug 1485927 Opened 6 years ago Closed 6 years ago

Get rid of nsIHTMLObjectResizer.resizedObject

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox63 --- wontfix
firefox64 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

nsIHTMLObjectResizer.resizedObject is referred only by comm-central: https://searchfox.org/comm-central/rev/39cff66145fdfbfa785202c5b8d1c72a06034034/editor/ui/composer/content/editor.js#1924-1925 > if (editor.resizedObject) { > editor.hideResizers(); BlueGriffon: https://github.com/therealglazou/bluegriffon/blob/80f8876939e9a792db58ac9fe18f43f5b89ea589/base/content/bluegriffon/bindings/rulers.xml#L122-L123 > if (editor.objectResizingEnabled && editor.resizedObject) > editor.refreshResizers(); nsIHTMLObjectResizer::HideResizers() is implemented as: https://searchfox.org/mozilla-central/rev/c45b9755593ce6cc91f558b21e544f5165752de7/editor/libeditor/HTMLEditorObjectResizer.cpp#358-361 > NS_IMETHODIMP > HTMLEditor::HideResizers() > { > NS_ENSURE_TRUE(mResizedObject, NS_OK); nsIHTMLObjectResizer::RefreshResizers() is implemented as: https://searchfox.org/mozilla-central/rev/c45b9755593ce6cc91f558b21e544f5165752de7/editor/libeditor/HTMLEditorObjectResizer.cpp#215-219 > NS_IMETHODIMP > HTMLEditor::RefreshResizers() > { > // nothing to do if resizers are not displayed... > NS_ENSURE_TRUE(mResizedObject, NS_OK); And nsIHTMLObjectResizer::GetResizedObject() is implemented as: https://searchfox.org/mozilla-central/rev/c45b9755593ce6cc91f558b21e544f5165752de7/editor/libeditor/HTMLEditorObjectResizer.cpp#938-943 > NS_IMETHODIMP > HTMLEditor::GetResizedObject(Element** aResizedObject) > { > RefPtr<Element> ret = mResizedObject; > ret.forget(aResizedObject); > return NS_OK; So, it does not make sense to check whether nsIHTMLObjectResizer.resizedObject returns non-null before calling hideResizers() nor refreshResizers(). Are you okay to remove nsIHTMLObjectResizer.resizedObject in Mozilla 64?
Priority: -- → P3
I failed to set ni?... Do you agree with removing nsIHTMLObjectResizer.resizedObject?
Flags: needinfo?(jorgk)
Flags: needinfo?(daniel)
Thanks for the heads-up. (In reply to Masayuki Nakano [:masayuki] (JST, +0900) from comment #0) > So, it does not make sense to check whether > nsIHTMLObjectResizer.resizedObject returns non-null before calling > hideResizers() nor refreshResizers(). The C-C code you pointed at is used in SM's HTML editor, not in TB. Yes, HTMLEditor::HideResizers() just ignores a null in 'mResizedObject': NS_ENSURE_TRUE(mResizedObject, NS_OK); So I don't have objections to the removal.
Flags: needinfo?(jorgk)
(In reply to Masayuki Nakano [:masayuki] (JST, +0900) (offline: 9/21-9/30) from comment #1) > I failed to set ni?... > > Do you agree with removing nsIHTMLObjectResizer.resizedObject? Yes, agreed. Thanks for asking for BlueGriffon.
Flags: needinfo?(daniel)
Thank you for the reply. I'll remove it from m-c, thanks!
nsIHTMLObjectResizers.resizedObject is used only for avoiding warning of nsIHTMLObjectResizers.refreshResizers() if resizers are not visible. Therefore, if we remove the unnecessary warnings, we can get rid of the attribute.
Comment on attachment 9007768 [details] Bug 1485927 - Get rid of nsIHTMLObjectResizers.resizedObject Makoto Kato [:m_kato] has approved the revision.
Attachment #9007768 - Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/bd66e63ffd37 Get rid of nsIHTMLObjectResizers.resizedObject r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: