From 8ff380920ce7ce14fa55bc587158a7752e7b62e1 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 -- .../templates/firefox/home/index-quantum.html | 14 ++- .../mozorg/contribute/contribute-embed.html | 4 +- .../mozorg/home/includes/fundraiser.html | 2 +- docs/browser-support.rst | 14 ++- docs/stub-attribution.rst | 2 +- gulpfile.js | 8 +- media/css/firefox/home/ie9.scss | 7 ++ media/css/firefox/home/includes/_header.scss | 104 ++++++++++++++++++ media/css/firefox/home/quantum.scss | 99 +---------------- media/js/firefox/new/scene2.js | 18 ++- .../base-page-init-ie.js} | 4 +- .../mozilla-utils-ie.js} | 19 ++-- 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 +- tests/unit/spec/ie/mozilla-utils-ie.js | 42 +++++++ tests/unit/spec/ie8/mozilla-utils-ie8.js | 66 ----------- 28 files changed, 251 insertions(+), 387 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} (67%) delete mode 100644 media/js/libs/matchMedia.addListener.js delete mode 100644 media/js/libs/matchMedia.js create mode 100644 tests/unit/spec/ie/mozilla-utils-ie.js delete mode 100644 tests/unit/spec/ie8/mozilla-utils-ie8.js 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 b636ede6ebe..1bb05d76416 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/menu-mozilla/index.html' %} - {% endblock %} - -
- {% block content %}{% endblock %} - - {% block site_footer %} - {% include 'includes/site-footer.html' %} + {% block site_header %} + {% include 'includes/protocol/navigation/menu-mozilla/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 %} {% if self.structured_data()|trim|length %} 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 95ada5a9515..68f1de0ff98 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 %} {% if self.structured_data()|trim|length %} diff --git a/bedrock/firefox/templates/firefox/election/index.html b/bedrock/firefox/templates/firefox/election/index.html index 76908c93c3e..fb548891dc0 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/menu-mozilla/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 d5dda065a5f..3cf336ae7a2 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 a7d929f5df3..fcec3584751 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 3cbceb022d4..06f6597bddc 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-quantum.html b/bedrock/firefox/templates/firefox/home/index-quantum.html index 283a3338142..f52d2aba8cc 100644 --- a/bedrock/firefox/templates/firefox/home/index-quantum.html +++ b/bedrock/firefox/templates/firefox/home/index-quantum.html @@ -21,6 +21,12 @@ {{ css_bundle('firefox-quantum') }} {% endblock %} +{% block extrahead %} + + {{ css_bundle('firefox-home-ie9') }} + +{% endblock %} + {% block body_id %}firefox-home{% endblock %} {% block content %} @@ -84,7 +90,7 @@

{{ _('Faster Page Loading') }}

-
+
{{ lazy_img(image_url='firefox/home/quantum/private-browsing.png', placeholder_url='firefox/home/quantum/spacer.gif', include_highres_image=True, optional_attributes={'alt': '', 'width': '502', 'height': '325'}) }} {{ lazy_img(image_url='firefox/home/quantum/tracking-protection.png', placeholder_url='firefox/home/quantum/spacer.gif', include_highres_image=True, optional_attributes={'alt': '', 'width': '503', 'height': '305'}) }}
@@ -111,7 +117,7 @@

{{ _('Sync you {% endif %}

-
+
{{ lazy_img(image_url='firefox/home/quantum/sync.png', placeholder_url='firefox/home/quantum/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'}) }}
@@ -203,7 +209,7 @@

{{ _('30% lighter than Chrome') }}

{% endtrans %}

-
+
{{ lazy_img(image_url='firefox/home/quantum/less-memory.png', placeholder_url='firefox/home/quantum/spacer.gif', include_highres_image=True, optional_attributes={'alt': '', 'width': '645', 'height': '400'}) }}
@@ -225,7 +231,7 @@

{{ _('Moving bro {{ _('Learn more') }} -
+
{{ lazy_img(image_url='firefox/home/quantum/switch-to-firefox.png', placeholder_url='firefox/home/quantum/spacer.gif', include_highres_image=True, optional_attributes={'width': '643', 'height': '377'}) }} diff --git a/bedrock/mozorg/templates/mozorg/contribute/contribute-embed.html b/bedrock/mozorg/templates/mozorg/contribute/contribute-embed.html index 253d76af45e..58eedb15fb6 100644 --- a/bedrock/mozorg/templates/mozorg/contribute/contribute-embed.html +++ b/bedrock/mozorg/templates/mozorg/contribute/contribute-embed.html @@ -12,8 +12,8 @@ Mozilla — {{_('Get Involved: Volunteer Opportunities at Mozilla')}} — mozilla.org - {{ css_bundle('responsive') }} diff --git a/bedrock/mozorg/templates/mozorg/home/includes/fundraiser.html b/bedrock/mozorg/templates/mozorg/home/includes/fundraiser.html index da51d6b62d6..464a382c86e 100644 --- a/bedrock/mozorg/templates/mozorg/home/includes/fundraiser.html +++ b/bedrock/mozorg/templates/mozorg/home/includes/fundraiser.html @@ -2,7 +2,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -#} -