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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/src/shared_SVGFactoryProviders.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 96ff761230acd6a255eed3224b4835e6186f677e..c090be4292b1556d8823cb376bfdb818b280cd18 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -8250,14 +8250,14 @@ class Document extends Node
Element query(String selectors) {
// It is fine for our RegExp to detect element id query selectors to have
// false negatives but not false positives.
- if (new RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
+ if (const RegExp("^#[_a-zA-Z]\\w*\$").hasMatch(selectors)) {
return $dom_getElementById(selectors.substring(1));
}
return $dom_querySelector(selectors);
}
List<Element> queryAll(String selectors) {
- if (new RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
+ if (const RegExp("""^\\[name=["'][^'"]+['"]\\]\$""").hasMatch(selectors)) {
final mutableMatches = $dom_getElementsByName(
selectors.substring(7,selectors.length - 2));
int len = mutableMatches.length;
@@ -8266,7 +8266,7 @@ class Document extends Node
copyOfMatches[i] = mutableMatches[i];
}
return new _FrozenElementList._wrap(copyOfMatches);
- } else if (new RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
+ } else if (const RegExp("^[*a-zA-Z0-9]+\$").hasMatch(selectors)) {
final mutableMatches = $dom_getElementsByTagName(selectors);
int len = mutableMatches.length;
final copyOfMatches = new List<Element>(len);
@@ -9637,7 +9637,7 @@ class Element extends Node implements ElementTraversal {
// Temporary dispatch hook to support WebComponents.
Function dynamicUnknownElementDispatcher;
-final _START_TAG_REGEXP = new RegExp('<(\\w+)');
+final _START_TAG_REGEXP = const RegExp('<(\\w+)');
class _ElementFactoryProvider {
static final _CUSTOM_PARENT_TAG_MAP = const {
'body' : 'html',
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/src/shared_SVGFactoryProviders.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698