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

Issue 2455943003: Backend for css rule tracking (Closed)

Created:
4 years, 1 month ago by valih
Modified:
4 years, 1 month ago
Reviewers:
caseq, pfeldman, tomjamri, rune
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, caseq+blink_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, eae+blinkwatch, chromium-reviews, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, pfeldman, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

- backend code for css rule tracking - 2 new browser protocol functions : "startRuleUsageTracking" and "stopRuleUsageTracking" that also returns the rule usage list. BUG=662260 Committed: https://crrev.com/68f60f6cfa8d0b968ed9a90e2188dd84c62788e5 Cr-Commit-Position: refs/heads/master@{#429792}

Patch Set 1 #

Total comments: 39

Patch Set 2 : Backend for css rule tracking #

Total comments: 2

Patch Set 3 : Backend for css rule tracking #

Total comments: 1

Patch Set 4 : Backend for css rule tracking #

Patch Set 5 : Backend for css rule tracking #

Patch Set 6 : Backend for css rule tracking #

Total comments: 8

Patch Set 7 : Backend for css rule tracking #

Patch Set 8 : Backend for css rule tracking #

Total comments: 12

Patch Set 9 : Backend for css rule tracking #

Patch Set 10 : Backend for css rule tracking #

Total comments: 3

Patch Set 11 : Backend for css rule tracking #

Patch Set 12 : Backend for css rule tracking #

Patch Set 13 : Backend for CSS Rule tracking. #

Patch Set 14 : Backend for CSS Rule tracking. #

Patch Set 15 : Backend for CSS Rule tracking. #

Patch Set 16 : Backend for CSS Rule tracking. #

Total comments: 10

Patch Set 17 : Backend for CSS Rule tracking. #

Patch Set 18 : Backend for CSS Rule tracking. #

Total comments: 2

Patch Set 19 : Backend for CSS Rule tracking. #

Patch Set 20 : Backend for CSS Rule tracking. #

Total comments: 1

Patch Set 21 : Backend for CSS Rule tracking. #

Total comments: 2

Patch Set 22 : Backend for CSS Rule tracking. #

Total comments: 4

