Bug 1532334 - Make nsContentUtils::IsSubDocumentTabbable() return true for out-of-process iframes. r=nika
authorHenri Sivonen <hsivonen@hsivonen.fi>
Tue, 05 Mar 2019 19:33:18 +0000
changeset 520368 273f979acb0629be9ad8783b488921ba9e92554d
parent 520367 627cd6785c62546797d2859a6ff3ea2a50c61df0
child 520369 e5162aed5ec0228cf24af6c22fa03c5e1963aea9
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1532334
milestone67.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
Bug 1532334 - Make nsContentUtils::IsSubDocumentTabbable() return true for out-of-process iframes. r=nika Depends on D21927 Differential Revision: https://phabricator.services.mozilla.com/D21957
dom/base/nsContentUtils.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -65,16 +65,17 @@
 #include "mozilla/dom/HTMLTemplateElement.h"
 #include "mozilla/dom/HTMLTextAreaElement.h"
 #include "mozilla/dom/IDTracker.h"
 #include "mozilla/dom/MouseEventBinding.h"
 #include "mozilla/dom/KeyboardEventBinding.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "mozilla/dom/Promise.h"
+#include "mozilla/dom/RemoteFrameChild.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/Text.h"
 #include "mozilla/dom/TouchEvent.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/dom/XULCommandEvent.h"
 #include "mozilla/dom/WorkerCommon.h"
 #include "mozilla/EventDispatcher.h"
@@ -6183,17 +6184,18 @@ bool nsContentUtils::IsFocusedContent(co
 bool nsContentUtils::IsSubDocumentTabbable(nsIContent* aContent) {
   Document* doc = aContent->GetComposedDoc();
   if (!doc) {
     return false;
   }
 
   // If the subdocument lives in another process, the frame is
   // tabbable.
-  if (EventStateManager::IsRemoteTarget(aContent)) {
+  if (EventStateManager::IsRemoteTarget(aContent) ||
+      RemoteFrameChild::GetFrom(aContent)) {
     return true;
   }
 
   // XXXbz should this use OwnerDoc() for GetSubDocumentFor?
   // sXBL/XBL2 issue!
   Document* subDoc = doc->GetSubDocumentFor(aContent);
   if (!subDoc) {
     return false;