Bug 1369755 part A - Add context about browser performance to the in-content UI.Remove the tap-to-activate UI on desktop, because we don't specifically say "click" on desktop anyway, and we don't want/need to customize it from PluginContent.jsm. ui-review=sbarrett r=felipe
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 08 Jun 2017 11:43:05 -0400
changeset 413734 6c35cc91b1bb156e43c59ed028b5edef290763da
parent 413733 95ca02ed62c40dc248bebda7c637211d757e3b63
child 413735 4b6b2e9e5492d8e2606f4daa145f1f16ef6bbfb4
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1369755
milestone55.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 1369755 part A - Add context about browser performance to the in-content UI.Remove the tap-to-activate UI on desktop, because we don't specifically say "click" on desktop anyway, and we don't want/need to customize it from PluginContent.jsm. ui-review=sbarrett r=felipe MozReview-Commit-ID: D7rIGkldH5z
toolkit/locales/en-US/chrome/pluginproblem/pluginproblem.dtd
toolkit/pluginproblem/content/pluginProblem.xml
toolkit/pluginproblem/content/pluginProblemContent.css
toolkit/themes/shared/plugins/pluginProblem.css
--- a/toolkit/locales/en-US/chrome/pluginproblem/pluginproblem.dtd
+++ b/toolkit/locales/en-US/chrome/pluginproblem/pluginproblem.dtd
@@ -1,13 +1,14 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
 <!-- LOCALIZATION NOTE (tapToPlayPlugin): Mobile (used for touch interfaces) only has one type of plugin possible. -->
+<!ENTITY pluginActivationWarning                             "This site uses a plugin that may slow &brandShortName;.">
 <!ENTITY tapToPlayPlugin                                     "Tap here to activate plugin.">
 <!ENTITY clickToActivatePlugin                               "Activate plugin.">
 <!ENTITY checkForUpdates                                     "Check for updates…">
 <!ENTITY blockedPlugin.label                                 "This plugin has been blocked for your protection.">
 <!ENTITY hidePluginBtn.label                                 "Hide plugin">
 <!ENTITY managePlugins                                       "Manage plugins…">
 
 <!-- LOCALIZATION NOTE (reloadPlugin.pre): include a trailing space as needed -->
--- a/toolkit/pluginproblem/content/pluginProblem.xml
+++ b/toolkit/pluginproblem/content/pluginProblem.xml
@@ -22,16 +22,17 @@
     </resources>
 
     <content>
         <html:div class="mainBox" anonid="main" chromedir="&locale.dir;">
             <html:div class="hoverBox">
                 <html:label>
                     <html:button class="icon" anonid="icon"/>
                     <html:div class="msg msgVulnerabilityStatus" anonid="vulnerabilityStatus"><!-- set at runtime --></html:div>
+                    <html:div class="msg msgActivationWarning">&pluginActivationWarning;</html:div>
                     <html:div class="msg msgTapToPlay">&tapToPlayPlugin;</html:div>
                     <html:div class="msg msgClickToPlay" anonid="clickToPlay">&clickToActivatePlugin;</html:div>
                 </html:label>
 
                 <html:div class="msg msgBlocked">&blockedPlugin.label;</html:div>
                 <html:div class="msg msgCrashed">
                     <html:div class="msgCrashedText" anonid="crashedText"><!-- set at runtime --></html:div>
                     <!-- link href set at runtime -->
--- a/toolkit/pluginproblem/content/pluginProblemContent.css
+++ b/toolkit/pluginproblem/content/pluginProblemContent.css
@@ -81,24 +81,23 @@ a .hoverBox,
   cursor: inherit;
 }
 
 .msg {
   display: none;
 }
 
 a .msgClickToPlay,
-a .msgTapToPlay,
 :-moz-handler-clicktoplay .msgClickToPlay,
+:-moz-handler-clicktoplay .msgActivationWarning,
 :-moz-handler-vulnerable-updatable .msgVulnerabilityStatus,
 :-moz-handler-vulnerable-updatable .msgCheckForUpdates,
 :-moz-handler-vulnerable-updatable .msgClickToPlay,
 :-moz-handler-vulnerable-no-update .msgVulnerabilityStatus,
 :-moz-handler-vulnerable-no-update .msgClickToPlay,
-:-moz-handler-clicktoplay .msgTapToPlay,
 :-moz-handler-blocked .msgBlocked,
 :-moz-handler-crashed .msgCrashed {
   display: block;
 }
 
 .submitStatus[status] {
   display: -moz-box;
   -moz-box-align: center;
--- a/toolkit/themes/shared/plugins/pluginProblem.css
+++ b/toolkit/themes/shared/plugins/pluginProblem.css
@@ -27,21 +27,18 @@
   height: 100%;
 }
 :-moz-handler-vulnerable-updatable .hoverBox:active,
 :-moz-handler-vulnerable-no-update .hoverBox:active,
 :-moz-handler-clicktoplay .hoverBox:active {
   background-color: rgb(65, 65, 65);
 }
 
-:-moz-handler-clicktoplay .hoverBox:active .msgTapToPlay,
 :-moz-handler-clicktoplay .hoverBox:active .msgClickToPlay,
-:-moz-handler-vulnerable-updatable .hoverBox:active .msgTapToPlay,
 :-moz-handler-vulnerable-updatable .hoverBox:active .msgClickToPlay,
-:-moz-handler-vulnerable-no-update .hoverBox:active .msgTapToPlay,
 :-moz-handler-vulnerable-no-update .hoverBox:active .msgClickToPlay {
   color: red;
 }
 
 :-moz-handler-vulnerable-updatable .hoverBox,
 :-moz-handler-vulnerable-no-update .hoverBox,
 :-moz-handler-blocked .hoverBox,
 :-moz-handler-crashed .hoverBox {
@@ -88,33 +85,24 @@ a .icon,
 
 @media (min-resolution: 1.1dppx) {
   .throbber {
     background-image: url(chrome://global/skin/icons/loading@2x.png);
     background-size: 16px;
   }
 }
 
-.msgTapToPlay,
 .msgClickToPlay {
   text-decoration: underline;
 }
 
-@media not all and (-moz-touch-enabled) {
-  :-moz-handler-clicktoplay .msgTapToPlay,
-  a .msgTapToPlay  {
-    display: none;
-  }
-}
-
-@media (-moz-touch-enabled) {
-    :-moz-handler-clicktoplay .msgClickToPlay,
-    a .msgClickToPlay {
-    display: none;
-  }
+/* on desktop, don't ever show the tap-to-play UI: that is for mobile only */
+:-moz-handler-clicktoplay .msgTapToPlay,
+a .msgTapToPlay  {
+  display: none;
 }
 
 .submitStatus div {
   min-height: 19px; /* height of biggest line (with throbber) */
 }
 
 .submitComment {
   width: 340px;