| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 class _ChildrenElementList extends ListBase<Element> { | 7 class _ChildrenElementList extends ListBase<Element> { |
| 8 // Raw Element. | 8 // Raw Element. |
| 9 final Element _element; | 9 final Element _element; |
| 10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 } | 1229 } |
| 1230 treeSanitizer = _defaultSanitizer; | 1230 treeSanitizer = _defaultSanitizer; |
| 1231 } else if (validator != null) { | 1231 } else if (validator != null) { |
| 1232 throw new ArgumentError( | 1232 throw new ArgumentError( |
| 1233 'validator can only be passed if treeSanitizer is null'); | 1233 'validator can only be passed if treeSanitizer is null'); |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 if (_parseDocument == null) { | 1236 if (_parseDocument == null) { |
| 1237 _parseDocument = document.implementation.createHtmlDocument(''); | 1237 _parseDocument = document.implementation.createHtmlDocument(''); |
| 1238 _parseRange = _parseDocument.createRange(); | 1238 _parseRange = _parseDocument.createRange(); |
| 1239 |
| 1240 // Workaround for Chrome bug 229142- URIs are not resolved in new doc. |
| 1241 var base = _parseDocument.$dom_createElement('base'); |
| 1242 base.href = document._baseUri; |
| 1243 _parseDocument.head.append(base); |
| 1239 } | 1244 } |
| 1240 var contextElement; | 1245 var contextElement; |
| 1241 if (this is BodyElement) { | 1246 if (this is BodyElement) { |
| 1242 contextElement = _parseDocument.body; | 1247 contextElement = _parseDocument.body; |
| 1243 } else { | 1248 } else { |
| 1244 contextElement = _parseDocument.$dom_createElement(tagName); | 1249 contextElement = _parseDocument.$dom_createElement(tagName); |
| 1245 _parseDocument.body.append(contextElement); | 1250 _parseDocument.body.append(contextElement); |
| 1246 } | 1251 } |
| 1247 var fragment; | 1252 var fragment; |
| 1248 if (Range.supportsCreateContextualFragment) { | 1253 if (Range.supportsCreateContextualFragment) { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 const ScrollAlignment._internal(this._value); | 1345 const ScrollAlignment._internal(this._value); |
| 1341 toString() => 'ScrollAlignment.$_value'; | 1346 toString() => 'ScrollAlignment.$_value'; |
| 1342 | 1347 |
| 1343 /// Attempt to align the element to the top of the scrollable area. | 1348 /// Attempt to align the element to the top of the scrollable area. |
| 1344 static const TOP = const ScrollAlignment._internal('TOP'); | 1349 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1345 /// Attempt to center the element in the scrollable area. | 1350 /// Attempt to center the element in the scrollable area. |
| 1346 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1351 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1347 /// Attempt to align the element to the bottom of the scrollable area. | 1352 /// Attempt to align the element to the bottom of the scrollable area. |
| 1348 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1353 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1349 } | 1354 } |
| OLD | NEW |