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

Issue 1129333002: Indices passed to FilteredElementList public functions should consistently refer to element indices (Closed)

Created:
5 years, 7 months ago by almstrand
Modified:
5 years, 5 months ago
Reviewers:
Alan Knight
CC:
reviews_dartlang.org, sra1
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Please refer to https://code.google.com/p/dart/issues/detail?id=23418 for the bug reportincluding a WebStorm project which demonstrates the problem. This proposal includes a fix to ensure that indices passed to the public functions defined in class FilteredElementList of the dart:html package consistently refer to element indices (not element indices sometimes, and node indices other times). Without this change, it is not possible to reliably insert elements relative to other elements. This can be problematic as the order of HTML elements must be guaranteed to ensure elements appear where expected in a normal page flow. This proposal also address the TODO in file sdk/lib/html/html_common/filtered_element_list.dart to avoid excessively creating/allocating a filtered list of elements from nodes whenever calling [], every, any, length, etc. The implementation is less concise but should result in much reduced memory allocation and speed improvements. R=alanknight@google.com Committed: https://github.com/dart-lang/sdk/commit/3b125d3bc9cc4d0f6f6a3ad2e0f6c8367128d8b8

Patch Set 1 #

Total comments: 17

Patch Set 2 : Test cases and patch for Dart issue 23418 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -4 lines) Patch
M sdk/lib/html/html_common/filtered_element_list.dart View 1 2 chunks +6 lines, -4 lines 0 comments Download
A tests/html/filteredelementlist_test.dart View 1 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Alan Knight
Thanks. A definite bug, which needs fixing. A few questions though, particularly on the performance ...
5 years, 7 months ago (2015-05-13 22:08:15 UTC) #2
almstrand
Thanks, I have not benchmarked the proposed implementation. Considering the potentially large number of List ...
5 years, 7 months ago (2015-05-14 06:34:45 UTC) #3
Alan Knight
General commentary, haven't had a chance to go over the specific items yet. The way ...
5 years, 7 months ago (2015-05-15 19:30:57 UTC) #4
almstrand
Thanks for the feedback and for taking time to clarify the process. I agree with ...
5 years, 7 months ago (2015-05-15 21:26:09 UTC) #5
Alan Knight
lgtm Sorry for the delay in review, I've been away. I also ran the formatter ...
5 years, 5 months ago (2015-07-14 21:46:24 UTC) #6
Alan Knight
5 years, 5 months ago (2015-07-14 21:50:47 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
3b125d3bc9cc4d0f6f6a3ad2e0f6c8367128d8b8 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698