Bug 1027579 - Do not load fonts from the cache if LOAD_BYPASS_CACHE is set. r=jfkthame r=bz
authorDragana Damjanovic <dd.mozilla@gmail.com>
Wed, 16 Sep 2015 04:46:00 +0200
changeset 295615 3560ae11e7eb40732be6f2b5e9c0b1eb69c84849
parent 295614 6165f6eba17f51cec7e79d83d9bc92ddf9c7162a
child 295616 372b1c30dc09b14aeb78d1dd61fbcdb48811c767
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, bz
bugs1027579
milestone43.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 1027579 - Do not load fonts from the cache if LOAD_BYPASS_CACHE is set. r=jfkthame r=bz
layout/style/FontFaceSet.cpp
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -1333,16 +1333,22 @@ FontFaceSet::CheckFontLoad(const gfxFont
   nsCOMPtr<nsIDocShell> docShell = mDocument->GetDocShell();
   if (docShell) {
     uint32_t loadType;
     if (NS_SUCCEEDED(docShell->GetLoadType(&loadType))) {
       if ((loadType >> 16) & nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE) {
         *aBypassCache = true;
       }
     }
+    uint32_t flags;
+    if (NS_SUCCEEDED(docShell->GetDefaultLoadFlags(&flags))) {
+      if (flags & nsIRequest::LOAD_BYPASS_CACHE) {
+        *aBypassCache = true;
+      }
+    }
   }
 
   return rv;
 }
 
 nsresult
 FontFaceSet::SyncLoadFontData(gfxUserFontEntry* aFontToLoad,
                               const gfxFontFaceSrc* aFontFaceSrc,