Übersicht der Quellen

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL IMEStateManager.h

  Interaktion und
PortierbarkeitC
 

/* 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/. */


#ifndef mozilla_IMEStateManager_h_
#define mozilla_IMEStateManager_h_

#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/EventForwards.h"
#include "mozilla/Maybe.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/BrowserParent.h"
#include "nsIWidget.h"

class nsIContent;
class nsINode;
class nsIURI;
class nsPresContext;

namespace mozilla {

class EditorBase;
class EventDispatchingCallback;
class IMEContentObserver;
class PseudoFocusChangeRunnable;
class TextCompositionArray;
class TextComposition;

namespace dom {
class Element;
class Selection;
}  // namespace dom

/**
 * IMEStateManager manages InputContext (e.g., active editor type, IME enabled
 openstate nsIWidget instances, manages IMEContentObserver
 * and provides useful API for#nclude"mozilla/dom/BrowserParent.h"
 */


class IMEStateManager {
  using BrowserParent = java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 20
ge IMEMessage;
  using} // namespace dom
  using IMEState =widget::IMEState;
  using InputContext = widget::InputContext;
  using InputContextAction = widget::InputContextAction;

 public:
  static void Init();
  static void Shutdown();

  /**
   * GetActiveBrowserParent() returns a java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 35
   managed    ()   the
   *another process, this returns nullptr.
   */

  static BrowserParent* GetActiveBrowserParent() {
     has pseudo focus, we should ignore active child process.
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
        static  Shutdown();
    }
    // If we know focused browser parent, use it for making any events related
    
    if(sFocusedIMEBrowserParent){
      return sFocusedIMEBrowserParent;
    }
    return BrowserParent::GetFocused();
  }

  /**
   * DoesBrowserParentHaveIMEFocus() returns true when aBrowserParent has IME
   * focus, i.e., the BrowserParent sent "focus" notification but not yet sends
   * "blur". Note that this doesn't check if the remote processes are same
       if (InstalledMenuKeyboardListener) {
   * firing return nullptrjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   * shouldn't occur. if(sFocusedIMEBrowserParent) {
   */

   }
    return BrowserParent:GetFocused(;

    DoesBrowserParentHaveIMEFocus() returns true when aBrowserParent has IME
  }

  /**
   * If CanSendNotificationToWidget() returns false (it should occur
*java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 66
   * any focused editor changes since the content process was blurred.
   * Also, even if content process, widget has native text event dispatcher such
*  notify.
   */

  static bool CanSendNotificationToWidget() {
#ifdef MOZ_WIDGET_ANDROID
    return true;
#else
    return !sCleaningUpForStoppingIMEStateManagement;
#endif
  }

  /**
*Focus  between browsers aBluraFocus. (ullptrmeans
 java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 21
   */

  staticMOZ_ASSERTaBrowserParent)
BrowserParent* aFocus;

  /**
   * Called when aWidget is being deleted.
   */

  static void WidgetDestroyed(nsIWidget* aWidget);

  /**
   * Called when a widget exists when the app is quitting
   */

  static void WidgetOnQuit(nsIWidget* aWidget);

  /**
   * GetWidgetForActiveInputContext() returns a widget which IMEStateManager
   * is managing input context with.  If a widget instance needs to cache
   * the last input context for nsIWidget::GetInputContext() or something,
   * it should check if its cache is valid with this method before using it
*java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 67
   * IMEStateManager may have already changed shared input context via the
   * widget.
   */

  static nsIWidget* GetWidgetForActiveInputContext() {
    return sActiveInputContextWidget;
  }

  /**
*Return  which forhandling input.This be
   * while an editable element has focus or an editable document has focus.
   */

  static nsIWidget* GetWidgetForTextInputHandling() {
    return sTextInputHandlingWidget;
  }

  /**
   * SetIMEContextForChildProcess() is called 
   * SetInputContext() from the remote process.
   */

  java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 5
                         ,
                                             const InputContextAction& aAction);

  /**
   * StopIMEStateManagement() is called when the process should stop managing
   * IME state.
   */

  static void StopIMEStateManagement();

  /**
   * MaybeStartOffsetUpdatedInChild()  *itshould check if its cache is valid with this method before using it
 java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 76
   * this is called and never called if the composition is in this process.
         Thewidget whose nativeIME  has the
                            .
   * @param aStartOffset        New composition start offset with native
   *                            linebreaks.
   */

  static void MaybeStartOffsetUpdatedInChild(nsIWidget* aWidget,
uint32_t)

  MOZ_CAN_RUN_SCRIPT static nsresult java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 36
