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

RESOLVED FIXED in Firefox 10

Status

()

Firefox
Developer Tools
P2
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dcamp, Assigned: dcamp)

Tracking

9 Branch
Firefox 10
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(3 attachments)

(Assignee)

Description

6 years ago
Created attachment 564704 [details]
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)

Updated

6 years ago
Assignee: nobody → dcamp
(Assignee)

Comment 2

6 years ago
Created attachment 572395 [details] [diff] [review]
WIP

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]
(Assignee)

Comment 4

6 years ago
Created attachment 572495 [details] [diff] [review]
with tests
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+
(Assignee)

Comment 6

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 10
You need to log in before you can comment on or make changes to this bug.