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

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 1230553003: Revert "appendHtml, when sanitizing, should create document fragment in the right context" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « tests/html/element_add_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 implements NodeListWrapper { 8 implements NodeListWrapper {
9 // Raw Element. 9 // Raw Element.
10 final Element _element; 10 final Element _element;
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 * See also: 1010 * See also:
1011 * 1011 *
1012 * * [insertAdjacentText] 1012 * * [insertAdjacentText]
1013 * * [insertAdjacentElement] 1013 * * [insertAdjacentElement]
1014 */ 1014 */
1015 void insertAdjacentHtml(String where, String html, {NodeValidator validator, 1015 void insertAdjacentHtml(String where, String html, {NodeValidator validator,
1016 NodeTreeSanitizer treeSanitizer}) { 1016 NodeTreeSanitizer treeSanitizer}) {
1017 if (treeSanitizer is _TrustedHtmlTreeSanitizer) { 1017 if (treeSanitizer is _TrustedHtmlTreeSanitizer) {
1018 _insertAdjacentHtml(where, html); 1018 _insertAdjacentHtml(where, html);
1019 } else { 1019 } else {
1020 _insertAdjacentNode(where, createFragment(html, 1020 _insertAdjacentNode(where, new DocumentFragment.html(html,
1021 validator: validator, treeSanitizer: treeSanitizer)); 1021 validator: validator, treeSanitizer: treeSanitizer));
1022 } 1022 }
1023 } 1023 }
1024 1024
1025 $if DART2JS 1025 $if DART2JS
1026 1026
1027 @JSName('insertAdjacentHTML') 1027 @JSName('insertAdjacentHTML')
1028 void _insertAdjacentHtml(String where, String text) native; 1028 void _insertAdjacentHtml(String where, String text) native;
1029 1029
1030 /** 1030 /**
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 const ScrollAlignment._internal(this._value); 1582 const ScrollAlignment._internal(this._value);
1583 toString() => 'ScrollAlignment.$_value'; 1583 toString() => 'ScrollAlignment.$_value';
1584 1584
1585 /// Attempt to align the element to the top of the scrollable area. 1585 /// Attempt to align the element to the top of the scrollable area.
1586 static const TOP = const ScrollAlignment._internal('TOP'); 1586 static const TOP = const ScrollAlignment._internal('TOP');
1587 /// Attempt to center the element in the scrollable area. 1587 /// Attempt to center the element in the scrollable area.
1588 static const CENTER = const ScrollAlignment._internal('CENTER'); 1588 static const CENTER = const ScrollAlignment._internal('CENTER');
1589 /// Attempt to align the element to the bottom of the scrollable area. 1589 /// Attempt to align the element to the bottom of the scrollable area.
1590 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1590 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1591 } 1591 }
OLDNEW
« no previous file with comments | « tests/html/element_add_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698