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

Issue 2312953002: Store a single inspector stylesheet hidden from CSSOM. (Closed)

Created:
4 years, 3 months ago by rune
Modified:
4 years, 3 months ago
Reviewers:
lushnikov, pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, blink-reviews-style_chromium.org, blink-reviews-dom_chromium.org, sof, eae+blinkwatch, 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/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Store a single inspector stylesheet hidden from CSSOM. Custom style rules can be added via the inspector. These were stored in a stylesheet appended to <head>. That meant it was visible to the document via CSSOM. Also, enabling/disabling the inspector would not remember that a stylesheet was added, so the inspector started out with a new blank stylesheet for editing, yet the existing rules still applied. This CL introduces a single inspector stylesheet in the StyleEngine which takes part in the document collection to apply the rules, but it is not appended to the document.styleSheets list. Neither is it accessible through a <style> element in the DOM. The stylesheet ends up after the author stylesheets in the order of appearance. That is similar to how it was, but previously, sheets in <body> would appear after the inspector sheet while sheets in <head> would appear before. The inspector sheet source is stored in a resource container like changes for author stylesheets. This means the inspector sheet source will persist across inspector enable/disable. R=pfeldman@chromium.org,lushnikov@chromium.org BUG=624139 TEST=http/tests/inspector-enabled/reattach-after-editing-styles.html Committed: https://crrev.com/af38b2ad3019b41ee420097c6d81a5cebda7dadc Cr-Commit-Position: refs/heads/master@{#417021}

Patch Set 1 #

Patch Set 2 : Incorrect removal. #

Total comments: 1

Messages

Total messages: 16 (10 generated)
rune
ptal https://codereview.chromium.org/2312953002/diff/20001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp (left): https://codereview.chromium.org/2312953002/diff/20001/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp#oldcode1792 third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp:1792: m_documentToViaInspectorStyleSheet.remove(document); Should I just remove the didRemoveDocument method ...
4 years, 3 months ago (2016-09-06 22:36:48 UTC) #7
pfeldman
lgtm
4 years, 3 months ago (2016-09-07 18:35:16 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/2312953002/20001
4 years, 3 months ago (2016-09-07 19:09:13 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-07 19:14:12 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/af38b2ad3019b41ee420097c6d81a5cebda7dadc Cr-Commit-Position: refs/heads/master@{#417021}
4 years, 3 months ago (2016-09-07 19:17:23 UTC) #15
lushnikov
4 years, 3 months ago (2016-09-07 21:34:11 UTC) #16
Message was sent while issue was closed.
thank you for the patch, lgtm

Powered by Google App Engine
This is Rietveld 408576698