Bug 1519296 - Part 3: Make PresShell::AddOverrideStyleSheet append its sheet rather than prepend r=emilio
authorCameron McCormack <cam@mcc.id.au>
Sat, 12 Jan 2019 06:45:52 +0000
changeset 453602 89828ae0afea
parent 453601 8b5a89cb0e62
child 453603 434b6906676e
push id35360
push usernbeleuzu@mozilla.com
push dateSat, 12 Jan 2019 09:39:47 +0000
treeherdermozilla-central@cb35977ae7a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1519296
milestone66.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 1519296 - Part 3: Make PresShell::AddOverrideStyleSheet append its sheet rather than prepend r=emilio We only ever add a single sheet (EditorOverride.css) there anyway. Depends on D16282 Differential Revision: https://phabricator.services.mozilla.com/D16283
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -8254,17 +8254,17 @@ nsresult PresShell::GetAgentStyleSheets(
 }
 
 nsresult PresShell::SetAgentStyleSheets(
     const nsTArray<RefPtr<StyleSheet>>& aSheets) {
   return mStyleSet->ReplaceSheets(SheetType::Agent, aSheets);
 }
 
 nsresult PresShell::AddOverrideStyleSheet(StyleSheet* aSheet) {
-  return mStyleSet->PrependStyleSheet(SheetType::Override, aSheet);
+  return mStyleSet->AppendStyleSheet(SheetType::Override, aSheet);
 }
 
 nsresult PresShell::RemoveOverrideStyleSheet(StyleSheet* aSheet) {
   return mStyleSet->RemoveStyleSheet(SheetType::Override, aSheet);
 }
 
 static void FreezeElement(nsISupports* aSupports, void* /* unused */) {
   nsCOMPtr<nsIObjectLoadingContent> olc(do_QueryInterface(aSupports));