Last Comment Bug 691978 - CssLogic doesn't discern between inherited and not-inherited properties.
: CssLogic doesn't discern between inherited and not-inherited properties.
Status: RESOLVED FIXED
[styleinspector][fixed-in-fx-team]
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: 9 Branch
: x86 Mac OS X
: P2 normal (vote)
: Firefox 10
Assigned To: Dave Camp (:dcamp)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-04 16:50 PDT by Dave Camp (:dcamp)
Modified: 2011-11-07 14:55 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
test case (404 bytes, text/html)
2011-10-04 16:50 PDT, Dave Camp (:dcamp)
no flags Details
WIP (1.72 KB, patch)
2011-11-06 22:19 PST, Dave Camp (:dcamp)
mihai.sucan: feedback+
Details | Diff | Splinter Review
with tests (3.98 KB, patch)
2011-11-07 09:15 PST, Dave Camp (:dcamp)
mihai.sucan: review+
Details | Diff | Splinter Review

Description Dave Camp (:dcamp) 2011-10-04 16:50:04 PDT
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.
Comment 1 Mihai Sucan [:msucan] 2011-10-05 10:20:04 PDT
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.
Comment 2 Dave Camp (:dcamp) 2011-11-06 22:19:52 PST
Created attachment 572395 [details] [diff] [review]
WIP

Here's a fix, will write a test case tomorrow morning.
Comment 3 Mihai Sucan [:msucan] 2011-11-07 03:35:37 PST
Comment on attachment 572395 [details] [diff] [review]
WIP

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

Patch looks good!
Comment 4 Dave Camp (:dcamp) 2011-11-07 09:15:46 PST
Created attachment 572495 [details] [diff] [review]
with tests
Comment 5 Mihai Sucan [:msucan] 2011-11-07 09:29:53 PST
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 = ...
Comment 7 Rob Campbell [:rc] (:robcee) 2011-11-07 14:55:45 PST
https://hg.mozilla.org/mozilla-central/rev/110ccc3eb353

Note You need to log in before you can comment on or make changes to this bug.