Merge mozilla-central to inbound. a=merge CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Mon, 22 Oct 2018 12:51:42 +0300
changeset 490629 47db66520bef4128c348f815dd4d75ea98335d0f
parent 490624 fd985440b6e293c33048c5f90ad3e88d6dfe3c3b (current diff)
parent 490628 43d78c2bd006d7cf7d90508519c8aa88be18ab0c (diff)
child 490630 fa6b7a70f2db81835c314543031fb6ce251fafce
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersmerge
milestone64.0a1
Merge mozilla-central to inbound. a=merge CLOSED TREE
--- a/devtools/client/locales/en-US/webconsole.properties
+++ b/devtools/client/locales/en-US/webconsole.properties
@@ -192,16 +192,24 @@ webconsole.menu.selectAll.accesskey=A
 webconsole.menu.openInSidebar.label=Open in sidebar
 webconsole.menu.openInSidebar.accesskey=V
 
 # LOCALIZATION NOTE (webconsole.menu.timeWarp.label)
 # Label used for a context-menu item displayed for any log. Clicking on it will
 # jump to the execution point where the log item was generated.
 webconsole.menu.timeWarp.label=Jump here
 
+# LOCALIZATION NOTE (webconsole.jumpButton.tooltip)
+# Label used for the tooltip on the "jump" button in the console. It's displayed when
+# the user recorded execution with WebReplay, is now paused in the debugger, and hover a
+# message in the console output. Clicking on it will jump to the execution point where the
+# log item was generated.
+# Parameters: %S is the level of the message.
+webconsole.jumpButton.tooltip=%S - Jump here
+
 # LOCALIZATION NOTE (webconsole.clearButton.tooltip)
 # Label used for the tooltip on the clear logs button in the console top toolbar bar.
 # Clicking on it will clear the content of the console.
 webconsole.clearButton.tooltip=Clear the Web Console output
 
 # LOCALIZATION NOTE (webconsole.toggleFilterButton.tooltip)
 # Label used for the tooltip on the toggle filter bar button in the console top
 # toolbar bar. Clicking on it will toggle the visibility of an additional bar which
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -212,25 +212,20 @@ a {
 }
 
 .message.navigationMarker > .icon {
   color: var(--object-color);
   background-image: var(--theme-console-navigation-image);
 }
 
 
