From 609a7215e6ef705fd098fd4adb4f922795ff1119 Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Mon, 8 Apr 2019 20:05:53 -0400 Subject: Issue #991 Part 3: Devtools --- devtools/shared/touch/simulator-core.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'devtools/shared') diff --git a/devtools/shared/touch/simulator-core.js b/devtools/shared/touch/simulator-core.js index 6933f9207..fff7d2e78 100644 --- a/devtools/shared/touch/simulator-core.js +++ b/devtools/shared/touch/simulator-core.js @@ -18,19 +18,8 @@ var systemAppOrigin = (function () { return systemOrigin; })(); -var threshold = 25; -try { - threshold = Services.prefs.getIntPref("ui.dragThresholdX"); -} catch (e) { - // Fall back to default value -} - -var delay = 500; -try { - delay = Services.prefs.getIntPref("ui.click_hold_context_menus.delay"); -} catch (e) { - // Fall back to default value -} +var threshold = Services.prefs.getIntPref("ui.dragThresholdX", 25); +var delay = Services.prefs.getIntPref("ui.click_hold_context_menus.delay", 500); function SimulatorCore(simulatorTarget) { this.simulatorTarget = simulatorTarget; -- cgit v1.2.3 From d9137b4b7ae446750713c48a48574465301e3699 Mon Sep 17 00:00:00 2001 From: JustOff Date: Sat, 20 Apr 2019 13:53:46 +0300 Subject: Handle URL token in a closer way to the CSS3 spec --- devtools/shared/css/lexer.js | 21 +++++++++++++++++++++ devtools/shared/tests/unit/test_csslexer.js | 3 +-- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'devtools/shared') diff --git a/devtools/shared/css/lexer.js b/devtools/shared/css/lexer.js index 9013b63ea..192fa95b3 100644 --- a/devtools/shared/css/lexer.js +++ b/devtools/shared/css/lexer.js @@ -1067,6 +1067,7 @@ Scanner.prototype = { // aToken.mIdent may be "url" at this point; clear that out aToken.mIdent.length = 0; + let hasString = false; let ch = this.Peek(); // Do we have a string? if (ch == QUOTATION_MARK || ch == APOSTROPHE) { @@ -1075,6 +1076,7 @@ Scanner.prototype = { aToken.mType = eCSSToken_Bad_URL; return; } + hasString = true; } else { // Otherwise, this is the start of a non-quoted url (which may be empty). aToken.mSymbol = 0; @@ -1093,6 +1095,25 @@ Scanner.prototype = { } } else { aToken.mType = eCSSToken_Bad_URL; + if (!hasString) { + // Consume until before the next right parenthesis, which follows + // how is consumed in CSS Syntax 3 spec. + // Note that, we only do this when "url(" is not followed by a + // string, because in the spec, "url(" followed by a string is + // handled as a url function rather than a , so the + // rest of content before ")" should be consumed in balance, + // which will be done by the parser. + // The closing ")" is not consumed here. It is left to the parser + // so that the parser can handle both cases. + do { + if (IsVertSpace(ch)) { + this.AdvanceLine(); + } else { + this.Advance(); + } + ch = this.Peek(); + } while (ch >= 0 && ch != RIGHT_PARENTHESIS); + } } }, diff --git a/devtools/shared/tests/unit/test_csslexer.js b/devtools/shared/tests/unit/test_csslexer.js index 35855640b..b2dfdf5aa 100644 --- a/devtools/shared/tests/unit/test_csslexer.js +++ b/devtools/shared/tests/unit/test_csslexer.js @@ -128,8 +128,7 @@ var LEX_TESTS = [ ["url:http://example.com"]], // In CSS Level 3, this is an ordinary URL, not a BAD_URL. ["url(http://example.com", ["url:http://example.com"]], - // See bug 1153981 to understand why this gets a SYMBOL token. - ["url(http://example.com @", ["bad_url:http://example.com", "symbol:@"]], + ["url(http://example.com @", ["bad_url:http://example.com"]], ["quo\\ting", ["ident:quoting"]], ["'bad string\n", ["bad_string:bad string", "whitespace"]], ["~=", ["includes"]], -- cgit v1.2.3 From 325b204d2661dafd2720d3e78f47be8038871dbd Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 23 Apr 2019 15:56:35 -0400 Subject: Issue #1053 - Drop support Android and remove Fennec - Part 1b: Remove MOZ_FENNEC --- devtools/shared/qrcode/moz.build | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'devtools/shared') diff --git a/devtools/shared/qrcode/moz.build b/devtools/shared/qrcode/moz.build index c9493a538..293bbcc93 100644 --- a/devtools/shared/qrcode/moz.build +++ b/devtools/shared/qrcode/moz.build @@ -5,15 +5,10 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. DIRS += [ - 'encoder' + 'decoder', + 'encoder', ] -# Save file size on Fennec until there are active plans to use the decoder there -if not CONFIG['MOZ_FENNEC']: - DIRS += [ - 'decoder' - ] - DevToolsModules( 'index.js', ) -- cgit v1.2.3