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

Issue 2653643005: DevTools: simplify CSS agent's setActiveStyleSheets method (Closed)

Created:
3 years, 11 months ago by lushnikov
Modified:
3 years, 10 months ago
Reviewers:
dgozman, pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: simplify CSS agent's setActiveStyleSheets method First of all: below is a postmortem of the behavior, which happens in the bug. The exception happens because one of the matched style rules refers to the stylesheet which has never been reported to the front-end. Stylesheets are reported by the CSS.setActiveStyleSheets method. Interestingly, the CSS.setActiveStyleSheets method reports only a subset of stylesheets as "added". For example, the method doesn't report those style sheets which have already been "bound". Since getMatchedStylesForNode binds stylesheets while building a response message, a race condition occurs. -- END POSTMORTEM -- The whole logic of determining which stylesheets are added and removed was introduced in https://codereview.chromium.org/14320027. Back in the days, the bound stylesheets were (incorrectly) used as a source of "reported" stylesheets. Nowadays, thanks to the m_documentToCSSStyleSheets, we have relevant information of reported stylesheets. This patch removes all the tricks around reporting stylesheets to the front-end, since they are not needed any more. BUG=681492 R=dgozman Review-Url: https://codereview.chromium.org/2653643005 Cr-Commit-Position: refs/heads/master@{#446303} Committed: https://chromium.googlesource.com/chromium/src/+/e612b6edf5092c860e19014c7aa700ee2ec7bbbe

Patch Set 1 #

Patch Set 2 : nit #

Total comments: 4

Patch Set 3 : rebaseline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -29 lines) Patch
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h View 2 chunks +2 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 7 chunks +10 lines, -21 lines 0 comments Download

Messages

Total messages: 29 (15 generated)
lushnikov
please, take a look!
3 years, 11 months ago (2017-01-24 12:23:38 UTC) #5
pfeldman
You are rather reverting https://codereview.chromium.org/121263002, not the change you refer to. Could you explain why ...
3 years, 11 months ago (2017-01-24 16:06:37 UTC) #8
lushnikov
On 2017/01/24 16:06:37, pfeldman wrote: > You are rather reverting https://codereview.chromium.org/121263002, not the > change ...
3 years, 10 months ago (2017-01-24 23:44:01 UTC) #9
pfeldman
I'm specifically interested if you are regressing what the change that I mentioned was fixing.
3 years, 10 months ago (2017-01-25 20:16:43 UTC) #10
lushnikov
On 2017/01/25 20:16:43, pfeldman wrote: > I'm specifically interested if you are regressing what the ...
3 years, 10 months ago (2017-01-26 01:46:16 UTC) #11
pfeldman
"Do not force style sheets update on inspector start." sounds pretty clear to me.
3 years, 10 months ago (2017-01-26 01:47:15 UTC) #12
pfeldman
lgtm https://codereview.chromium.org/2653643005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp (left): https://codereview.chromium.org/2653643005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp#oldcode807 third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp:807: if (isInitialFrontendLoad) Ok, reading out loud here. isInitialFrontendLoad ...
3 years, 10 months ago (2017-01-26 01:55:14 UTC) #14
lushnikov
https://codereview.chromium.org/2653643005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp (left): https://codereview.chromium.org/2653643005/diff/20001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp#oldcode828 third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp:828: bool isNew = isInitialFrontendLoad || On 2017/01/26 01:55:14, pfeldman ...
3 years, 10 months ago (2017-01-26 01:59:37 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/2653643005/20001
3 years, 10 months ago (2017-01-26 02:11:36 UTC) #17
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-01-26 03:45:23 UTC) #19
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/2653643005/40001
3 years, 10 months ago (2017-01-26 08:52:18 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220834)
3 years, 10 months ago (2017-01-26 10:11:00 UTC) #24
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/2653643005/40001
3 years, 10 months ago (2017-01-26 10:18:13 UTC) #26
commit-bot: I haz the power
3 years, 10 months ago (2017-01-26 11:49:48 UTC) #29
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/e612b6edf5092c860e19014c7aa7...

Powered by Google App Engine
This is Rietveld 408576698