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

Issue 1155393002: Refactor matched rule ranges. (Closed)

Created:
5 years, 7 months ago by rune
Modified:
5 years, 6 months ago
Reviewers:
Timothy Loh, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Refactor matched rule ranges. For matched CSS rules we need to know where the UA rules end and the author rules begin. This CL simplifies this by having a single index for the last UA rule. -1 means there are no UA rules, otherwise it's the index of the last UA rule in the array. Convenience methods are added to return the first/last rule indices for UA and author rules. The rule ranges used to be updated for every added rule. Now, just update the last UA rule index when sorting and transferring UA rules. That means we don't have to pass the ranges as parameters anymore. R=timloh@chromium.org,esprehn@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196036

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -81 lines) Patch
M Source/core/css/ElementRuleCollector.h View 1 chunk +5 lines, -5 lines 1 comment Download
M Source/core/css/ElementRuleCollector.cpp View 9 chunks +20 lines, -27 lines 0 comments Download
M Source/core/css/PageRuleCollector.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/MatchResult.h View 2 chunks +11 lines, -21 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 chunk +3 lines, -6 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 9 chunks +17 lines, -21 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
rune
5 years, 7 months ago (2015-05-27 14:59:37 UTC) #1
Timothy Loh
lgtm Can we (in a separate patch) make the ranges use begin/end instead of first/last? ...
5 years, 7 months ago (2015-05-28 00:18:39 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155393002/1
5 years, 7 months ago (2015-05-28 06:28:14 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=196036
5 years, 7 months ago (2015-05-28 06:31:52 UTC) #5
rune
On 2015/05/28 00:18:39, Timothy Loh wrote: > lgtm > > Can we (in a separate ...
5 years, 6 months ago (2015-05-28 09:58:45 UTC) #6
esprehn
5 years, 6 months ago (2015-06-02 03:19:36 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1155393002/diff/1/Source/core/css/ElementRule...
File Source/core/css/ElementRuleCollector.h (right):

https://codereview.chromium.org/1155393002/diff/1/Source/core/css/ElementRule...
Source/core/css/ElementRuleCollector.h:121: const MatchResult& matchedResult();
matchResult() const; ?

Powered by Google App Engine
This is Rietveld 408576698