Bug 1291306 - update highlighter CSS selector to avoid leaking styles to content;r=ntim
Even though the pseudo :-moz-native-anonymous is only available for chrome content, elements
such as INPUT tags were impacted by the reset styles defined with the selector ":-moz-native-anonymous"
The selector has to be specialized in order to make sure it only impacts devtools elements.
MozReview-Commit-ID: HeHx9i6RJiq
--- a/devtools/server/actors/highlighters.css
+++ b/devtools/server/actors/highlighters.css
@@ -1,24 +1,26 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
The :-moz-native-anonymous selector prefix prevents the styles defined here
- from impacting web content.
- Indeed, this pseudo-class is only available to chrome code.
+ from impacting web content. Indeed, this pseudo-class is only available to chrome code.
This stylesheet is loaded as a ua stylesheet via the addon sdk, so having this
pseudo-class is important.
Having bug 1086532 fixed would make it possible to load this stylesheet in a
<style scoped> node instead, directly in the native anonymous container
element.
+
+ A specific selector should still be specified to avoid impacting non-devtools
+ chrome content.
*/
-:-moz-native-anonymous {
+:-moz-native-anonymous .highlighter-container {
/*
Content CSS applying to the html element impact the highlighters.
To avoid that, possible cases have been set to initial.
*/
text-transform: initial;
text-indent: initial;
letter-spacing: initial;
word-spacing: initial;