DescriptionStore 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
Dependent Patchsets: Messages
Total messages: 16 (10 generated)
|