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

Issue 2759703003: DevTools: add support for polling for coverage data in CSS agent (Closed)

Created:
3 years, 9 months ago by caseq
Modified:
3 years, 9 months ago
Reviewers:
alph, pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, blink-reviews-style_chromium.org, blink-reviews-css, darktears, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, rwlbuis, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: add support for polling for coverage data in CSS agent This adds takeCoverageDelta() which may be used to obtain newly used rules plus used and unused rules from newly added styleshteets. The data returned by CSS.stopRuleUsageTracking are now delta since the last invocation of the above method. Review-Url: https://codereview.chromium.org/2759703003 Cr-Commit-Position: refs/heads/master@{#459566} Committed: https://chromium.googlesource.com/chromium/src/+/8a29ed05232f634a4ba33d1930a5c3ef8aaee0f5

Patch Set 1 #

Total comments: 4

Patch Set 2 : got rid of m_unusedRulesToCSSRules map as per pfeldman's suggestions #

Total comments: 2

Patch Set 3 : do not report zero ranges altogether #

Patch Set 4 : moved ranges sorting so it also works for CSS ranges #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -115 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html View 1 1 chunk +99 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll-expected.txt View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-rule-list-expected.txt View 1 2 1 chunk +1 line, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/inspector-protocol/css/resources/coverage.css View 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector-protocol/css/resources/coverage2.css View 1 chunk +14 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/inspector-protocol/css/resources/get-rule-list.css View 1 chunk +0 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/css/ElementRuleCollector.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.cpp View 1 2 1 chunk +22 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 3 3 chunks +42 lines, -54 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp View 1 2 4 chunks +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/browser_protocol.json View 1 2 3 2 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/coverage/CoverageModel.js View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
caseq
3 years, 9 months ago (2017-03-18 00:04:24 UTC) #2
caseq
3 years, 9 months ago (2017-03-20 17:48:19 UTC) #4
pfeldman
protocol lgtm
3 years, 9 months ago (2017-03-20 18:36:55 UTC) #5
alph
https://codereview.chromium.org/2759703003/diff/1/third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html File third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html (right): https://codereview.chromium.org/2759703003/diff/1/third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html#newcode42 third_party/WebKit/LayoutTests/inspector-protocol/css/css-coverage-poll.html:42: if (!response.result) { nit: if (result) dump... https://codereview.chromium.org/2759703003/diff/1/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File ...
3 years, 9 months ago (2017-03-20 20:48:31 UTC) #6
caseq
ptal, altered as per Pavel's suggestions
3 years, 9 months ago (2017-03-21 00:21:06 UTC) #7
pfeldman
Can we stop reporting zeros? https://codereview.chromium.org/2759703003/diff/20001/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp File third_party/WebKit/Source/core/css/ElementRuleCollector.cpp (right): https://codereview.chromium.org/2759703003/diff/20001/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp#newcode382 third_party/WebKit/Source/core/css/ElementRuleCollector.cpp:382: tracker->track(matchedRule.ruleData()->rule(), nit: swap parameters ...
3 years, 9 months ago (2017-03-21 18:04:16 UTC) #8
caseq
all done, ptal!
3 years, 9 months ago (2017-03-23 00:24:51 UTC) #9
pfeldman
lgtm
3 years, 9 months ago (2017-03-24 00:46:38 UTC) #10
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/2759703003/60001
3 years, 9 months ago (2017-03-24 17:51:18 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/390880)
3 years, 9 months ago (2017-03-24 19:20:10 UTC) #15
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/2759703003/60001
3 years, 9 months ago (2017-03-24 19:31:19 UTC) #17
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 21:51:37 UTC) #20
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/8a29ed05232f634a4ba33d1930a5...

Powered by Google App Engine
This is Rietveld 408576698