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

Unified Diff: pkg/polymer/lib/src/css_emitters.dart

Issue 23445009: Prune the old deploy code. This CL does a few changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: pkg/polymer/lib/src/css_emitters.dart
diff --git a/pkg/polymer/lib/src/css_emitters.dart b/pkg/polymer/lib/src/css_emitters.dart
index d1863f59ff24e1a9cb28fa76719b3fa0e0eaee17..2040892e5dca91ed73e0da940ae18de00a34a45a 100644
--- a/pkg/polymer/lib/src/css_emitters.dart
+++ b/pkg/polymer/lib/src/css_emitters.dart
@@ -8,42 +8,8 @@ import 'package:csslib/visitor.dart' show Visitor, CssPrinter, ElementSelector,
UriTerm, Selector, HostDirective, SimpleSelectorSequence, StyleSheet;
import 'info.dart';
-import 'paths.dart' show PathMapper;
import 'utils.dart';
-void rewriteCssUris(PathMapper pathMapper, String cssPath, bool rewriteUrls,
- StyleSheet styleSheet) {
- new _UriVisitor(pathMapper, cssPath, rewriteUrls).visitTree(styleSheet);
-}
-
-/** Compute each CSS URI resource relative from the generated CSS file. */
-class _UriVisitor extends Visitor {
- /**
- * Relative path from the output css file to the location of the original
- * css file that contained the URI to each resource.
- */
- final String _pathToOriginalCss;
-
- factory _UriVisitor(PathMapper pathMapper, String cssPath, bool rewriteUrl) {
- var cssDir = path.dirname(cssPath);
- var outCssDir = rewriteUrl ? pathMapper.outputDirPath(cssPath)
- : path.dirname(cssPath);
- return new _UriVisitor._internal(path.relative(cssDir, from: outCssDir));
- }
-
- _UriVisitor._internal(this._pathToOriginalCss);
-
- void visitUriTerm(UriTerm node) {
- // Don't touch URIs that have any scheme (http, etc.).
- var uri = Uri.parse(node.text);
- if (uri.host != '') return;
- if (uri.scheme != '' && uri.scheme != 'package') return;
-
- node.text = pathToUrl(
- path.normalize(path.join(_pathToOriginalCss, node.text)));
- }
-}
-
/** Emit the contents of the style tag outside of a component. */
String emitStyleSheet(StyleSheet ss, FileInfo file) =>

Powered by Google App Engine
This is Rietveld 408576698