author | Olli Pettay <Olli.Pettay@helsinki.fi> |
Thu, 28 Aug 2014 17:33:35 +0300 | |
changeset 202216 | 1082e4e90b14bfdcd37a96f2def66972007813f7 |
parent 202215 | a0ade350eb24cd057bd8a03a6fb10685c85806d8 |
child 202217 | 8b6a176e89ec1323319b1ce217d58a4d9d0f9d3f |
push id | 27394 |
push user | ryanvm@gmail.com |
push date | Thu, 28 Aug 2014 20:21:45 +0000 |
treeherder | mozilla-central@d697d649c765 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | masayuki |
bugs | 1059705 |
milestone | 34.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/content/html/content/src/nsTextEditorState.cpp +++ b/content/html/content/src/nsTextEditorState.cpp @@ -1516,18 +1516,20 @@ nsTextEditorState::UnbindFromFrame(nsTex // If it was, however, it should be unbounded from the same frame. NS_ASSERTION(!aFrame || aFrame == mBoundFrame, "Unbinding from the wrong frame"); NS_ENSURE_TRUE_VOID(!aFrame || aFrame == mBoundFrame); // If the editor is modified but nsIEditorObserver::EditAction() hasn't been // called yet, we need to notify it here because editor may be destroyed // before EditAction() is called if selection listener causes flushing layout. + bool isInEditAction = false; if (mTextListener && mEditor && mEditorInitialized && - mEditor->GetIsInEditAction()) { + NS_SUCCEEDED(mEditor->GetIsInEditAction(&isInEditAction)) && + isInEditAction) { mTextListener->EditAction(); } // We need to start storing the value outside of the editor if we're not // going to use it anymore, so retrieve it for now. nsAutoString value; GetValue(value, true);
--- a/dom/events/IMEContentObserver.cpp +++ b/dom/events/IMEContentObserver.cpp @@ -986,17 +986,19 @@ IMEContentObserver::FlushMergeableNotifi { // If this is already detached from the widget, this doesn't need to notify // anything. if (!mWidget) { return; } // If we're in handling an edit action, this method will be called later. - if (mEditor && mEditor->GetIsInEditAction()) { + bool isInEditAction = false; + if (mEditor && NS_SUCCEEDED(mEditor->GetIsInEditAction(&isInEditAction)) && + isInEditAction) { return; } // Notifying something may cause nested call of this method. For example, // when somebody notified one of the notifications may dispatch query content // event. Then, it causes flushing layout which may cause another layout // change notification.
--- a/editor/nsIEditor.idl +++ b/editor/nsIEditor.idl @@ -16,17 +16,17 @@ interface nsIDocumentStateListener; interface nsIOutputStream; interface nsITransactionManager; interface nsITransaction; interface nsIEditorObserver; interface nsIEditActionListener; interface nsIInlineSpellChecker; interface nsITransferable; -[builtinclass, scriptable, uuid(c3b61bc9-ccdd-4bcd-acd8-1b8dcbe6a247)] +[scriptable, uuid(04714a01-e02f-4ef5-a388-612451d0db16)] interface nsIEditor : nsISupports { %{C++ typedef short EDirection; typedef short EStripWrappers; %} const short eNone = 0; @@ -550,10 +550,10 @@ interface nsIEditor : nsISupports /* Set true if you want to suppress dispatching input event. */ attribute boolean suppressDispatchingInputEvent; /** * True if an edit action is being handled (in other words, between calls of * nsIEditorObserver::BeforeEditAction() and nsIEditorObserver::EditAction() * or nsIEditorObserver::CancelEditAction(). Otherwise, false. */ - [infallible, noscript] readonly attribute boolean isInEditAction; + [noscript] readonly attribute boolean isInEditAction; };
--- a/editor/nsIHTMLEditor.idl +++ b/editor/nsIHTMLEditor.idl @@ -17,17 +17,17 @@ namespace mozilla { namespace dom { class Element; } } %} [ptr] native Element (mozilla::dom::Element); -[builtinclass, scriptable, uuid(9470bee7-cad3-4382-8fb4-6bdda9f0273a)] +[scriptable, uuid(393a364f-e8e2-48a1-a271-a0067b6bac9b)] interface nsIHTMLEditor : nsISupports { %{C++ typedef short EAlignment; %} // used by GetAlignment()
--- a/editor/nsIPlaintextEditor.idl +++ b/editor/nsIPlaintextEditor.idl @@ -1,16 +1,16 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */ #include "nsISupports.idl" -[builtinclass, scriptable, uuid(da8f244b-6ffc-4be1-8b1a-667abfe1d304)] +[scriptable, uuid(b74fb158-1265-4102-91eb-edd0136b49f8)] interface nsIPlaintextEditor : nsISupports { // XXX Why aren't these in nsIEditor? // only plain text entry is allowed via events const long eEditorPlaintextMask = 0x0001; // enter key and CR-LF handled specially const long eEditorSingleLineMask = 0x0002;