Commit 325902a5 authored by Sandor Molnar's avatar Sandor Molnar
Browse files

Backed out 5 changesets (bug 1733465) for causing android build bustages in...

Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE

Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
parent 941d8e79
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -932,7 +932,8 @@ void* DocAccessible::GetNativeWindow() const {
  nsViewManager* vm = mPresShell->GetViewManager();
  if (!vm) return nullptr;

  nsCOMPtr<nsIWidget> widget = vm->GetRootWidget();
  nsCOMPtr<nsIWidget> widget;
  vm->GetRootWidget(getter_AddRefs(widget));
  if (widget) return widget->GetNativeData(NS_NATIVE_WINDOW);

  return nullptr;
+2 −1
Original line number Diff line number Diff line
@@ -251,7 +251,8 @@ HWND MsaaAccessible::GetHWNDFor(Accessible* aAccessible) {
    nsIWidget* widget = frame->GetNearestWidget();
    if (widget && widget->IsVisible()) {
      if (nsViewManager* vm = document->PresShellPtr()->GetViewManager()) {
        nsCOMPtr<nsIWidget> rootWidget = vm->GetRootWidget();
        nsCOMPtr<nsIWidget> rootWidget;
        vm->GetRootWidget(getter_AddRefs(rootWidget));
        // Make sure the accessible belongs to popup. If not then use
        // document HWND (which might be different from root widget in the
        // case of window emulation).
+2 −1
Original line number Diff line number Diff line
@@ -1032,7 +1032,8 @@ nsresult nsContentSink::DidProcessATokenImpl() {
      (mDeflectedCount % StaticPrefs::content_sink_event_probe_rate()) == 0) {
    nsViewManager* vm = presShell->GetViewManager();
    NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
    nsCOMPtr<nsIWidget> widget = vm->GetRootWidget();
    nsCOMPtr<nsIWidget> widget;
    vm->GetRootWidget(getter_AddRefs(widget));
    mHasPendingEvent = widget && widget->HasPendingInputEvent();
  }

+6 −3
Original line number Diff line number Diff line
@@ -1370,7 +1370,8 @@ void nsFocusManager::EnsureCurrentWidgetFocused(CallerType aCallerType) {
  if (!vm) {
    return;
  }
  nsCOMPtr<nsIWidget> widget = vm->GetRootWidget();
  nsCOMPtr<nsIWidget> widget;
  vm->GetRootWidget(getter_AddRefs(widget));
  if (!widget) {
    return;
  }
@@ -2580,7 +2581,8 @@ void nsFocusManager::Focus(

  if (aAdjustWidget && !sTestMode) {
    if (nsViewManager* vm = presShell->GetViewManager()) {
      nsCOMPtr<nsIWidget> widget = vm->GetRootWidget();
      nsCOMPtr<nsIWidget> widget;
      vm->GetRootWidget(getter_AddRefs(widget));
      if (widget)
        widget->SetFocus(nsIWidget::Raise::No, aFlags & FLAG_NONSYSTEMCALLER
                                                   ? CallerType::NonSystem
@@ -2964,7 +2966,8 @@ void nsFocusManager::RaiseWindow(nsPIDOMWindowOuter* aWindow,
  }

  if (nsViewManager* vm = presShell->GetViewManager()) {
    nsCOMPtr<nsIWidget> widget = vm->GetRootWidget();
    nsCOMPtr<nsIWidget> widget;
    vm->GetRootWidget(getter_AddRefs(widget));
    if (widget) {
      widget->SetFocus(nsIWidget::Raise::Yes, aCallerType);
    }
+8 −25
Original line number Diff line number Diff line
@@ -767,12 +767,8 @@ void IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,

  nsCOMPtr<nsIWidget> widget(sWidget);

#ifdef DEBUG
  {
    nsCOMPtr<nsIWidget> tihWidget = sPresContext->GetTextInputHandlingWidget();
    MOZ_ASSERT(!tihWidget || tihWidget == widget);
  }
#endif  // DEBUG
  MOZ_ASSERT(!sPresContext->GetTextInputHandlingWidget() ||
             sPresContext->GetTextInputHandlingWidget() == widget);

  if (!aMouseEvent->IsTrusted()) {
    MOZ_LOG(sISMLog, LogLevel::Debug,
@@ -1005,12 +1001,8 @@ void IMEStateManager::UpdateIMEState(const IMEState& aNewIMEState,

  OwningNonNull<nsIWidget> widget(*sWidget);

#ifdef DEBUG
  {
    nsCOMPtr<nsIWidget> tihWidget = sPresContext->GetTextInputHandlingWidget();
    MOZ_ASSERT(!tihWidget || tihWidget == widget);
  }
#endif  // DEBUG
  MOZ_ASSERT(!sPresContext->GetTextInputHandlingWidget() ||
             sPresContext->GetTextInputHandlingWidget() == widget);

  // TODO: Investigate if we could put off to initialize IMEContentObserver
  //       later because a lot of callers need to be marked as
@@ -1223,12 +1215,8 @@ void IMEStateManager::SetInputContextForChildProcess(

  nsCOMPtr<nsIWidget> widget(sWidget);

#ifdef DEBUG
  {
    nsCOMPtr<nsIWidget> tihWidget = sPresContext->GetTextInputHandlingWidget();
    MOZ_ASSERT(!tihWidget || tihWidget == widget);
  }
#endif  // DEBUG
  MOZ_ASSERT(!sPresContext->GetTextInputHandlingWidget() ||
             sPresContext->GetTextInputHandlingWidget() == widget);
  MOZ_ASSERT(aInputContext.mOrigin == InputContext::ORIGIN_CONTENT);

  sActiveChildInputContext = aInputContext;
@@ -1895,7 +1883,7 @@ nsresult IMEStateManager::NotifyIME(IMEMessage aMessage,
    return NS_ERROR_INVALID_ARG;
  }

  nsCOMPtr<nsIWidget> widget = aPresContext->GetTextInputHandlingWidget();
  nsIWidget* widget = aPresContext->GetTextInputHandlingWidget();
  if (NS_WARN_IF(!widget)) {
    MOZ_LOG(sISMLog, LogLevel::Error,
            ("  NotifyIME(), FAILED due to no widget for the "
@@ -2027,12 +2015,7 @@ void IMEStateManager::CreateIMEContentObserver(EditorBase& aEditorBase) {
    return;
  }

#ifdef DEBUG
  {
    nsCOMPtr<nsIWidget> tihWidget = sPresContext->GetTextInputHandlingWidget();
    MOZ_ASSERT(tihWidget == widget);
  }
#endif  // DEBUG
  MOZ_ASSERT(sPresContext->GetTextInputHandlingWidget() == widget);

  MOZ_LOG(sISMLog, LogLevel::Debug,
          ("  CreateIMEContentObserver() is creating an "
Loading