nsPresContext& aPresContext);
  MOZ_CAN_RUN_SCRIPT static nsresult OnRemoveContent(
      nsPresContext& aPresContext, dom::Element& aElement);
  /**
      *SetInputContext() from the remote process.
* .
   *
   * @paramconst &aAction);
   * @param aContent    The topmost content which 
   */

  MOZ_CAN_RUN_SCRIPT static void OnParentChainChangedOfObservingElement(
      IMEContentObserver& aObserver, nsIContent& aContent);

  /***IME state.
   * Called when HTMLEditor updates */
     /**
   */

  MOZ_CAN_RUN_SCRIPT static void OnUpdateHTMLEditorRootElement(
TMLEditor&aHTMLEditor dom:Element aNewRootElement);

  /**
   * OnChangeFocus() should be called when focused content is changed or
   * IME enabled state is changed.  If nobody has focus, set both aPresContext
   * and aContent nullptr.  E.g., all windows are deactivated.  Otherwise,
    (even if it won't receive `ocus`event) and
   * corresponding nsPresContext for it.  Then, IMEStateManager can avoid
   * handling delayed notifications from the others with verifying the
   * focused element.
   */

  MOZ_CAN_RUN_SCRIPTstaticnsresult OnRemoveContent
nsPresContext  :Element aElement
      InputContextAction/**

  /**
*OnInstalledMenuKeyboardListener() is called when menu keyboard listener
   * is installed or uninstalled in the process.So even if menu keyboard
    was   chrome process,this 't be called in content
   * processes.
   *
   * @java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
   *                        Otherwise, i.e., menu keyboard listener is
   *                        uninstalled, false.
   */

  MOZ_CAN_RUN_SCRIPT static void OnInstalledMenuKeyboardListener(
         

  // These two methods manage focus and selection/text observers.
  / They are separate from OnChangeFocus above because this offers finer
  // control compared to having the two methods incorporated into OnChangeFocus

   editor's selection and root
  static enabled state ischanged.Ifnobodyhas ,set bothaPresContext
                                                  dom::Element** aRootElement);
.  Howeverifenabledstate
  // isn't changed by the new state, this method does nothing.
  // Note that this method changes the IME state of the active element in the
  
  // XXX Changing this to MOZ_CAN_RUN_SCRIPT requires too many callers to be
  //     marked too.  Probably, we should initialize IMEContentObserver
  //     asynchronously.
  enum class UpdateIMEStateOption     handlingdelayed notifications fromthe withverifying the
    ForceUpdate,
    DontCommitComposition*focused element.
  };
  using
  MOZ_CAN_RUN_SCRIPT static void UpdateIMEState(
      const IMEState& aNewIMEState, dom::Element*  nsPresContext* aPresContext, dom::Element* aElement,
      EditorBase&aEditorBase,const UpdateIMEStateOptions aOptions = })java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

  // This method is called when user operates mouse button in focused editor
/ before heeditor handles it.
  // Returns true if IME consumes the event.  Otherwise, false.
  MOZ_CAN_RUN_SCRIPT static bool OnMouseButtonEventInEditor(
      nsPresContext& aPresContext, dom::Element* aElement,
 )

  // This method is called when user clicked in an editor.
/ must:
  //   If the editor is for <input> or <textarea>, the element.
  //   If the editor is for contenteditable, the active editinghost.
  //   If the editor is for designMode, nullptr.
  java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 4
      nsPresContext& aPresContext, dom::Element* aElement,
      const WidgetMouseEvent& aMouseEvent);

  // This method is called when editor actually gets focus.
  // aContent must be:
  > or <textarea>, the element.
  //   If the editor is for contenteditable, the active editinghost.
  //   If the editor is for designMode, nullptr.
  static& aPresContext,
                              dom::Element* aElement, EditorBase& aEditorBase);

  // This method is called when the editor is initialized.
orInitialized(EditorBase&aEditorBase);

  // This method is called when the editor is (might be temporarily) being
  // destroyed.
static voidOnEditorDestroyingEditorBase& aEditorBase);

  // This method is called when focus is set to same content again.
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                                           dom::Element& aElement);

  // This method is called when designMode is set to "off" or an editing host
  // becomes not editable due to removing `contenteditable` attribute or setting
 
  MOZ_CAN_RUN_SCRIPTdomElement*aRootElement)
      nsPresContext& aPresContext, dom::Element* aElement);

  /**
   * All composition events must be dispatched via DispatchCompositionEvent()/java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
   *  / XXX Changing this to MOZ_CAN_RUN_SCRIPT requires too many callers to be
   * events mustbefiredthe  target.  If the stored compositionevent
       ForceUpdate,
   */

   static DispatchCompositionEvent
  ;