Patch Set 23 : Backend for CSS Rule tracking. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +54 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/css/resources/get-rule-list.css View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ElementRuleCollector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ElementRuleCollector.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 8 chunks +23 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +28 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 chunks +92 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/browser_protocol.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/CSSRule.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 88 (39 generated)
valih
4 years, 1 month ago (2016-10-27 20:42:47 UTC) #2
tomjamri
lgtm
4 years, 1 month ago (2016-10-27 20:46:41 UTC) #5
caseq
https://codereview.chromium.org/2455943003/diff/1/third_party/WebKit/Source/core/css/ElementRuleCollector.h File third_party/WebKit/Source/core/css/ElementRuleCollector.h (right): https://codereview.chromium.org/2455943003/diff/1/third_party/WebKit/Source/core/css/ElementRuleCollector.h#newcode146 third_party/WebKit/Source/core/css/ElementRuleCollector.h:146: HeapVector<MatchedRule, 32>& matchedRulesList() { return m_matchedRules; } const? https://codereview.chromium.org/2455943003/diff/1/third_party/WebKit/Source/core/css/resolver/StyleResolver.h ...
4 years, 1 month ago (2016-10-27 20:59:56 UTC) #6
valih
https://codereview.chromium.org/2455943003/diff/1/third_party/WebKit/Source/core/css/ElementRuleCollector.h File third_party/WebKit/Source/core/css/ElementRuleCollector.h (right): https://codereview.chromium.org/2455943003/diff/1/third_party/WebKit/Source/core/css/ElementRuleCollector.h#newcode146 third_party/WebKit/Source/core/css/ElementRuleCollector.h:146: HeapVector<MatchedRule, 32>& matchedRulesList() { return m_matchedRules; } On 2016/10/27 ...
4 years, 1 month ago (2016-10-27 21:41:17 UTC) #7
rune
core/css and core/dom lgtm with the mentioned return value type change. https://codereview.chromium.org/2455943003/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h File third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h (right): ...
4 years, 1 month ago (2016-10-28 09:09:41 UTC) #8
rune
On 2016/10/28 09:09:41, rune wrote: > core/css and core/dom lgtm with the mentioned return value ...
4 years, 1 month ago (2016-10-28 09:11:09 UTC) #9
valih
4 years, 1 month ago (2016-10-28 18:32:09 UTC) #11
valih
https://codereview.chromium.org/2455943003/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h File third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h (right): https://codereview.chromium.org/2455943003/diff/20001/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h#newcode18 third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h:18: const HeapHashSet<Member<StyleRule>>* getRuleList() const; On 2016/10/28 09:09:41, rune wrote: ...
4 years, 1 month ago (2016-10-28 18:32:40 UTC) #12
valih
https://codereview.chromium.org/2455943003/diff/40001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp (right): https://codereview.chromium.org/2455943003/diff/40001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp#newcode788 third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp:788: if (rule->type() != CSSRule::kStyleRule) deleted
4 years, 1 month ago (2016-10-28 18:36:57 UTC) #13
valih
4 years, 1 month ago (2016-10-29 01:01:45 UTC) #14
valih
4 years, 1 month ago (2016-10-31 17:13:47 UTC) #15
valih
added ruleType to RuleUsage object
4 years, 1 month ago (2016-10-31 18:18:00 UTC) #16
valih
https://codereview.chromium.org/2455943003/diff/100001/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js File third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js (right): https://codereview.chromium.org/2455943003/diff/100001/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js#newcode1 third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js:1: /* this file is a mistake... ignore the changes ...
4 years, 1 month ago (2016-10-31 18:59:05 UTC) #17
caseq
Looks mostly good to me. Pavel, mind having a look? https://codereview.chromium.org/2455943003/diff/100001/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html File third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html (right): https://codereview.chromium.org/2455943003/diff/100001/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html#newcode24 ...
4 years, 1 month ago (2016-10-31 19:06:06 UTC) #18
valih
4 years, 1 month ago (2016-10-31 19:30:33 UTC) #19
valih
4 years, 1 month ago (2016-10-31 20:46:27 UTC) #20
pfeldman
https://codereview.chromium.org/2455943003/diff/140001/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp File third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/2455943003/diff/140001/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp#newcode854 third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp:854: addMatchedRulesToTracker(collector); I'd pull the check into the call site: ...
4 years, 1 month ago (2016-10-31 21:03:36 UTC) #21
caseq
https://codereview.chromium.org/2455943003/diff/140001/third_party/WebKit/Source/core/dom/StyleEngine.cpp File third_party/WebKit/Source/core/dom/StyleEngine.cpp (right): https://codereview.chromium.org/2455943003/diff/140001/third_party/WebKit/Source/core/dom/StyleEngine.cpp#newcode440 third_party/WebKit/Source/core/dom/StyleEngine.cpp:440: m_resolver->setRuleUsageTracker(m_tracker); On 2016/10/31 21:03:35, pfeldman wrote: > m_resolver->setRuleUsageTracker(true); I ...
4 years, 1 month ago (2016-10-31 21:06:46 UTC) #22
valih
4 years, 1 month ago (2016-10-31 23:14:38 UTC) #23
valih
4 years, 1 month ago (2016-10-31 23:18:28 UTC) #24
caseq
https://codereview.chromium.org/2455943003/diff/180001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp (right): https://codereview.chromium.org/2455943003/diff/180001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp#newcode2533 third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp:2533: *result = protocol::Array<protocol::CSS::RuleUsage>::create(); This needs to be after bail ...
4 years, 1 month ago (2016-10-31 23:47:59 UTC) #25
valih
4 years, 1 month ago (2016-11-01 01:18:42 UTC) #26
valih
4 years, 1 month ago (2016-11-01 01:24:12 UTC) #27
caseq
lgtm, but please also get one from pfeldman
4 years, 1 month ago (2016-11-01 01:28:42 UTC) #37
valih
4 years, 1 month ago (2016-11-01 18:46:48 UTC) #38
valih
4 years, 1 month ago (2016-11-01 19:18:30 UTC) #41
valih
4 years, 1 month ago (2016-11-01 19:22:31 UTC) #42
valih
4 years, 1 month ago (2016-11-02 01:42:35 UTC) #47
valih
4 years, 1 month ago (2016-11-02 16:52:06 UTC) #52
pfeldman
https://codereview.chromium.org/2455943003/diff/320001/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h File third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h (right): https://codereview.chromium.org/2455943003/diff/320001/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h#newcode18 third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h:18: const HeapHashSet<Member<StyleRule>>& getRuleList() const; You could all "contains" into ...
4 years, 1 month ago (2016-11-02 18:38:26 UTC) #55
valih
4 years, 1 month ago (2016-11-02 19:15:38 UTC) #56
valih
4 years, 1 month ago (2016-11-02 20:26:36 UTC) #57
caseq
https://codereview.chromium.org/2455943003/diff/360001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp (right): https://codereview.chromium.org/2455943003/diff/360001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp#newcode2532 third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp:2532: InspectorCSSAgent::buildObjectForRuleUsage(CSSStyleRule* rule, bool status) { s/status/used/? https://codereview.chromium.org/2455943003/diff/360001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h ...
4 years, 1 month ago (2016-11-02 20:33:54 UTC) #58
valih
4 years, 1 month ago (2016-11-02 21:30:38 UTC) #59
valih
4 years, 1 month ago (2016-11-02 21:38:26 UTC) #61
caseq
https://codereview.chromium.org/2455943003/diff/400001/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js File third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js (right): https://codereview.chromium.org/2455943003/diff/400001/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js#newcode1017 third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js:1017: WebInspector.CSSModel.RuleUsageTracker; Why is it called tracker? Is it tracking ...
4 years, 1 month ago (2016-11-03 00:13:08 UTC) #62
valih
4 years, 1 month ago (2016-11-03 16:44:52 UTC) #63
caseq
https://codereview.chromium.org/2455943003/diff/420001/third_party/WebKit/Source/core/inspector/browser_protocol.json File third_party/WebKit/Source/core/inspector/browser_protocol.json (right): https://codereview.chromium.org/2455943003/diff/420001/third_party/WebKit/Source/core/inspector/browser_protocol.json#newcode3187 third_party/WebKit/Source/core/inspector/browser_protocol.json:3187: "description": "Enables the selector recording." "experimental": true https://codereview.chromium.org/2455943003/diff/420001/third_party/WebKit/Source/core/inspector/browser_protocol.json#newcode3190 third_party/WebKit/Source/core/inspector/browser_protocol.json:3190: ...
4 years, 1 month ago (2016-11-03 20:00:17 UTC) #64
valih
4 years, 1 month ago (2016-11-03 20:11:30 UTC) #65
pfeldman
lgtm % comment. As for the reportUsage(Tracker) you can rename your getter with matchedRuleListForInspector() if ...
4 years, 1 month ago (2016-11-03 21:23:30 UTC) #66
valih
4 years, 1 month ago (2016-11-03 22:10:26 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455943003/460001
4 years, 1 month ago (2016-11-03 22:55:46 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/99420) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 1 month ago (2016-11-03 22:59:52 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455943003/480001
4 years, 1 month ago (2016-11-03 23:29:49 UTC) #77
valih
4 years, 1 month ago (2016-11-03 23:32:31 UTC) #78
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/296567)
4 years, 1 month ago (2016-11-04 00:33:52 UTC) #80
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2455943003/480001
4 years, 1 month ago (2016-11-04 01:43:12 UTC) #83
commit-bot: I haz the power
Committed patchset #24 (id:480001)
4 years, 1 month ago (2016-11-04 05:19:51 UTC) #85
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 05:21:29 UTC) #87
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/68f60f6cfa8d0b968ed9a90e2188dd84c62788e5
Cr-Commit-Position: refs/heads/master@{#429792}

Powered by Google App Engine
This is Rietveld 408576698