From 2da62564a855f6d0a3f9289251d48e832b5c15b7 Mon Sep 17 00:00:00 2001
From: Alex Gibson
Date: Mon, 19 Aug 2019 10:33:20 +0100
Subject: [PATCH] Drop 1st class support for IE9 (Fixes #7559)
---
bedrock/base/templates/base-article.html | 2 +-
bedrock/base/templates/base-pebbles.html | 46 ++++----
bedrock/base/templates/base-protocol.html | 6 +-
bedrock/base/templates/base-resp.html | 28 +++--
.../templates/firefox/election/index.html | 11 --
.../templates/firefox/fights-for-you.de.html | 12 --
.../templates/firefox/fights-for-you.fr.html | 12 --
.../templates/firefox/fights-for-you.html | 12 --
.../firefox/templates/firefox/home/index.html | 14 ++-
.../mozorg/contribute/contribute-embed.html | 4 +-
docs/stub-attribution.rst | 2 +-
media/css/firefox/home/home.scss | 99 +----------------
media/css/firefox/home/ie9.scss | 7 ++
media/css/firefox/home/includes/_header.scss | 104 ++++++++++++++++++
media/js/firefox/new/scene2.js | 18 ++-
.../base-page-init-ie.js} | 4 +-
.../mozilla-utils-ie.js} | 16 +--
media/js/libs/matchMedia.addListener.js | 47 --------
media/js/libs/matchMedia.js | 34 ------
media/static-bundles.json | 19 ++--
.../firefox/features/test_landing.py | 1 -
tests/functional/firefox/test_developer.py | 1 -
tests/unit/karma.conf.js | 4 +-
.../mozilla-utils-ie.js} | 22 ++--
24 files changed, 203 insertions(+), 322 deletions(-)
create mode 100644 media/css/firefox/home/ie9.scss
create mode 100644 media/css/firefox/home/includes/_header.scss
rename media/js/{ie8/base-page-init-ie8.js => ie/base-page-init-ie.js} (85%)
rename media/js/{ie8/mozilla-utils-ie8.js => ie/mozilla-utils-ie.js} (81%)
delete mode 100644 media/js/libs/matchMedia.addListener.js
delete mode 100644 media/js/libs/matchMedia.js
rename tests/unit/spec/{ie8/mozilla-utils-ie8.js => ie/mozilla-utils-ie.js} (70%)
diff --git a/bedrock/base/templates/base-article.html b/bedrock/base/templates/base-article.html
index f0d838b9672..5b86ef21a5a 100644
--- a/bedrock/base/templates/base-article.html
+++ b/bedrock/base/templates/base-article.html
@@ -40,7 +40,7 @@
{% block site_js %}
{{ super() }}
-
+
{{ js_bundle('basic-article') }}
{% endblock %}
diff --git a/bedrock/base/templates/base-pebbles.html b/bedrock/base/templates/base-pebbles.html
index 9f1e5970fb0..36f93c0d6c1 100644
--- a/bedrock/base/templates/base-pebbles.html
+++ b/bedrock/base/templates/base-pebbles.html
@@ -9,7 +9,7 @@
{{ js_bundle('site') }}
-
+
{% block experiments %}{% endblock %}
@@ -50,28 +50,30 @@
{{ l10n_css() }}
-
- {# Basic styles, only for IE8 and lower #}
+
-
- {# Global styles, hidden from IE8 and lower #}
+
+ {# Global styles, hidden from IE9 and lower #}
{% block site_css %}
{{ css_bundle('pebbles') }}
{% endblock %}
- {# Page-specific styles, hidden from IE8 and lower #}
+ {# Page-specific styles, hidden from IE9 and lower #}
{% block page_css %}{% endblock %}
{% block extrahead %}
- {# Extra header stuff (scripts, styles, metadata, etc) seen by all browsers. Use the 'page_css' block for CSS you want to hide from IE7 and lower. #}
+ {# Extra header stuff (scripts, styles, metadata, etc) seen by all browsers. Use the 'page_css' block for CSS you want to hide from IE9 and lower. #}
{% endblock %}
{% block js_pretrack %}{# include JavaScript that must be run pre GA tracking here #}{% endblock %}
@@ -91,29 +93,25 @@
data-global-fx-out-of-date-banner-confirm="{{ _('Update Firefox') }}"
{% block string_data %}{% endblock %}>
- {% block site_header %}
- {% include 'includes/protocol/navigation/index.html' %}
- {% endblock %}
-
-
- {% block content %}{% endblock %}
-
- {% block site_footer %}
- {% include 'includes/site-footer.html' %}
+ {% block site_header %}
+ {% include 'includes/protocol/navigation/index.html' %}
{% endblock %}
-
-
+
+ {% block content %}{% endblock %}
+
+ {% block site_footer %}
+ {% include 'includes/site-footer.html' %}
+ {% endblock %}
+
{% block site_js %}
-
+
{{ js_bundle('common') }}
-
{% endblock %}
@@ -124,7 +122,7 @@
{% endif %}
{% endblock %}
-
+
{% block js %}{% endblock %}
{# Bug 1381776 #}
diff --git a/bedrock/base/templates/base-protocol.html b/bedrock/base/templates/base-protocol.html
index 432c88f51bb..20c73f8fe11 100644
--- a/bedrock/base/templates/base-protocol.html
+++ b/bedrock/base/templates/base-protocol.html
@@ -13,12 +13,12 @@
{% endblock %}
{% block site_js %}
-
+
{{ js_bundle('common-protocol') }}
-
{% endblock %}
diff --git a/bedrock/base/templates/base-resp.html b/bedrock/base/templates/base-resp.html
index 0ae0344a6e5..3804714fd3e 100644
--- a/bedrock/base/templates/base-resp.html
+++ b/bedrock/base/templates/base-resp.html
@@ -9,7 +9,7 @@
{{ js_bundle('site') }}
-
+
{% block experiments %}{% endblock %}
@@ -50,26 +50,28 @@
{{ l10n_css() }}
-
- {# Basic styles, only for IE8 and lower #}
+
-
- {# Global styles, hidden from IE8 and lower #}
+
+ {# Global styles, hidden from IE9 and lower #}
{% block site_css %}
{{ css_bundle('responsive') }}
{% endblock %}
- {# Page-specific styles, hidden from IE8 and lower #}
+ {# Page-specific styles, hidden from IE9 and lower #}
{% block page_css %}{% endblock %}
{% block extrahead %}
- {# Extra header stuff (scripts, styles, metadata, etc) seen by all browsers. Use the 'page_css' block for CSS you want to hide from IE8 and lower. #}
+ {# Extra header stuff (scripts, styles, metadata, etc) seen by all browsers. Use the 'page_css' block for CSS you want to hide from IE9 and lower. #}
{% endblock %}
{% block js_pretrack %}{# include JavaScript that must be run pre GA tracking here #}{% endblock %}
@@ -127,17 +129,13 @@
-
-
{% block site_js %}
-
+
{{ js_bundle('common') }}
-
{% endblock %}
@@ -148,7 +146,7 @@
{% endif %}
{% endblock %}
-
+
{% block js %}{% endblock %}
{# Bug 1381776 #}
diff --git a/bedrock/firefox/templates/firefox/election/index.html b/bedrock/firefox/templates/firefox/election/index.html
index 93dbea710d3..02c0364ae36 100644
--- a/bedrock/firefox/templates/firefox/election/index.html
+++ b/bedrock/firefox/templates/firefox/election/index.html
@@ -18,17 +18,6 @@
{% block body_class %}election{% endblock %}
-{% block extrahead %}
-
-{% endblock %}
-
{% block site_header %}
{% include 'includes/protocol/navigation/index.html' %}
{% endblock %}
diff --git a/bedrock/firefox/templates/firefox/fights-for-you.de.html b/bedrock/firefox/templates/firefox/fights-for-you.de.html
index b69ea20e5a8..97406dfaae3 100644
--- a/bedrock/firefox/templates/firefox/fights-for-you.de.html
+++ b/bedrock/firefox/templates/firefox/fights-for-you.de.html
@@ -16,18 +16,6 @@
{{ css_bundle('fights-for-you') }}
{% endblock %}
-{% block extrahead %}
-
-{% endblock %}
-
{% block body_id %}fights-for-you{% endblock %}
{% block content %}
diff --git a/bedrock/firefox/templates/firefox/fights-for-you.fr.html b/bedrock/firefox/templates/firefox/fights-for-you.fr.html
index 132e5e0c284..439f25fe91f 100644
--- a/bedrock/firefox/templates/firefox/fights-for-you.fr.html
+++ b/bedrock/firefox/templates/firefox/fights-for-you.fr.html
@@ -16,18 +16,6 @@
{{ css_bundle('fights-for-you') }}
{% endblock %}
-{% block extrahead %}
-
-{% endblock %}
-
{% block body_id %}fights-for-you{% endblock %}
{% block content %}
diff --git a/bedrock/firefox/templates/firefox/fights-for-you.html b/bedrock/firefox/templates/firefox/fights-for-you.html
index cf7538007f9..c8450f38d9e 100644
--- a/bedrock/firefox/templates/firefox/fights-for-you.html
+++ b/bedrock/firefox/templates/firefox/fights-for-you.html
@@ -17,18 +17,6 @@
{{ css_bundle('fights-for-you') }}
{% endblock %}
-{% block extrahead %}
-
-{% endblock %}
-
{% block body_id %}fights-for-you{% endblock %}
{% block content %}
diff --git a/bedrock/firefox/templates/firefox/home/index.html b/bedrock/firefox/templates/firefox/home/index.html
index a50c9455a48..12d3d07d559 100644
--- a/bedrock/firefox/templates/firefox/home/index.html
+++ b/bedrock/firefox/templates/firefox/home/index.html
@@ -21,6 +21,12 @@
{{ css_bundle('firefox-home') }}
{% endblock %}
+{% block extrahead %}
+
+ {{ css_bundle('firefox-home-ie9') }}
+
+{% endblock %}
+
{% block body_id %}firefox-home{% endblock %}
{% block body_attrs %}{% if variation %}data-variant="{{ variation }}"{% endif %}{% endblock %}
@@ -85,7 +91,7 @@ {{ _('Faster Page Loading') }}
-
-
+
{{ lazy_img(image_url='firefox/home/sync.png', placeholder_url='firefox/home/spacer.gif', include_highres_image=True, optional_attributes={'alt': _('Image of Gif shared from desktop to mobile using the Send Tab feature.'), 'width': '788', 'height': '571'}) }}
@@ -204,7 +210,7 @@ {{ _('30% lighter than Chrome') }}
{% endtrans %}
-
@@ -226,7 +232,7 @@ {{ _('Moving bro
{{ _('Learn more') }}
-