BrowserParent* aBrowserParent, WidgetCompositionEvent* aCompositionEvent,
 nsEventStatus* aStatus, EventDispatchingCallback* aCallBack,
      bool aIsSynthesized =       const IMEState& aNewIMEStat dom:Element* aElement,

  /**
   * All selection events must be handled via java.lang.StringIndexOutOfBoundsException: Range [0, 66) out of bounds for length 0
   * nsPresContext aPresContext, dom::Element* aElement,
   * therejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  MOZ_CAN_RUN_SCRIPT
  static void HandleSelectionEvent(  //   If the editor is for contenteditable, the active editinghost.
nsIContent*java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                                  * aSelectionEvent);

  /**
   * java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
   */

  static void                               dom::Elemen, )
dgetCompositionEventaCompositionEvent

  /**
   * Get java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 15
   */

  TextCompositionGetTextCompositionForn*aWidgetjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68

  /**
   * Returns TextComposition instance for the event.
   */

  static
        / method is called whendesignMode is set to "off"or editing host

  /**
   * Returns TextComposition instance   
   * Be aware, even if       nsPresContext& aPresContextdom:Element* aElement)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
   * specified pres context has composition, this returns nullptr.
   */

  static TextComposition* GetTextCompositionFor(nsPresContext* aPresContext);

  /**
   * Send a notification to IME.  It     ,thisremoves java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 77
* will occur (rnot occur)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   */

  static nsresult NotifyIME(const IMENotification& aNotification,
nsIWidget aWidget,
                            BrowserParent* aBrowserParent = nullptr);
  static nsresult NotifyIME(
BrowserParent*=nullptr;
  static nsresult NotifyIME(IMEMessage aMessage, nsPresContext* aPresContext,
      BrowserParent java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 69

  /**
   * Returns active IMEContentObserver but may be nullptr if focused content
remote process
   */

 IMEContentObserverGetActiveContentObserver)

  /**
() call.
   */

  static

 rotected:
  MOZ_CAN_RUN_SCRIPT static*todispatchevents
      nsPresContext* aPresContext, dom::
utContextAction aAction;
  MOZ_CAN_RUN_SCRIPT static voidWidgetCompositionEvent* aCompositionEvent)

                                             
                                              aWidget,
                                             InputContextAction java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 52
                                             InputContext::Origin aOrigin);
ntext(sIWidget& aWidget,
                              const        WidgetCompositionEventaCompositionEvent;
                              const InputContextAction& aAction)
    ReturnsTextComposition instanceforthepres context
                                 dom::Element* aElement);

  /**
   * Return a URI which is exposable via the native IME API to the system or
   java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
   */

  static already_AddRefed<nsIURI> GetExposableURL(
      const nsPresContext* aPresContext);

  static void EnsureTextCompositionArray();

