Skip to content

Commit 8786199

Browse files
Merge pull request #11943 from Snuffleupagus/cleanup-preprocessCSS
Remove unused code from the `external/builder/builder.js` file
2 parents fe56897 + d7dee0e commit 8786199

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

external/builder/builder.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,9 @@ function preprocess(inFilename, outFilename, defines) {
196196
}
197197
exports.preprocess = preprocess;
198198

199-
var deprecatedInMozcentral = new RegExp(
200-
"(^|\\W)(" + ["-moz-box-sizing", "-moz-grab", "-moz-grabbing"].join("|") + ")"
201-
);
202-
203199
function preprocessCSS(mode, source, destination) {
204-
function hasPrefixedFirefox(line) {
205-
return /(^|\W)-(ms|o|webkit)-\w/.test(line);
206-
}
207-
208200
function hasPrefixedMozcentral(line) {
209-
return (
210-
/(^|\W)-(ms|o|webkit)-\w/.test(line) || deprecatedInMozcentral.test(line)
211-
);
201+
return /(^|\W)-(ms|o|webkit)-\w/.test(line);
212202
}
213203

214204
function expandImports(content, baseUrl) {
@@ -275,11 +265,8 @@ function preprocessCSS(mode, source, destination) {
275265

276266
var content = fs.readFileSync(source, "utf8").toString();
277267
content = expandImports(content, source);
278-
if (mode === "mozcentral" || mode === "firefox") {
279-
content = removePrefixed(
280-
content,
281-
mode === "mozcentral" ? hasPrefixedMozcentral : hasPrefixedFirefox
282-
);
268+
if (mode === "mozcentral") {
269+
content = removePrefixed(content, hasPrefixedMozcentral);
283270
}
284271
fs.writeFileSync(destination, content);
285272
}

0 commit comments

Comments
 (0)