Remove support for Polymer 1
We remove ShadyDom as we now user ShadowDom under Polymer 2+. We don't
have the ShadyDom option switched on under Polymer 2 so this is not needed
under Polymer 2+.
Change-Id: Idab2da3fd7aed0a563c8e025ae9ddf20606d60b1
diff --git a/BUILD b/BUILD
index 8d41cee..0d0addd 100644
--- a/BUILD
+++ b/BUILD
@@ -37,18 +37,6 @@
deps = ["//lib/js:codemirror-minified"],
)
-bundle_assets(
- name = "codemirror-element-shadydom",
- srcs = [
- "gr-editor/codemirror-element.css",
- "gr-editor/codemirror-element.js",
- "gr-editor/codemirror-element-shadydom.html",
- ],
- app = "gr-editor/codemirror-element-shadydom.html",
- split = False,
- deps = ["//lib/js:codemirror-minified"],
-)
-
polygerrit_plugin(
name = "codemirror_editor",
srcs = glob([
@@ -58,6 +46,5 @@
app = "plugin.html",
assets = [
":codemirror-element-shadowdom",
- ":codemirror-element-shadydom",
],
)
diff --git a/gr-editor/codemirror-element-shadydom.html b/gr-editor/codemirror-element-shadydom.html
deleted file mode 100644
index ce2c1be..0000000
--- a/gr-editor/codemirror-element-shadydom.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<!--
-@license
-Copyright (C) 2018 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<!--
-Codemirror doesn't work correctly with shadydom. For shadydom all codemirror's styles
-must be at the document level.
--->
-
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/lib/codemirror.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/ambiance.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/ambiance-mobile.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/blackboard.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/cobalt.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/eclipse.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/elegant.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/erlang-dark.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/lesser-dark.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/midnight.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/monokai.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/neat.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/night.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/rubyblue.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/solarized.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/twilight.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/vibrant-ink.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/xq-dark.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/theme/xq-light.css">
-<link rel="stylesheet" type="css" href="../bower_components/codemirror-minified/addon/fold/foldgutter.css">
-
-<dom-module id="codemirror-element">
- <template>
- <link rel="stylesheet" type="css" href="./codemirror-element.css" />
- <div id="wrapper"></div>
- </template>
- <script src="./codemirror-element.js"></script>
-</dom-module>
-
-<script src="../bower_components/codemirror-minified/lib/codemirror.js"></script>
-<script src="../bower_components/codemirror-minified/addon/display/rulers.js"></script>
-<script src="../bower_components/codemirror-minified/addon/edit/closebrackets.js"></script>
-<script src="../bower_components/codemirror-minified/addon/edit/closetag.js"></script>
-<script src="../bower_components/codemirror-minified/addon/edit/matchbrackets.js"></script>
-<script src="../bower_components/codemirror-minified/addon/edit/matchtags.js"></script>
-<script src="../bower_components/codemirror-minified/addon/edit/trailingspace.js"></script>
-<script src="../bower_components/codemirror-minified/addon/mode/simple.js"></script>
-<script src="../bower_components/codemirror-minified/addon/mode/multiplex.js"></script>
-<script src="../bower_components/codemirror-minified/mode/meta.js"></script>
-<script src="../bower_components/codemirror-minified/mode/clike/clike.js"></script>
-<script src="../bower_components/codemirror-minified/mode/clojure/clojure.js"></script>
-<script src="../bower_components/codemirror-minified/mode/coffeescript/coffeescript.js"></script>
-<script src="../bower_components/codemirror-minified/mode/commonlisp/commonlisp.js"></script>
-<script src="../bower_components/codemirror-minified/mode/css/css.js"></script>
-<script src="../bower_components/codemirror-minified/mode/d/d.js"></script>
-<script src="../bower_components/codemirror-minified/mode/dart/dart.js"></script>
-<script src="../bower_components/codemirror-minified/mode/diff/diff.js"></script>
-<script src="../bower_components/codemirror-minified/mode/django/django.js"></script>
-<script src="../bower_components/codemirror-minified/mode/dockerfile/dockerfile.js"></script>
-<script src="../bower_components/codemirror-minified/mode/erlang/erlang.js"></script>
-<script src="../bower_components/codemirror-minified/mode/go/go.js"></script>
-<script src="../bower_components/codemirror-minified/mode/groovy/groovy.js"></script>
-<script src="../bower_components/codemirror-minified/mode/haml/haml.js"></script>
-<script src="../bower_components/codemirror-minified/mode/handlebars/handlebars.js"></script>
-<script src="../bower_components/codemirror-minified/mode/haskell/haskell.js"></script>
-<script src="../bower_components/codemirror-minified/mode/htmlembedded/htmlembedded.js"></script>
-<script src="../bower_components/codemirror-minified/mode/htmlmixed/htmlmixed.js"></script>
-<script src="../bower_components/codemirror-minified/mode/javascript/javascript.js"></script>
-<script src="../bower_components/codemirror-minified/mode/jinja2/jinja2.js"></script>
-<script src="../bower_components/codemirror-minified/mode/jsx/jsx.js"></script>
-<script src="../bower_components/codemirror-minified/mode/julia/julia.js"></script>
-<script src="../bower_components/codemirror-minified/mode/lua/lua.js"></script>
-<script src="../bower_components/codemirror-minified/mode/markdown/markdown.js"></script>
-<script src="../bower_components/codemirror-minified/mode/mllike/mllike.js"></script>
-<script src="../bower_components/codemirror-minified/mode/nginx/nginx.js"></script>
-<script src="../bower_components/codemirror-minified/mode/perl/perl.js"></script>
-<script src="../bower_components/codemirror-minified/mode/php/php.js"></script>
-<script src="../bower_components/codemirror-minified/mode/powershell/powershell.js"></script>
-<script src="../bower_components/codemirror-minified/mode/properties/properties.js"></script>
-<script src="../bower_components/codemirror-minified/mode/protobuf/protobuf.js"></script>
-<script src="../bower_components/codemirror-minified/mode/puppet/puppet.js"></script>
-<script src="../bower_components/codemirror-minified/mode/python/python.js"></script>
-<script src="../bower_components/codemirror-minified/mode/rpm/rpm.js"></script>
-<script src="../bower_components/codemirror-minified/mode/ruby/ruby.js"></script>
-<script src="../bower_components/codemirror-minified/mode/sass/sass.js"></script>
-<script src="../bower_components/codemirror-minified/mode/scheme/scheme.js"></script>
-<script src="../bower_components/codemirror-minified/mode/shell/shell.js"></script>
-<script src="../bower_components/codemirror-minified/mode/soy/soy.js"></script>
-<script src="../bower_components/codemirror-minified/mode/sparql/sparql.js"></script>
-<script src="../bower_components/codemirror-minified/mode/sql/sql.js"></script>
-<script src="../bower_components/codemirror-minified/mode/swift/swift.js"></script>
-<script src="../bower_components/codemirror-minified/mode/tcl/tcl.js"></script>
-<script src="../bower_components/codemirror-minified/mode/velocity/velocity.js"></script>
-<script src="../bower_components/codemirror-minified/mode/verilog/verilog.js"></script>
-<script src="../bower_components/codemirror-minified/mode/vb/vb.js"></script>
-<script src="../bower_components/codemirror-minified/mode/xml/xml.js"></script>
-<script src="../bower_components/codemirror-minified/mode/yaml/yaml.js"></script>
diff --git a/gr-editor/gr-editor.js b/gr-editor/gr-editor.js
index add4a96..e0e2db1 100644
--- a/gr-editor/gr-editor.js
+++ b/gr-editor/gr-editor.js
@@ -55,12 +55,10 @@
},
_importCodeMirror() {
- const codemirrorElementFile = Polymer.Settings.useShadow
- ? '/static/codemirror-element-shadowdom.html'
- : '/static/codemirror-element-shadydom.html';
+ const codemirrorElementFile = '/static/codemirror-element-shadowdom.html';
const url = this.plugin.url(codemirrorElementFile);
return new Promise((resolve, reject) => {
- (this.importHref || Polymer.importHref)(url, resolve, reject);
+ Polymer.importHref(url, resolve, reject);
});
},