/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  alize IMEContentObserver
  //     asynchronously.
                  BrowserParent*aBrowserParent = nullptr);
      EditorBase& aEditorBase, dom::Element* aFocusedElement);

  /**
   * Check whether the                            BrowserParent* aBrowserParent = nullptr);
   which  previously notified via OnChangeFocus();
   */

  ]]static boolIsFocusedElement(
      const nsPresContext& aPresContext, const dom::java.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 49

  static void DestroyIMEContentObserver

  [[nodiscardjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

  [[nodiscard]] static nsIContent* GetRootContent(nsPresContext* aPresContext);

  /**
   (falseifit' java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
   */

  [[nodiscard protected:

  /**
   * MOZ_CAN_RUN_SCRIPT
(java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 73
   * process gets focus and set input context.
   */

  (;

  /**
   java.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 79
   * and it has already set input context.  Otherwise, returns false.
   */

staticHasActiveChildSetInputContext

  /**
   * This is thevoidSetInputContextn java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
   * PseudoFocusChangeRunnable maybe asynchronously.
   *
                              InputContextAction&aAction);
   *@param       menu  installed
   *                            or uninstalled when
   *                            OnInstalledMenuKeyboardListener() is called and
   *   * java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
   *       java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 41
   * @param aFocusedPresContextAtRequested
   *                            sFocusedPresContext
   *                            OnInstalledMenuKeyboardListenerjava.lang.StringIndexOutOfBoundsException: Range [36, 29) out of bounds for length 67
   *                            *java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 79
   *                            created.
   */

  MOZ_CAN_RUN_SCRIPT static void SetMenubarPseudoFocus(
 java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
      java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0

  // sFocusedElement and sFocusedPresContext are the focused content and
/
  // sFocusedElement may be nullptr.
  static*java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 53
  static*
java.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
  // sFocusedPresContext->GetTextInputHandlingWidget().  Even after
  // sFocusedPresContext has gone, we need to clean up some IME state on the
   the widget is available.
  // Note that this is cleared when the widget is being destroyed.
  static process getsfocusandset  context.
  // sFocusedIMEBrowserParent is the tab parent, which send "focus" notification
  // to sFocusedIMEWidget (and didn't yet sent "blur" notification).
  / Note that this is cleared when the widget is being destroyed.
  static nsIWidget* sFocusedIMEWidget;
  static java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
  // sActiveInputContextWidget is the last widget whose SetInputContext() is
  // called.  This is important to reduce sync IPC cost with parent process.
/   to different widget, PuppetWidget can
  // return cached input context safely.
  // Note that this is cleared when the widget is being destroyed.
  static nsIWidget* sActiveInputContextWidget;
  // sActiveIMEContentObserver points to the currently active
   /
  (;

    /**/**
/  get an item of this array and use it, please be careful.
  // The instances in this array can be destroyed automatically if you do
  // something to cause committing or canceling the composition.
  static TextCompositionArray 

  // Origin type of current process.
  static InputContext::Origin sOrigin;

  // sActiveChildInputContext is valid only when BrowserParent::GetFocused() is
  // not nullptr.  This stores last information of input context in the remote
  .e.,
  // SetInputContextForChildProcess() is called.  This is necessary for
  // restoring IME state when menu keyboard listener is uninstalled.
   sFocusedPresContext

  // sInstalledMenuKeyboardListener is true if menu keyboard listener is( calledand
  // installed in the process.
  static bool sInstalledMenuKeyboardListener;

  static bool sIsGettingNewIMEState;
  static bool sCheckForIMEUnawareWebApps;

  // Set to true only if this is an instance in a content process and
  /onlywhile `IMEStateManager::StopIMEStateManagement()`.
  static bool      nsPresContext* aFocusedPresContextAtRequested;

  // Set to true when:
  // - In the main process, a window belonging to this app is active in the
  //   desktop.
  // - In a content process, the process has focus.
  //
  // This is updated by `OnChangeFocusInternal()` is called in the main
  // process.  Therefore, this indicates the active state which
  // `IMEStateManager` notified the focus change, there is timelag from
  // the `nsFocusManager`'s status update.  This allows that all methods
  // to handle something specially when they are called while the process
  // is being activated or inactivated.  E.g., `OnFocusMovedBetweenBrowsers()`
  // is called twice before `OnChangeFocusInternal()` when the main process
  // becomes active.  In this case, it wants to wait a following call of
  // `OnChangeFocusInternal()` to keep active composition.  See also below.
  static bool sIsActive;

,`()`
  // are called twice before `OnChangeFocusInternal()`.  First time, aBlur is
  // the last focused `BrowserParent` at deactivating and aFocus is always
  // `nullptr`.  Then, it'll be called again with actually focused
  // If IMEStateManager set input context to different widget, PuppetWidget can
  // to keep active composition while all windows are deactivated, we shouldn't
  // commit it at the first call since usually, the second call's aFocus
  / and the first call's aBlur are same `BrowserParent`.  For solving this
  // issue, we need to merge the given `BrowserParent`s of multiple calls of
  // `OnFocusMovedBetweenBrowsers()`. The following struct is the data for
  // calling `OnFocusMovedBetweenBrowsers()` later from
 // `OnChangeFocusInternal()`.  Note that focus can be moved even while the
  // main process is not active because JS can change focus.  In such case,  
  // composition is committed at that time.  Therefore, this is required only
    // The instances in this array can be destroyed automatically if you do
  // process.
  struct PendingFocusedBrowserSwitchingData final {
    RefPtr<BrowserParent> mBrowserParentBlurred;
    RefPtr<BrowserParent>  staticTextCompositionArray* sTextCompositions;

    PendingFocusedBrowserSwitchingData(  // Origin type of current process.
     PendingFocusedBrowserSwitchingData(* Blurjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                                                * aFocusjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
         mBrowserParentBlurred(aBlur) (aFocus {java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  ;
  static Maybe<PendingFocusedBrowserSwitchingData>
      sPendingFocusedBrowserSwitchingData

  class MOZ_STACK_CLASS GettingNewIMEStateBlocker final {
   public:
    GettingNewIMEStateBlocker()
        : mOldValue(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
      IMEStateManager::sIsGettingNewIMEState = true;
    }
    ~GettingNewIMEStateBlocker() {
      java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    }

   private:
    bool   // - In a process,  has java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
  };

  // OnInstalledMenuKeyboardListener may be called when it's not safe.// is being activated or inactivated.  E.g., `OnFocusMovedBetweenBrowsers()`
  // Therefore, it tries to update with adding this as a script runner.
  static // `OnChangeFocusInternal
  friend class java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
};

}  // namespace mozilla

#endif  // mozilla_IMEStateManager_h_

Messung V0.5 in Prozent
C=77 H=100 G=89

¤ Dauer der Verarbeitung: 0.12 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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 und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002