-.message > span.icon[title="Jump"] {
+.message:hover > .icon.rewindable {
   background-image:var(--theme-console-jump-image);
   background-size: 14px 14px;
   cursor: pointer;
-  opacity: 0;
-}
-
-.message:hover span.icon[title="Jump"] {
-  opacity: 1;
 }
 
 .message > .message-body-wrapper {
   flex: auto;
   min-width: 0px;
   margin: var(--console-output-vertical-padding) 0;
 }
 
--- a/devtools/client/webconsole/components/Message.js
+++ b/devtools/client/webconsole/components/Message.js
@@ -120,26 +120,22 @@ class Message extends Component {
     serviceContainer.openContextMenu(e, messageInfo);
     e.stopPropagation();
     e.preventDefault();
   }
 
   renderIcon() {
     const { level, messageId, executionPoint, serviceContainer } = this.props;
 
-    if (serviceContainer.canRewind()) {
-      return dom.span({
-        className: "icon",
-        title: "Jump",
-        "aria-live": "off",
-        onClick: () => serviceContainer.jumpToExecutionPoint(executionPoint, messageId),
-      });
-    }
-
-    return MessageIcon({ level });
+    return MessageIcon({
+      level,
+      onRewindClick: serviceContainer.canRewind()
+        ? () => serviceContainer.jumpToExecutionPoint(executionPoint, messageId)
+        : null,
+    });
   }
 
   render() {
     const {
       open,
       collapsible,
       collapseTitle,
       source,
--- a/devtools/client/webconsole/components/MessageIcon.js
+++ b/devtools/client/webconsole/components/MessageIcon.js
@@ -5,36 +5,55 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const {l10n} = require("devtools/client/webconsole/utils/messages");
 
+const l10nLevels = {
+  "error": "level.error",
+  "warn": "level.warn",
+  "info": "level.info",
+  "log": "level.log",
+  "debug": "level.debug",
+};
+
 // Store common icons so they can be used without recreating the element
 // during render.
-const CONSTANT_ICONS = {
-  "error": getIconElement("level.error"),
-  "warn": getIconElement("level.warn"),
-  "info": getIconElement("level.info"),
-  "log": getIconElement("level.log"),
-  "debug": getIconElement("level.debug"),
-};
+const CONSTANT_ICONS = Object.entries(l10nLevels).reduce((acc, [key, l10nLabel]) => {
+  acc[key] = getIconElement(l10nLabel);
+  return acc;
+}, {});
+
+function getIconElement(level, onRewindClick) {
+  let title = l10n.getStr(l10nLevels[level] || level);
+  const classnames = ["icon"];
 
-function getIconElement(level) {
+  if (onRewindClick) {
+    title = l10n.getFormatStr("webconsole.jumpButton.tooltip", [title]);
+    classnames.push("rewindable");
+  }
+
   return dom.span({
-    className: "icon",
-    title: l10n.getStr(level),
+    className: classnames.join(" "),
+    onClick: onRewindClick,
+    title,
     "aria-live": "off",
   });
 }
 
 MessageIcon.displayName = "MessageIcon";
 MessageIcon.propTypes = {
   level: PropTypes.string.isRequired,
+  onRewindClick: PropTypes.function,
 };
+
 function MessageIcon(props) {
-  const { level } = props;
-  return CONSTANT_ICONS[level] || getIconElement(level);
+  const { level, onRewindClick } = props;
+
+  return onRewindClick
+    ? getIconElement(level, onRewindClick)
+    : CONSTANT_ICONS[level] || getIconElement(level);
 }
 
 module.exports = MessageIcon;
--- a/gfx/webrender_bindings/cbindgen.toml
+++ b/gfx/webrender_bindings/cbindgen.toml
@@ -9,16 +9,20 @@ autogen_warning = """/* DO NOT MODIFY TH
  */"""
 include_version = true
 braces = "SameLine"
 line_length = 100
 tab_width = 2
 language = "C++"
 namespaces = ["mozilla", "wr"]
 
+[export]
+# Skip constants because we don't have any
+item_types = ["globals", "enums", "structs", "unions", "typedefs", "opaque", "functions"]
+
 [parse]
 parse_deps = true
 include = ["log", "webrender", "webrender_api"]
 expand = ["euclid"]
 
 [fn]
 prefix = "WR_INLINE"
 postfix = "WR_FUNC"
--- a/gfx/webrender_bindings/webrender_ffi_generated.h
+++ b/gfx/webrender_bindings/webrender_ffi_generated.h
@@ -1,31 +1,27 @@
 /* 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/. */
 
-/* Generated with cbindgen:0.6.3 */
+/* Generated with cbindgen:0.6.6 */
 
 /* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
  * To generate this file:
  *   1. Get the latest cbindgen using `cargo install --force cbindgen`
  *      a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release
  *   2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate webrender_bindings -o gfx/webrender_bindings/webrender_ffi_generated.h`
  */
 
 #include <cstdint>
 #include <cstdlib>
 
 namespace mozilla {
 namespace wr {
 
-static const uint32_t MAX_CACHED_PROGRAM_COUNT = 15;
-
-static const uint64_t MAX_LOAD_TIME_MS = 400;
-
 // Whether a border should be antialiased.
 enum class AntialiasBorder {
   No = 0,
   Yes,
 
   Sentinel /* this must be last for serialization purposes. */
 };
 
--- a/layout/reftests/font-inflation/list-1.html
+++ b/layout/reftests/font-inflation/list-1.html
@@ -1,15 +1,13 @@
 <!DOCTYPE HTML>
 <head>
-<link rel="stylesheet" type="text/css" href="ahem.css" />
 <style>
 div { background: yellow; line-height: 1.0; border: 1px solid red; font-size: 12px; width: 480px; }
 ol { width: 480px;}
-li { font-family: ahem; }
 </style>
 </head>
 <!--
 In a 480px container, the minimum font size at 15em per line is 32px.
 This means we map 0px-48px into 32px-48px, so 12px gets mapped to 36px.
 -->
 <body>
 <div>