Bug 64074

Summary: Web Inspector: CSS inspector gets confused about specificity of !important properties
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, simon.fraser, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Suggested fix
none
[PATCH] Unnecessary comment removed none

Pavel Feldman
Reported 2011-07-07 01:40:11 PDT
<Upstreaming from http://code.google.com/p/chromium/issues/detail?id=88345> Chrome Version : 14.0.803.0 (Official Build 90483) dev URLs (if applicable) : See attached test case. Other browsers tested: Firefox 3.6.18: OK What steps will reproduce the problem? 1. Open attached HTML document. 2. Inspect the "I should be green italic" span. 3. Specifically look at which properties have strikethrough. What is the expected result? The more specific rule (".outer span.middle.modifier > span") should take precedence over the less specific one. Indeed, WebKit renders this correctly. When inspecting the green span, both properties from the less specific rule should be stricken through. What happens instead? The inspector is confused, and shows a strikethrough "color: green !important". This happens only with !important properties. The font-style property is only there to illustrate this. If you change it to !important (in both rules), it'll exhibit the same wrong behavior.
Attachments
[PATCH] Suggested fix (6.86 KB, patch)
2011-07-08 06:45 PDT, Alexander Pavlov (apavlov)
no flags
[PATCH] Unnecessary comment removed (6.76 KB, patch)
2011-07-08 06:55 PDT, Alexander Pavlov (apavlov)
no flags
Alexander Pavlov (apavlov)
Comment 1 2011-07-08 06:45:01 PDT
Created attachment 100114 [details] [PATCH] Suggested fix
Pavel Feldman
Comment 2 2011-07-08 06:50:36 PDT
Comment on attachment 100114 [details] [PATCH] Suggested fix View in context: https://bugs.webkit.org/attachment.cgi?id=100114&action=review > Source/WebCore/inspector/front-end/StylesSidebarPane.js:457 > + // FIXME: Will same-specificity rules be reported in reverse order (the active one first), too? Could you check this?
Alexander Pavlov (apavlov)
Comment 3 2011-07-08 06:55:58 PDT
Created attachment 100115 [details] [PATCH] Unnecessary comment removed
Alexander Pavlov (apavlov)
Comment 4 2011-07-08 06:56:36 PDT
(In reply to comment #2) > (From update of attachment 100114 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=100114&action=review > > > Source/WebCore/inspector/front-end/StylesSidebarPane.js:457 > > + // FIXME: Will same-specificity rules be reported in reverse order (the active one first), too? > > Could you check this? Yes, the code works correctly in this case, too. Sorry about the confusion.
WebKit Review Bot
Comment 5 2011-07-08 07:51:14 PDT
Comment on attachment 100115 [details] [PATCH] Unnecessary comment removed Clearing flags on attachment: 100115 Committed r90630: <http://trac.webkit.org/changeset/90630>
WebKit Review Bot
Comment 6 2011-07-08 07:51:18 PDT
All reviewed patches have been landed. Closing bug.
Alexander Pavlov (apavlov)
Comment 7 2011-07-14 01:42:04 PDT
*** Bug 62656 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.