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

Issue 1096813005: Extending the NthIndexCache to support caching for the type of index. (Closed)

Created:
5 years, 8 months ago by a.berwal
Modified:
5 years, 7 months ago
Reviewers:
esprehn, rune
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, ed+blinkwatch_opera.com, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Extending the NthIndexCache to support caching for the type of index. we have a cache for :nth-child/:nth-last-child indices called NthIndexCache but for :nth-of-type/:nth-last-of-type we always count siblings. So implementing cache for latter. BUG=475720 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195034

Patch Set 1 #

Patch Set 2 : Incorporating Review Comments #

Patch Set 3 : Patch with new design #

Total comments: 10

Patch Set 4 : Incorporating Review Comments #

Patch Set 5 : fixing some nits #

Patch Set 6 : Adding Layout Tests #

Total comments: 3

Patch Set 7 : Incorporated Review Comments #

Total comments: 1

Patch Set 8 : Fixing nit #

Patch Set 9 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -11 lines) Patch
A LayoutTests/fast/css/nth-child-and-nth-type-child.html View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/nth-child-and-nth-type-child-expected.html View 1 2 3 4 5 6 1 chunk +41 lines, -0 lines 0 comments Download
M Source/core/css/SiblingTraversalStrategies.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -9 lines 0 comments Download
M Source/core/dom/NthIndexCache.h View 1 2 3 4 5 6 7 6 chunks +59 lines, -2 lines 0 comments Download
M Source/core/dom/NthIndexCache.cpp View 1 2 3 4 5 6 2 chunks +45 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (12 generated)
rune
You are using the same cache entries for :nth-child and :nth-of-type. That's not going to ...
5 years, 8 months ago (2015-04-20 12:30:55 UTC) #3
a.berwal
On 2015/04/20 12:30:55, rune wrote: Have mode some changes. PTAL.
5 years, 8 months ago (2015-04-21 10:35:07 UTC) #4
rune
On 2015/04/21 10:35:07, a.berwal wrote: > On 2015/04/20 12:30:55, rune wrote: > > Have mode ...
5 years, 8 months ago (2015-04-21 11:23:57 UTC) #5
a.berwal
@rune, PTAL.
5 years, 8 months ago (2015-04-28 03:11:14 UTC) #6
rune
You need to add some tests. In particular combinations of :nth-of-type and :nth-child for the ...
5 years, 8 months ago (2015-04-28 09:02:05 UTC) #7
a.berwal
I have uploaded a new image on BUG=475720.Are you saying the same?
5 years, 7 months ago (2015-04-29 03:55:31 UTC) #8
esprehn
https://codereview.chromium.org/1096813005/diff/40001/Source/core/dom/NthIndexCache.cpp File Source/core/dom/NthIndexCache.cpp (right): https://codereview.chromium.org/1096813005/diff/40001/Source/core/dom/NthIndexCache.cpp#newcode38 Source/core/dom/NthIndexCache.cpp:38: NthIndexCache::ElementTagNameAndNthIndexMap& NthIndexCache::ensureElementTagNameAndNthIndexMapForType(Node& parent) ensureTypeIndexMap(parent). https://codereview.chromium.org/1096813005/diff/40001/Source/core/dom/NthIndexCache.cpp#newcode72 Source/core/dom/NthIndexCache.cpp:72: unsigned NthIndexCache::NthIndexData::cacheNthIndicesOfType(Element& element, ...
5 years, 7 months ago (2015-04-30 04:55:05 UTC) #9
a.berwal
@esprehn Incorporated the changes.PTAL
5 years, 7 months ago (2015-04-30 09:36:22 UTC) #10
rune
My idea was to store a pair of indices <nth-index, nth-of-type-index> in the hash map ...
5 years, 7 months ago (2015-04-30 10:04:29 UTC) #11
a.berwal
Added Layout Test. PTAL
5 years, 7 months ago (2015-05-04 07:12:46 UTC) #12
rune
https://chromiumcodereview.appspot.com/1096813005/diff/100001/LayoutTests/fast/css/nth-child-and-nth-type-child-expected.html File LayoutTests/fast/css/nth-child-and-nth-type-child-expected.html (right): https://chromiumcodereview.appspot.com/1096813005/diff/100001/LayoutTests/fast/css/nth-child-and-nth-type-child-expected.html#newcode3 LayoutTests/fast/css/nth-child-and-nth-type-child-expected.html:3: <body> Drop html and body. https://chromiumcodereview.appspot.com/1096813005/diff/100001/LayoutTests/fast/css/nth-child-and-nth-type-child.html File LayoutTests/fast/css/nth-child-and-nth-type-child.html (right): ...
5 years, 7 months ago (2015-05-04 08:32:49 UTC) #13
a.berwal
Incorporated the Review Comments. PTAL
5 years, 7 months ago (2015-05-04 09:21:43 UTC) #14
rune
lgtm, but I think there are outstanding issues from esprehn, like making NthIndexData not a ...
5 years, 7 months ago (2015-05-04 09:25:48 UTC) #15
a.berwal
On 2015/05/04 09:25:48, rune wrote: > lgtm, but I think there are outstanding issues from ...
5 years, 7 months ago (2015-05-04 09:28:15 UTC) #16
rune
On 2015/05/04 09:28:15, a.berwal wrote: > On 2015/05/04 09:25:48, rune wrote: > > lgtm, but ...
5 years, 7 months ago (2015-05-04 09:29:37 UTC) #17
a.berwal
esprehn@ PTAL.
5 years, 7 months ago (2015-05-04 09:54:58 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1096813005/120001
5 years, 7 months ago (2015-05-07 03:15:42 UTC) #20
esprehn
lgtm, please fix the variable name before committing. I think we might want to reconsider ...
5 years, 7 months ago (2015-05-07 04:16:11 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1096813005/140001
5 years, 7 months ago (2015-05-07 05:21:03 UTC) #26
commit-bot: I haz the power
Failed to apply patch for Source/core/css/SiblingTraversalStrategies.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
5 years, 7 months ago (2015-05-07 06:53:26 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1096813005/160001
5 years, 7 months ago (2015-05-07 07:14:33 UTC) #33
commit-bot: I haz the power
5 years, 7 months ago (2015-05-07 08:38:37 UTC) #34
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=195034

Powered by Google App Engine
This is Rietveld 408576698