From c8d03edd21ffc63355af791fc56dade4f7802693 Mon Sep 17 00:00:00 2001 From: imcheng Date: Fri, 19 Feb 2016 13:10:17 -0800 Subject: [PATCH] Revert of DevTools: improve SCSS parser to correctly handle variable expansions (patchset #1 id:1 of https://codereview.chromium.org/1713783003/ ) Reason for revert: Broke WebKit Linux webkit_tests: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux/builds/60992 Original issue's description: > DevTools: improve SCSS parser to correctly handle variable expansions > > The patch improves SCSS parser to not get stuck after encountering > variable expansion. > > BUG=527993 > R=pfeldman, dgozman > > Committed: https://crrev.com/dca95714bf140aa7f672ee80ae25a14ea7295eb2 > Cr-Commit-Position: refs/heads/master@{#376489} TBR=dgozman@chromium.org,pfeldman@chromium.org,lushnikov@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=527993 Review URL: https://codereview.chromium.org/1712363002 Cr-Commit-Position: refs/heads/master@{#376533} --- front_end/sass/SASSSupport.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/front_end/sass/SASSSupport.js b/front_end/sass/SASSSupport.js index be6a2cbbd2..8972f44f1e 100644 --- a/front_end/sass/SASSSupport.js +++ b/front_end/sass/SASSSupport.js @@ -70,7 +70,7 @@ WebInspector.SASSSupport.SCSSParserStates = { VariableValue: "VariableValue", MixinName: "MixinName", MixinValue: "MixinValue", - Media: "Media" + Media: "Media", } /** @@ -139,9 +139,7 @@ WebInspector.SASSSupport._innerParseSCSS = function(document, tokenizerFactory) } break; case States.VariableName: - if (tokenValue === "}" && tokenType === UndefTokenType) { - state = States.Initial; - } else if (tokenValue === ")" && tokenType === UndefTokenType) { + if (tokenValue === ")" && tokenType === UndefTokenType) { state = States.Initial; } else if (tokenValue === ":" && tokenType === UndefTokenType) { state = States.VariableValue;