Bug 146776 - Web Inspector: Checkbox disappears when unchecking CSS background style
Summary: Web Inspector: Checkbox disappears when unchecking CSS background style
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-08 23:16 PDT by Devin Rousso
Modified: 2015-07-09 12:26 PDT (History)
8 users (show)

See Also:


Attachments
Test HTML Page (1.69 KB, text/html)
2015-07-08 23:16 PDT, Devin Rousso
no flags Details
Patch (5.79 KB, patch)
2015-07-08 23:22 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (5.73 KB, patch)
2015-07-09 11:30 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2015-07-08 23:16:06 PDT
Created attachment 256461 [details]
Test HTML Page

Safari's web inspector CSS editor removes the checkbox on certain styles when clicked.

* STEPS TO REPRODUCE
1. Open the attached HTML file (16214480.html)
2. Safari > Develop > Show Web Inspector > Inspect, click the div
3. Try unchecking each of the styles in the CSS editor, then rechecking them

* RESULTS
When you uncheck 'background', the checkbox you unchecked vanishes.
This makes it difficult to re-enable the style.
The problem does not occur with the other style ('color')

Expected: checkboxes shouldn't mysteriously disappear

* REGRESSION
Tested on 13D11, Safari 7.0.2

* NOTES
This problem does not occur in Google Chrome (tested on 33.0.1750.117), the checkboxes are always usable.

Semi-workaround for Safari is to position the cursor in the /* background: ... */, and delete the leading "/*". This re-enables the style, but you have to be sure to also remove the trailing "*/".
Comment 1 Devin Rousso 2015-07-08 23:16:20 PDT
<rdar://problem/16214480>
Comment 2 Devin Rousso 2015-07-08 23:22:08 PDT
Created attachment 256463 [details]
Patch
Comment 3 Timothy Hatcher 2015-07-09 11:03:18 PDT
Comment on attachment 256463 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:820
> +    _createCommentedCheckboxMarker(lineHandler)

Nit: lineHandle
Comment 4 Devin Rousso 2015-07-09 11:30:38 PDT
Created attachment 256493 [details]
Patch
Comment 5 WebKit Commit Bot 2015-07-09 12:26:32 PDT
Comment on attachment 256493 [details]
Patch

Clearing flags on attachment: 256493

Committed r186602: <http://trac.webkit.org/changeset/186602>
Comment 6 WebKit Commit Bot 2015-07-09 12:26:35 PDT
All reviewed patches have been landed.  Closing bug.