/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
nsresult nsDocShellEditorData::SetHTMLEditor(HTMLEditor* aHTMLEditor) { // destroy any editor that we have. Checks for equality are // necessary to ensure that assigment into the nsCOMPtr does // not temporarily reduce the refCount of the editor to zero if (mHTMLEditor == aHTMLEditor) { return NS_OK;
}
if (mHTMLEditor) {
RefPtr<HTMLEditor> htmlEditor = std::move(mHTMLEditor);
htmlEditor->PreDestroy();
MOZ_ASSERT(!mHTMLEditor, "Nested call of nsDocShellEditorData::SetHTMLEditor() detected");
}
// This creates the editing session on the content docShell that owns 'this'. void nsDocShellEditorData::EnsureEditingSession() {
NS_ASSERTION(mDocShell, "Should have docShell here");
NS_ASSERTION(!mIsDetached, "This will stomp editing session!");
if (!mEditingSession) {
mEditingSession = new nsEditingSession();
}
}
nsresult nsDocShellEditorData::DetachFromWindow() {
NS_ASSERTION(mEditingSession, "Can't detach when we don't have a session to detach!");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.