If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Inactive properties with !important; created in ruleview make other rules look not applied

RESOLVED FIXED in Firefox 49

Status

()

Firefox
Developer Tools: CSS Rules Inspector
P2
normal
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: arni2033, Assigned: nchevobbe)

Tracking

Trunk
Firefox 49
Points:
---

Firefox Tracking Flags

(firefox47 affected, firefox49 fixed)

Details

(Whiteboard: [btpp-fix-later], URL)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
>>>   My Info:   Win7_64, Nightly 47, 32bit, ID 20160229030448
STR:
1. Open the following "data:" url or click URL in the form above
>   data:text/html,<input class="I"><style>.I{background:lightgray}
2. Open Inspector, focus <input> node in markup, open "Rules" tab in sidebar
3. Click [+] button  ("Add new rule")   [ruleview suggests to edit selector]
4.A) Type ".I:hover" instead of suggested selector, press Enter
4.B) Type "div" instead of suggested selector, press Enter
5. Type "background:red !important;" to create a new rule

AR:
 New rule created in Step 5 is not applied but looks applied in ruleview
 Existing rule ".I{background:lightgray}" looks not applied

ER:
 New rule created in Step 5 should look not applied in ruleview
 Existing rule ".I{background:lightgray}" should look applied in ruleview
Comment hidden (spam)
Priority: -- → P2
Whiteboard: [btpp-fix-later]
Blocks: 1264624
(Assignee)

Updated

a year ago
Assignee: nobody → chevobbe.nicolas
(Assignee)

Updated

a year ago
Status: NEW → ASSIGNED
(Assignee)

Comment 2

a year ago
Created attachment 8756818 [details]
MozReview Request: Bug 1253869 - Don't assume that rule in the Rules view match the selected node when checking for overidden properties. r=gl

Unmatched rules created via the "Add New Rule" button was wrongfully make other rules look not applied.
Fix returned isMatching boolean in PageStyleActor's function when the evaluated rule has multiple selectors.
Add CSS rules to make look unmatched rules' properties unmatched, like the rule's selector.
Add tests to make sur we handle unmatch rule selectors right.

Review commit: https://reviewboard.mozilla.org/r/55422/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/55422/
Attachment #8756818 - Flags: review?(gl)
(Assignee)

Comment 3

a year ago
Comment on attachment 8756818 [details]
MozReview Request: Bug 1253869 - Don't assume that rule in the Rules view match the selected node when checking for overidden properties. r=gl

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55422/diff/1-2/
Comment on attachment 8756818 [details]
MozReview Request: Bug 1253869 - Don't assume that rule in the Rules view match the selected node when checking for overidden properties. r=gl

https://reviewboard.mozilla.org/r/55422/#review52250

::: devtools/client/inspector/rules/test/browser_rules_edit-selector_09.js:7
(Diff revision 2)
> +/* Any copyright is dedicated to the Public Domain.
> + http://creativecommons.org/publicdomain/zero/1.0/ */
> +
> +"use strict";
> +
> +// Tests that adding a new property of an unmatched rule works properly.

There are really 3 different tests happening including adding a new property:
(1) editing a selector to an unmatched rule
(2) adding a new property
(3) adding a new matched rule

::: devtools/client/inspector/rules/test/browser_rules_edit-selector_09.js:26
(Diff revision 2)
> +
> +add_task(function* () {
> +  yield addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
> +  let {inspector, view} = yield openRuleView();
> +
> +  info("Selecting the test element");

Remove this info since it is repeats the same thing as selectNode().
Attachment #8756818 - Flags: review?(gl) → review+
(Assignee)

Comment 5

a year ago
Comment on attachment 8756818 [details]
MozReview Request: Bug 1253869 - Don't assume that rule in the Rules view match the selected node when checking for overidden properties. r=gl

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55422/diff/2-3/
(Assignee)

Comment 6

a year ago
TRY seem okay https://treeherder.mozilla.org/#/jobs?repo=try&revision=4dad418dcc9a
Keywords: checkin-needed

Comment 7

a year ago
https://hg.mozilla.org/integration/fx-team/rev/7275ea886739
Keywords: checkin-needed

Comment 8

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7275ea886739
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
No longer blocks: 1264624
You need to log in before you can comment on or make changes to this bug.