Bug 1567105 - When cloning a document for printing, call SetCompatMode rather than silently copying over the compat mode. r=jwatt a=RyanVM
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 23 Jul 2019 19:22:33 +0000
changeset 544712 0142a67ef10d096e9f9a3d90e7204e8b1b5f6168
parent 544711 12fc62083dd63f4b78009206bc272367a6f8fcfa
child 544713 6fca9f4239e20df1458f23b8284e29f3d11c904f
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt, RyanVM
bugs1567105, 1535788
milestone69.0
Bug 1567105 - When cloning a document for printing, call SetCompatMode rather than silently copying over the compat mode. r=jwatt a=RyanVM So that the styleset and CSS loader react appropriately. Bug 1535788 causes the styleset to be created earlier, so it stopped grabbing the already-updated compat mode. I think the CSS loader stuff could already cause some issues before bug 1535788, for what is worth. Differential Revision: https://phabricator.services.mozilla.com/D39053
dom/base/Document.cpp
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -11115,17 +11115,17 @@ nsresult Document::CloneDocHelper(Docume
   // Make the clone a data document
   clone->SetLoadedAsData(true);
 
   // Misc state
 
   // State from Document
   clone->mCharacterSet = mCharacterSet;
   clone->mCharacterSetSource = mCharacterSetSource;
-  clone->mCompatMode = mCompatMode;
+  clone->SetCompatibilityMode(mCompatMode);
   clone->mBidiOptions = mBidiOptions;
   clone->mContentLanguage = mContentLanguage;
   clone->SetContentTypeInternal(GetContentTypeInternal());
   clone->mSecurityInfo = mSecurityInfo;
 
   // State from Document
   clone->mType = mType;
   clone->mXMLDeclarationBits = mXMLDeclarationBits;