Bug 139206

Summary: Web Inspector: CSS Minification breaks some selectors with colons
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, graouts, joepeck, simon.fraser, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix - Fixed typos none

Description Joseph Pecoraro 2014-12-02 15:44:25 PST
* SUMMARY
Production builds have broken styles. Selectors with colons that may be preceded by a space (e.g. :matches, :not, :focus) are broken by magnification which removes the leading space, and changes the semantics.

  ".a :matches(...)" !== ".a:matches(...)"
  ".a :not(.b)" !== ".a:not(.b)"

* NOTES
- This has been breaking some edge cases for a while, and a lot more as we start using :matches and :not more frequently.
UserInterface/Views/DebuggerDashboardView.css:106:.toolbar:not(.small-size) .dashboard.debugger > .location :not(:first-child) {
UserInterface/Views/TimelineSidebarPanel.css:221:.sidebar > .panel.navigation.timeline > .timelines-content :focus li.item.selected + li.item {
Comment 1 Radar WebKit Bug Importer 2014-12-02 15:44:48 PST
<rdar://problem/19121083>
Comment 2 Joseph Pecoraro 2014-12-02 15:53:40 PST
Created attachment 242458 [details]
[PATCH] Proposed Fix

Fixes ~16 colon issues adding back 16 spaces.
Remove 74 spaces preceding "!important"s.
Overall we save 58 bytes!
Comment 3 Joseph Pecoraro 2014-12-02 15:56:21 PST
Created attachment 242459 [details]
[PATCH] Proposed Fix
Comment 4 Joseph Pecoraro 2014-12-02 15:57:54 PST
Created attachment 242460 [details]
[PATCH] Proposed Fix - Fixed typos
Comment 5 WebKit Commit Bot 2014-12-02 16:01:04 PST
Attachment 242460 [details] did not pass style-queue:


ERROR: Source/WebInspectorUI/Scripts/cssmin.py:33:  at least two spaces before inline comment  [pep8/E261] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Commit Bot 2014-12-02 16:39:08 PST
Comment on attachment 242460 [details]
[PATCH] Proposed Fix - Fixed typos

Clearing flags on attachment: 242460

Committed r176699: <http://trac.webkit.org/changeset/176699>
Comment 7 WebKit Commit Bot 2014-12-02 16:39:13 PST
All reviewed patches have been landed.  Closing bug.