Closed Bug 1222291 Opened 4 years ago Closed 4 years ago

Empty CSS make Inspector mess

Categories

(DevTools :: Inspector, defect)

44 Branch
x86_64
Windows 7
defect
Not set

Tracking

(firefox43 unaffected, firefox44 fixed, firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox43 --- unaffected
firefox44 --- fixed
firefox45 --- fixed

People

(Reporter: yan, Assigned: tromey)

Details

Attachments

(2 files, 1 obsolete file)

Attached image result.gif
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20151103004217

Steps to reproduce:

I'm using Firefox developer version, in Firefox normal version 41 don't have this issue.
Step - 1: Open one page.
Step - 2: Open Inspector to check the CSS.


Actual results:

If there is empty CSS in code, like a{}, the Inspector will parse wrong, like attachement black part, and it will make Firefox very slow.


Expected results:

The correct CSS will show like attachement light part.
Component: Untriaged → Developer Tools: Inspector
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Assignee: nobody → ttromey
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8684971 - Flags: review?(bgrinstead)
Attachment #8684971 - Flags: review?(bgrinstead) → review+
Test was slightly incorrect, sigh.
Very mysterious how I didn't catch this.
Attachment #8684971 - Attachment is obsolete: true
Attachment #8685061 - Flags: review+
Keywords: checkin-needed
Comment on attachment 8685061 [details] [diff] [review]
change getRuleText to handle token-less rules

Approval Request Comment
[Feature/regressing bug #]: 984880
[User impact if declined]:
This is a regression caused by the as-authored feature.
The bug is that the rule view will show some nonsense if a user's
style sheet happens to have a rule with an empty body, like "div {}".

[Describe test coverage new/current, TreeHerder]:
There's a new test for the change.
[Risks and why]: 
Very low risk, which I think can be seen by reading the patch.
Essentially it avoids a substring call in the case where the
end argument would be undefined.

[String/UUID change made/needed]: No.
Attachment #8685061 - Flags: approval-mozilla-aurora?
I will wait for this land on Nightly before approving Aurora uplift request. Otherwise looks good to me.
https://hg.mozilla.org/mozilla-central/rev/94ec640656f1
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Yan, could you please verify this issue is fixed as expected on the latest Nightly build? Thanks!
Flags: needinfo?(yan)
Comment on attachment 8685061 [details] [diff] [review]
change getRuleText to handle token-less rules

The patch looks simple and has a new automated test. Let's uplift to Aurora44.
Attachment #8685061 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Hello, now the latest version is 44.0a2, it's not fixed yet, please provide the version and URL of download page.
Flags: needinfo?(yan)
(In reply to yan@ciandt.com from comment #11)
> Hello, now the latest version is 44.0a2, it's not fixed yet, please provide
> the version and URL of download page.

Yan, you can use https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-45.0a1.en-US.win64.installer.exe or https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central/firefox-45.0a1.en-US.win32.installer.exe. Thanks!
Flags: needinfo?(yan)
It's fixed.
Flags: needinfo?(yan)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.