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 510705 89828ae0afeac77e5e5e8aa220ec4ec1cf64a69a
parent 510704 8b5a89cb0e62b11f209f49dca37e2ec2973d6d3e
child 510706 434b6906676e7dbad6ea265af5528d5eea2f6f8f
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [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));