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

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

Created:
3 years, 10 months ago by lushnikov
Modified:
3 years, 10 months ago
Reviewers:
dgozman
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2987
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} (cherry picked from commit e612b6edf5092c860e19014c7aa700ee2ec7bbbe) Review-Url: https://codereview.chromium.org/2703473004 . Cr-Commit-Position: refs/branch-heads/2987@{#565} Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943} Committed: https://chromium.googlesource.com/chromium/src/+/5a5252aba63f3f5a26e2261ede9fa5dc252a6a8f

Patch Set 1 #

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 7 chunks +10 lines, -21 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
lushnikov
3 years, 10 months ago (2017-02-16 22:57:34 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
5a5252aba63f3f5a26e2261ede9fa5dc252a6a8f.

Powered by Google App Engine
This is Rietveld 408576698