Bug 49960 - Web Inspector: [STYLES] invalid color values are not marked as such.
Summary: Web Inspector: [STYLES] invalid color values are not marked as such.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 22:34 PST by Pavel Feldman
Modified: 2010-11-23 10:32 PST (History)
10 users (show)

See Also:


Attachments
[PATCH] Suggested fix (4.37 KB, patch)
2010-11-23 03:39 PST, Alexander Pavlov (apavlov)
pfeldman: review-
Details | Formatted Diff | Diff
[PATCH] Corrected solution (7.85 KB, patch)
2010-11-23 09:17 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2010-11-22 22:34:07 PST
Edit any color: in style and set its value to "red foo bar":

color: red foo bar

Expected: color value is committed, bogus value is not used when rendering, there is a warning icon next to property
Actual: color value is committed, bogus value is not used when rendering, but there is no warning icon is there
Comment 1 Alexander Pavlov (apavlov) 2010-11-23 03:39:01 PST
Created attachment 74638 [details]
[PATCH] Suggested fix
Comment 2 Pavel Feldman 2010-11-23 04:17:21 PST
Comment on attachment 74638 [details]
[PATCH] Suggested fix

As you noted offline, overrides will make invalid property look parsedOk.
Comment 3 Alexander Pavlov (apavlov) 2010-11-23 09:17:21 PST
Created attachment 74676 [details]
[PATCH] Corrected solution
Comment 4 Pavel Feldman 2010-11-23 10:00:06 PST
Comment on attachment 74676 [details]
[PATCH] Corrected solution

View in context: https://bugs.webkit.org/attachment.cgi?id=74676&action=review

> WebCore/inspector/InspectorStyleSheet.cpp:448
> +                bool shouldInactivate = false;

Please add following comment here:
Parsed property overrides any property with the same name. Non-parsed property overrides previous non-parsed property with the same name.
Comment 5 Alexander Pavlov (apavlov) 2010-11-23 10:31:52 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       LayoutTests/ChangeLog
        M       LayoutTests/inspector/resources/styles-new-API.css
        M       LayoutTests/inspector/styles-new-API-expected.txt
        M       LayoutTests/inspector/styles-source-offsets-expected.txt
        M       WebCore/ChangeLog
        M       WebCore/css/CSSGrammar.y
        M       WebCore/inspector/InspectorStyleSheet.cpp
Committed r72615