Formatting CSS breaks multiple class selectors
Reported by
ngy...@gmail.com,
May 25 2016
|
||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.6 Safari/537.36
Steps to reproduce the problem:
1. Open the attached test.htm which contain these source codes:
test.htm:
<link href="test.css" rel="stylesheet">
<div class="a b">test</div>
test.css:
.a.b {background:blue;}
2. Open Developer Tools, then the Sources section
3. On the left Sources section, choose test.css
4. Click the Format button (the two brackets icon)
What is the expected behavior?
The code gets prettified and the page doesn't break
What went wrong?
The CSS selector for `.a.b` is wrongly prettified and splits to `.a .b`, also breaking the page design/layout
Did this work before? Yes Chrome 50.0.2661.102
Chrome version: 51.0.2704.54 Channel: beta
OS Version: 7
Flash Version: 21.0.0.242
Broken on 52.0.2743.6 dev and 53.0.2748.0 canary too
,
May 25 2016
Thank you for the heads-up! Started: https://codereview.chromium.org/2012953002/
,
May 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aec0b6fa92b2f2bece418aede111a78b043a0655 commit aec0b6fa92b2f2bece418aede111a78b043a0655 Author: lushnikov <lushnikov@chromium.org> Date: Fri May 27 00:39:14 2016 DevTools: fix css pretty-print. The CSS pretty-printing was regressed back in the days when all formatters were moved to a single content builder. The content builder assumes that added tokens are "words" - and makes sure those do not stick together. However, CSS formatter violates this contract. This patch is a workaround which could be merged. BUG= 614678 R=dgozman Review-Url: https://codereview.chromium.org/2012953002 Cr-Commit-Position: refs/heads/master@{#396332} [rename] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-1-expected.txt [rename] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-1.html [add] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2-expected.txt [add] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html [add] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-3-expected.txt [add] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-3.html [modify] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/Source/devtools/front_end/formatter_worker/CSSFormatter.js [modify] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js [modify] https://crrev.com/aec0b6fa92b2f2bece418aede111a78b043a0655/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
,
May 27 2016
works fine on chrome 53.0.2750.0 It would be great to have this merged in M-51 and M-52.
,
May 27 2016
Krishna as per comment # 4, please approve the merges.
,
May 27 2016
Approving merge to M52 branch 2743 based on comment #4. Before we approve merge to M51, Could you please confirm whether this change is well baked in Canary and safe to merge?
,
May 27 2016
[Automated comment] Less than 2 weeks to go before stable on M51, manual review required.
,
May 27 2016
+ sshruthi (M51 Desktop TPM), whether she is ok to take this merge in for M51 or not once we get reply for comment #6.
,
May 31 2016
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 31 2016
Please have a the CL merged by EOD today(05/31), so it gets picked up for Beta Promotion scheduled on 06/02.
,
May 31 2016
,
May 31 2016
Merge approved for M51 (branch 2704)
,
May 31 2016
Please your change to M51 branch 2704 by 4:00 PM PST today so we can take it for this week stable release. Thank you.
,
May 31 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/88787769105668050fd2958e860dd8835ce01357 commit 88787769105668050fd2958e860dd8835ce01357 Author: Andrey Lushnikov <lushnikov@chromium.org> Date: Tue May 31 21:53:58 2016 DevTools: fix css pretty-print. The CSS pretty-printing was regressed back in the days when all formatters were moved to a single content builder. The content builder assumes that added tokens are "words" - and makes sure those do not stick together. However, CSS formatter violates this contract. This patch is a workaround which could be merged. BUG= 614678 R=dgozman Review-Url: https://codereview.chromium.org/2012953002 Cr-Commit-Position: refs/heads/master@{#396332} (cherry picked from commit aec0b6fa92b2f2bece418aede111a78b043a0655) Review URL: https://codereview.chromium.org/2028863002 . Cr-Commit-Position: refs/branch-heads/2743@{#152} Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} [rename] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-1-expected.txt [rename] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-1.html [add] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2-expected.txt [add] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html [add] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-3-expected.txt [add] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-3.html [modify] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/Source/devtools/front_end/formatter_worker/CSSFormatter.js [modify] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js [modify] https://crrev.com/88787769105668050fd2958e860dd8835ce01357/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
,
Jun 1 2016
,
Jun 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/90c54581065ebdc1e8de454246915175664dbcde commit 90c54581065ebdc1e8de454246915175664dbcde Author: Andrey Lushnikov <lushnikov@chromium.org> Date: Wed Jun 01 04:16:54 2016 DevTools: fix css pretty-print. The CSS pretty-printing was regressed back in the days when all formatters were moved to a single content builder. The content builder assumes that added tokens are "words" - and makes sure those do not stick together. However, CSS formatter violates this contract. This patch is a workaround which could be merged. BUG= 614678 R=dgozman Review-Url: https://codereview.chromium.org/2012953002 Cr-Commit-Position: refs/heads/master@{#396332} (cherry picked from commit aec0b6fa92b2f2bece418aede111a78b043a0655) Review URL: https://codereview.chromium.org/2023183002 . Cr-Commit-Position: refs/branch-heads/2704@{#689} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [rename] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-1-expected.txt [rename] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-1.html [add] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2-expected.txt [add] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html [add] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-3-expected.txt [add] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-3.html [modify] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/Source/devtools/front_end/formatter_worker/CSSFormatter.js [modify] https://crrev.com/90c54581065ebdc1e8de454246915175664dbcde/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js
,
Jun 1 2016
,
Jun 1 2016
This is working fine in latest Canary #53.0.2754.0 and Stable # 51.0.2704.79 on Win 7. attached screenshot for reference, adding 'TE-Verified' labels.
,
Jun 1 2016
Please have a the CL merged to M52 branch-2743 by EOD today(06/01), so it gets picked up for Beta Promotion scheduled tomorrow.
,
Jun 1 2016
Looks like it was already merged to 2743 as https://chromium.googlesource.com/chromium/src.git/+/88787769105668050fd2958e860dd8835ce01357.
,
Jun 1 2016
Already merged in M52, thanks for the update. lushnikov@ if there is nothing pending here, could you please tag as fixed.
,
Jun 1 2016
This patch is now pushing out to stable channel in version 51.0.2704.79 for Desktop (Win,Mac & Linux).
,
Jun 1 2016
Per Comment 14, this is already merged to M52 branch 2743. So removing "Merge-Approved-52" label.
,
Jun 6 2016
lushnikov@: Please close this if there is no further work to be done on this & as the Fix is already merged to M-51.
,
Jun 6 2016
,
Sep 28 2016
[Bulk edit] Our blockerbot script was offline; it was recently brought back online, and thus labeled many old issues (including this one) erroneously. Removing Merge-TBD label since all milestones for this issue are already completed; no further work should be done.
,
Sep 28 2016
Bad merge label applied, please ignore.
,
Sep 29 2016
,
Sep 29 2016
|
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by eostroukhov@chromium.org
, May 25 2016Owner: lushnikov@chromium.org
Status: Assigned (was: Unconfirmed)