Chromium Code Reviews
DescriptionDevTools: 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 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||