Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2259433005: DevTools: Add CSSShadowModel and CSSLength (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 86f9ab857020a1087ab8763a849465b34a8a33c3..41a65325c3a46fecba98ec7aa82db9c557a82643 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -357,11 +357,8 @@ WebInspector.markBeingEdited = function(element, value)
return true;
}
-WebInspector.CSSNumberRegex = /^(-?(?:\d+(?:\.\d+)?|\.\d+))$/;
-
WebInspector.StyleValueDelimiters = " \xA0\t\n\"':;,/()";
-
/**
* @param {!Event} event
* @return {?string}
@@ -466,7 +463,7 @@ WebInspector._modifiedFloatNumber = function(number, event)
// Make the new number and constrain it to a precision of 6, this matches numbers the engine returns.
// Use the Number constructor to forget the fixed precision, so 1.100000 will print as 1.1.
var result = Number((number + delta).toFixed(6));
- if (!String(result).match(WebInspector.CSSNumberRegex))
+ if (!String(result).match(new RegExp("^(" + WebInspector.CSSNumberRegex.source + ")$")))
return null;
return result;

Powered by Google App Engine
This is Rietveld 408576698