Bug 1505887 - Make UAWidgets chromeonly content. r=bz
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 26 Nov 2018 21:09:51 +0100
changeset 507505 8221df0f4e50bbdebe7cd65c1b3adf799a1aa6a6
parent 507504 dc298299ebadd4b20eb58ea1ee6404b416eed422
child 507506 ad4ea72ce4d4f7c9150575f6173fa0fbb05e967c
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1505887
milestone65.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 1505887 - Make UAWidgets chromeonly content. r=bz Differential Revision: https://phabricator.services.mozilla.com/D11408
dom/base/ShadowRoot.h
--- a/dom/base/ShadowRoot.h
+++ b/dom/base/ShadowRoot.h
@@ -206,16 +206,18 @@ public:
 
   bool IsUAWidget() const
   {
     return mIsUAWidget;
   }
 
   void SetIsUAWidget()
   {
+    MOZ_ASSERT(!HasChildren());
+    SetFlags(NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS | NODE_CHROME_ONLY_ACCESS);
     mIsUAWidget = true;
   }
 
   void GetEventTargetParent(EventChainPreVisitor& aVisitor) override;
 
   // nsIRadioGroupContainer
   NS_IMETHOD WalkRadioGroup(const nsAString& aName,
                             nsIRadioVisitor* aVisitor,