Bug 1346893 - Move the Geckoview UA sheet to layout/style. r=snorp

Make it a regular stylesheet.

This allows it to be cached in shared memory if possible, and will allow me to
stop adding the stylesheet based on a pref for bug 1618202.

Differential Revision: https://phabricator.services.mozilla.com/D64377

--HG--
rename : mobile/android/themes/geckoview/content.css => layout/style/res/geckoview.css
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2020-02-26 15:46:58 +00:00
Родитель 9f4ca6a71f
Коммит 42b235642d
8 изменённых файлов: 19 добавлений и 6 удалений

Просмотреть файл

@ -2857,6 +2857,10 @@ void Document::FillStyleSetUserAndUASheets() {
mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent,
cache->PluginProblemSheet());
if (StyleSheet* sheet = cache->GetGeckoViewSheet()) {
mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, sheet);
}
for (StyleSheet* sheet : *sheetService->AgentStyleSheets()) {
mStyleSet->AppendStyleSheet(StyleOrigin::UserAgent, sheet);
}

Просмотреть файл

@ -46,6 +46,14 @@ class GlobalStyleSheetCache final : public nsIObserver,
#include "mozilla/UserAgentStyleSheetList.h"
#undef STYLE_SHEET
StyleSheet* GetGeckoViewSheet() {
#ifdef ANDROID
return GeckoViewSheet();
#else
return nullptr;
#endif
}
StyleSheet* GetUserContentSheet();
StyleSheet* GetUserChromeSheet();
StyleSheet* ChromePreferenceSheet();

Просмотреть файл

@ -23,6 +23,9 @@
STYLE_SHEET(ContentEditable, "resource://gre/res/contenteditable.css", true)
STYLE_SHEET(CounterStyles, "resource://gre-resources/counterstyles.css", true)
STYLE_SHEET(DesignMode, "resource://gre/res/designmode.css", true)
#ifdef ANDROID
STYLE_SHEET(GeckoView, "resource://gre-resources/geckoview.css", true)
#endif
STYLE_SHEET(Forms, "resource://gre-resources/forms.css", true)
STYLE_SHEET(HTML, "resource://gre-resources/html.css", true)
STYLE_SHEET(MathML, "resource://gre-resources/mathml.css", true)

Просмотреть файл

@ -11,6 +11,7 @@ toolkit.jar:
res/noframes.css (res/noframes.css)
* res/forms.css (res/forms.css)
res/pluginproblem.css (res/pluginproblem.css)
res/geckoview.css (res/geckoview.css)
res/arrow.gif (res/arrow.gif)
res/arrow-left.gif (res/arrow-left.gif)
res/arrow-right.gif (res/arrow-right.gif)

Просмотреть файл

@ -64,8 +64,7 @@ xul|scrollbarbutton {
visibility: hidden;
}
xul|scrollbarbutton[sbattr="scrollbar-up-top"],
xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] {
xul|scrollbarbutton[sbattr="scrollbar-up-top"] {
display: none;
}

Просмотреть файл

@ -1,6 +1,3 @@
# Stylesheets
category agent-style-sheets browser-content-stylesheet chrome://geckoview/skin/content.css
# GeckoViewStartup.js
component {8e993c34-fdd6-432c-967e-f995d888777f} GeckoViewStartup.js
contract @mozilla.org/geckoview/startup;1 {8e993c34-fdd6-432c-967e-f995d888777f}

Просмотреть файл

@ -7,7 +7,6 @@ geckoview.jar:
% skin geckoview classic/1.0 %skin/
skin/config.css (config.css)
skin/content.css (content.css)
skin/defines.css (defines.css)
skin/images/accessiblecaret-normal-hdpi.png (images/accessiblecaret-normal-hdpi.png)
skin/images/accessiblecaret-normal-xhdpi.png (images/accessiblecaret-normal-xhdpi.png)

Просмотреть файл

@ -294,6 +294,8 @@ STATIC_ATOMS = [
Atom("dateTime", "date-time"),
Atom("date", "date"),
Atom("datetime", "datetime"),
Atom("datetimeInputBoxWrapper", "datetime-input-box-wrapper"),
Atom("datetimeResetButton", "datetime-reset-button"),
Atom("dd", "dd"),
Atom("decimal", "decimal"),
Atom("decimalFormat", "decimal-format"),