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

Issue 1904903003: Make querySelectorAll a generic method so that checked mode behavior is consistent with existing be… (Closed)

Created:
4 years, 8 months ago by Jacob
Modified:
4 years, 8 months ago
Reviewers:
Leaf, Alan Knight, sra1
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make querySelectorAll a generic method so that checked mode behavior is consistent with existing behavior and strong mode behavior is strong for the case of List<InputElement> elems = document.querySelector("input"); BUG= R=leafp@google.com Committed: https://github.com/dart-lang/sdk/commit/9ffe1c24509e97e20e930cebccebb4e486568cef

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -60 lines) Patch
M sdk/lib/html/dart2js/html_dart2js.dart View 1 2 9 chunks +19 lines, -20 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 1 2 10 chunks +19 lines, -20 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Document.darttemplate View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 2 6 chunks +11 lines, -11 lines 2 comments Download

Messages

Total messages: 9 (3 generated)
Jacob
Make querySelectorAll a generic method so that checked mode behavior is consistent with existing behavior ...
4 years, 8 months ago (2016-04-21 16:31:47 UTC) #2
Leaf
lgtm for the strong mode types part https://codereview.chromium.org/1904903003/diff/1/sdk/lib/html/dart2js/html_dart2js.dart File sdk/lib/html/dart2js/html_dart2js.dart (right): https://codereview.chromium.org/1904903003/diff/1/sdk/lib/html/dart2js/html_dart2js.dart#newcode10609 sdk/lib/html/dart2js/html_dart2js.dart:10609: + ElementList/*<T>*/ ...
4 years, 8 months ago (2016-04-21 16:41:01 UTC) #3
Jacob
https://codereview.chromium.org/1904903003/diff/1/sdk/lib/html/dart2js/html_dart2js.dart File sdk/lib/html/dart2js/html_dart2js.dart (right): https://codereview.chromium.org/1904903003/diff/1/sdk/lib/html/dart2js/html_dart2js.dart#newcode10609 sdk/lib/html/dart2js/html_dart2js.dart:10609: + ElementList/*<T>*/ querySelectorAll/*<T extends Element>*/(String selectors) => On 2016/04/21 ...
4 years, 8 months ago (2016-04-21 16:53:55 UTC) #4
Jacob
Committed patchset #3 (id:40001) manually as 9ffe1c24509e97e20e930cebccebb4e486568cef.
4 years, 8 months ago (2016-04-21 16:54:24 UTC) #6
Alan Knight
lgtm
4 years, 8 months ago (2016-04-21 17:03:42 UTC) #7
sra1
4 years, 8 months ago (2016-04-21 22:43:15 UTC) #9
Message was sent while issue was closed.
This pattern is currently much better tolerated by dart2js.

https://codereview.chromium.org/1904903003/diff/40001/tools/dom/templates/htm...
File tools/dom/templates/html/impl/impl_Element.darttemplate (right):

https://codereview.chromium.org/1904903003/diff/40001/tools/dom/templates/htm...
tools/dom/templates/html/impl/impl_Element.darttemplate:283: E operator [](int
index) => _nodeList[index] as E;
E _asE(Node node) {
  E element = node;
  return element;
}

E operator [](int index) => _asE(_nodeList[index]);

https://codereview.chromium.org/1904903003/diff/40001/tools/dom/templates/htm...
tools/dom/templates/html/impl/impl_Element.darttemplate:301: E get first =>
_nodeList.first as E;
=> _asE(_nodeList.first);

Powered by Google App Engine
This is Rietveld 408576698