Closed Bug 691978 Opened 13 years ago Closed 13 years ago

CssLogic doesn't discern between inherited and not-inherited properties.

Categories

(DevTools :: General, defect, P2)

9 Branch
x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 10

People

(Reporter: dcamp, Assigned: dcamp)

Details

(Whiteboard: [styleinspector][fixed-in-fx-team])

Attachments

(3 files)

Attached file test case
CssLogic considers a matches for parent elements for both inherited properties (such as text-align) and not-inherited properties (such as border)

Load the attached test case and look at #div2 in the style inspector.  For border-bottom-width it shows the proper computed style (0px), but shows a matched 1px selector for #div1.
Thanks for the bug report Dave!

If I recall correctly, this was a known bug at the time when we worked on CssLogic (me and Joe). Didn't we have an open bug? To make a list of props that are inherited (or something), to not consider matches those parent elements which have props that do not inherit.
Assignee: nobody → dcamp
Attached patch WIPSplinter Review
Here's a fix, will write a test case tomorrow morning.
Attachment #572395 - Flags: feedback?(mihai.sucan)
Comment on attachment 572395 [details] [diff] [review]
WIP

Review of attachment 572395 [details] [diff] [review]:
-----------------------------------------------------------------

Patch looks good!
Attachment #572395 - Flags: feedback?(mihai.sucan) → feedback+
Whiteboard: [styleinspector]
Attached patch with testsSplinter Review
Attachment #572495 - Flags: review?(mihai.sucan)
Comment on attachment 572495 [details] [diff] [review]
with tests

Review of attachment 572495 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good!

::: browser/devtools/styleinspector/test/browser/browser_csslogic_inherited.js
@@ +12,5 @@
> +{
> +  doc.body.innerHTML = '<div style="margin-left:10px; font-size: 5px"><div id="innerdiv">Inner div</div></div>';
> +  doc.title = "Style Inspector Inheritance Test";
> +
> +  cssLogic = new CssLogic();

let cssLogic = ...
Attachment #572495 - Flags: review?(mihai.sucan) → review+
https://hg.mozilla.org/integration/fx-team/rev/110ccc3eb353
Whiteboard: [styleinspector] → [styleinspector][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/110ccc3eb353
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 10
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: