Backed out changeset 0b3435dc45f8 (bug 1302787)
authorIris Hsiao <ihsiao@mozilla.com>
Mon, 17 Oct 2016 12:05:32 +0800
changeset 318198 1f45b0e0138345f70347b3feb122ba5a8beeb8f1
parent 318197 8c6fa8b34a0f0f72f07075fc84916d1e63ec9b6f
child 318199 9707f0972299ceb207d7f4ad64f720cba38f0a14
push id33211
push usercbook@mozilla.com
push dateMon, 17 Oct 2016 09:38:38 +0000
treeherderautoland@e4ef6fa03aa8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1302787
milestone52.0a1
backs out0b3435dc45f8c47ba6f2605fed3b1bed881cb1d0
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
Backed out changeset 0b3435dc45f8 (bug 1302787)
devtools/shared/css/color.js
--- a/devtools/shared/css/color.js
+++ b/devtools/shared/css/color.js
@@ -817,16 +817,33 @@ function parseHue(lexer, colorArray) {
 
   val = val / 360.0;
   colorArray.push(val - Math.floor(val));
 
   return true;
 }
 
 /**
+ * A helper function to examine a token and ensure it is a comma.
+ * Then fetch and return the next token.  Returns null if the
+ * token was not a comma, or at EOF.
+ *
+ * @param {CSSLexer} lexer The lexer
+ * @param {CSSToken} token A token to be examined
+ * @return {CSSToken} The next non-whitespace, non-comment token; or
+ * null if token was not a comma, or at EOF.
+ */
+function requireComma(lexer, token) {
+  if (!token || token.tokenType !== "symbol" || token.text !== ",") {
+    return null;
+  }
+  return getToken(lexer);
+}
+
+/**
  * A helper function to parse the color components of hsl()/hsla() function.
  * hsl() and hsla() are now aliases.
  *
  * @param {CSSLexer} lexer The lexer
  * @return {Array} An array of the form [r,g,b,a]; or null on error.
  */
 function parseHsl(lexer) {
   // comma-less expression: