mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1033082 - Display exact line numbers for rules in @media sidebar. r=bgrins
This commit is contained in:
parent
53785f5afe
commit
f727ad78df
@ -8,7 +8,7 @@ const MEDIA_PREF = "devtools.styleeditor.showMediaSidebar";
|
||||
|
||||
const RESIZE = 300;
|
||||
const LABELS = ["not all", "all", "(max-width: 400px)", "(max-width: 600px)"];
|
||||
const LINE_NOS = [2, 8, 20, 25];
|
||||
const LINE_NOS = [1, 7, 19, 25];
|
||||
const NEW_RULE = "\n@media (max-width: 600px) { div { color: blue; } }";
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
@ -8,7 +8,7 @@ const MAP_PREF = "devtools.styleeditor.source-maps-enabled";
|
||||
|
||||
const LABELS = ["screen and (max-width: 320px)",
|
||||
"screen and (min-width: 1200px)"];
|
||||
const LINE_NOS = [4, 4];
|
||||
const LINE_NOS = [5, 8];
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
@ -304,16 +304,8 @@ let MediaRuleActor = protocol.ActorClass({
|
||||
|
||||
this._matchesChange = this._matchesChange.bind(this);
|
||||
|
||||
this.line = 0;
|
||||
this.column = 0;
|
||||
|
||||
// We can't get the line of the @media rule itself, so get the line of
|
||||
// the first rule in the media block. See bug 591303.
|
||||
let firstRule = this.rawRule.cssRules[0];
|
||||
if (firstRule && firstRule instanceof Ci.nsIDOMCSSStyleRule) {
|
||||
this.line = DOMUtils.getRuleLine(firstRule);
|
||||
this.column = DOMUtils.getRuleColumn(firstRule);
|
||||
}
|
||||
this.line = DOMUtils.getRuleLine(aMediaRule);
|
||||
this.column = DOMUtils.getRuleColumn(aMediaRule);
|
||||
|
||||
try {
|
||||
this.mql = this.window.matchMedia(aMediaRule.media.mediaText);
|
||||
|
Loading…
Reference in New Issue
Block a user