Summary: | Web Inspector: Add PrettyPrinter CSS tests | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Wells <jonowells> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | burg, commit-queue, eric.carlson, glenn, graouts, jer.noble, joepeck, philipj, sergio, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Jonathan Wells
2014-06-17 16:51:50 PDT
Glancing at the code for some of its edge cases: - !important (should have space before) - ":" // Space in "prop: value" but not in a selectors "a:link" or "div::after" or media queries "(max-device-width:480px)". - multiple rules on one line => 2 newlines between rule declarations. (basically a bunch of minified CSS) As long as we reduce multiple spaces to a single space we're doing pretty good because CSS enforces spaces between almost all tokens. Unlike JavaScript which has lots of operators that can be smashed together without spaces. Created attachment 239246 [details]
[PATCH] Proposed Fix
Comment on attachment 239246 [details] [PATCH] Proposed Fix Clearing flags on attachment: 239246 Committed r174323: <http://trac.webkit.org/changeset/174323> All reviewed patches have been landed. Closing bug. Why aren't these done as layout tests or tool tests? Will anyone remember to run the tests? (In reply to comment #6) > Why aren't these done as layout tests or tool tests? Will anyone remember to run the tests? That is a good point. These could become layout tests. They only need to be run when we update CodeMirror, which is rare. I originally just added these as part of the tool because it was what I used for debugging and development, so it was easy and useful. We can move these. |