Bug 1511673 - Disable highlighting debugger lines when in replay mode. r=bhackett
authorJason Laster <jlaster@mozilla.com>
Sat, 01 Dec 2018 23:35:52 -0500
changeset 508417 e8396abdafe1786bc1434daeaca60cb3090e6d2f
parent 508416 0c29c0c61a3aed41c295446b2b3dc693bad33155
child 508418 037421492f0b064a57b8132deb6bdd0bb6d922d5
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1511673
milestone65.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 1511673 - Disable highlighting debugger lines when in replay mode. r=bhackett Tags: Bug #: 1511673 Differential Revision: https://phabricator.services.mozilla.com/D13637
devtools/client/debugger/new/dist/debugger.css
devtools/client/debugger/new/src/components/App.js
--- a/devtools/client/debugger/new/dist/debugger.css
+++ b/devtools/client/debugger/new/dist/debugger.css
@@ -2998,17 +2998,17 @@ debug-expression-error {
 }
 
 /* Don't display the highlight color since the debug line
   is already highlighted */
 .new-debug-line-error .CodeMirror-activeline-background {
   display: none;
 }
 
-.highlight-line .CodeMirror-line {
+.debugger:not(.can-rewind) .highlight-line .CodeMirror-line {
   animation: fade-highlight-out 1.5s normal forwards;
 }
 
 @keyframes fade-highlight-out {
   0% {
     background-color: var(--theme-highlight-gray);
   }
   100% {
--- a/devtools/client/debugger/new/src/components/App.js
+++ b/devtools/client/debugger/new/src/components/App.js
@@ -1,28 +1,30 @@
 /* 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/>. */
 
 // @flow
 import React, { Component } from "react";
 import { connect } from "react-redux";
 import PropTypes from "prop-types";
+import classnames from "classnames";
 
 import { prefs, features } from "../utils/prefs";
 import actions from "../actions";
 import A11yIntention from "./A11yIntention";
 import { ShortcutsModal } from "./ShortcutsModal";
 
 import {
   getSelectedSource,
   getPaneCollapse,
   getActiveSearch,
   getQuickOpenEnabled,
-  getOrientation
+  getOrientation,
+  getCanRewind
 } from "../selectors";
 
 import type { OrientationType } from "../reducers/types";
 import type { Source } from "../types";
 
 import { KeyShortcuts } from "devtools-modules";
 import Services from "devtools-services";
 const shortcuts = new KeyShortcuts({ window });
@@ -308,19 +310,19 @@ class App extends Component<Props, State
         additionalClass={additionalClass}
         enabled={this.state.shortcutsModalEnabled}
         handleClose={() => this.toggleShortcutsModal()}
       />
     );
   }
 
   render() {
-    const { quickOpenEnabled } = this.props;
+    const { quickOpenEnabled, canRewind } = this.props;
     return (
-      <div className="debugger">
+      <div className={classnames("debugger", { "can-rewind": canRewind })}>
         <A11yIntention>
           {this.renderLayout()}
           {quickOpenEnabled === true && (
             <QuickOpenModal
               shortcutsModalEnabled={this.state.shortcutsModalEnabled}
               toggleShortcutsModal={() => this.toggleShortcutsModal()}
             />
           )}
@@ -332,16 +334,17 @@ class App extends Component<Props, State
 }
 
 App.childContextTypes = {
   shortcuts: PropTypes.object,
   l10n: PropTypes.object
 };
 
 const mapStateToProps = state => ({
+  canRewind: getCanRewind(state),
   selectedSource: getSelectedSource(state),
   startPanelCollapsed: getPaneCollapse(state, "start"),
   endPanelCollapsed: getPaneCollapse(state, "end"),
   activeSearch: getActiveSearch(state),
   quickOpenEnabled: getQuickOpenEnabled(state),
   orientation: getOrientation(state)
 });