WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
134704
Web Inspector: CSS style declaration editor should ignore empty lines when determining prefix whitespace
https://bugs.webkit.org/show_bug.cgi?id=134704
Summary
Web Inspector: CSS style declaration editor should ignore empty lines when de...
Jonathan Wells
Reported
2014-07-07 16:58:37 PDT
The CSS style editor looks for the line with the shortest prefixed whitespace and strips that from every line, the idea being that the baseline indentation is ignored and the rules look better. Indentation relative to that baseline is honored. The change made in
https://bugs.webkit.org/show_bug.cgi?id=133515
properly handles lines with zero-length prefixed whitespace lines, but doesn't consider completely empty lines in cases such as: div { font-weight: bold; color: red; display: inline; } The empty line here lacks any spaces or tabs. In this case the empty line should be ignored as it is likely the author is eliminating all trailing whitespace from the document. This is so common that many inspected style declarations appear indented when they should not.
Attachments
[PATCH] Attempted fix.
(2.75 KB, patch)
2014-07-07 17:07 PDT
,
Jonathan Wells
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-07-07 16:58:45 PDT
<
rdar://problem/17583210
>
Jonathan Wells
Comment 2
2014-07-07 17:07:34 PDT
Created
attachment 234527
[details]
[PATCH] Attempted fix.
Joseph Pecoraro
Comment 3
2014-07-07 18:06:28 PDT
Comment on
attachment 234527
[details]
[PATCH] Attempted fix. Awesome. r=me
WebKit Commit Bot
Comment 4
2014-07-07 18:39:03 PDT
Comment on
attachment 234527
[details]
[PATCH] Attempted fix. Clearing flags on attachment: 234527 Committed
r170868
: <
http://trac.webkit.org/changeset/170868
>
WebKit Commit Bot
Comment 5
2014-07-07 18:39:06 PDT
All reviewed patches have been landed. Closing bug.
Timothy Hatcher
Comment 6
2014-07-08 12:12:18 PDT
Comment on
attachment 234527
[details]
[PATCH] Attempted fix. Nice fix! We will likely add the space o the empty line in _formattedContent before committing the change. We likely want to only do that for lines with content to prevent unneeded whitespace. Not critical though.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug