Closed Bug 1271049 Opened 8 years ago Closed 8 years ago

View > Page Style does not show options from <style> elements

Categories

(Firefox :: Menus, defect)

44 Branch
x86
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 49
Tracking Status
firefox46 --- wontfix
firefox47 --- wontfix
firefox48 --- fixed
firefox49 --- fixed
firefox-esr45 --- affected

People

(Reporter: stanio, Assigned: Gijs)

References

()

Details

(Keywords: regression)

Attachments

(3 files)

Tried with current Firefox 46 Release and Firefox 48 Developer Edition.

Having a page with the following styles defined:

  <style>
    body { font-size: 150% }
  </style>
  <style title="Green">
    body { color: green }
  </style>
  <style title="Orange">
    body { color: orange }
  </style>

does not show "Green" and "Orange" options in the View > Page Style menu, but just "No Style" and "Basic Page Style" – the later appears preselected.  The "Green" style appears applied on fresh load, but selecting "Basic Page Style" over appears to switch the named styles off.

The following analogous definitions appear to work as expected:

  <style>
    body { font-size: 150% }
  </style>
  <link rel="stylesheet" title="Green"
      href="data:text/css,body { color: green }">
  <link rel="stylesheet" title="Orange"
      href="data:text/css,body { color: orange }">

FWIW, the original case works fine in SeaMonkey 2.43 (Gecko 46).

In all cases evaluating |document.styleSheetSets| in the Web Console returns:

DOMStringList [ "Green", "Orange" ]
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(mconley)
Flags: needinfo?(gijskruitbosch+bugs)
Regression from 44, Looks like we have a fix coming. 
We could still take this on aurora if it works in m-c and you think it is safe.
Comment on attachment 8750319 [details]
MozReview Request: Bug 1271049 - fix showing alternative styles from <style> elements and make the test actually test things, r?mconley

https://reviewboard.mozilla.org/r/51359/#review48765

Good stuff! Thanks for the regression test, and cleaning up the test file while you were at it! You're a superstar.
Attachment #8750319 - Flags: review?(mconley) → review+
https://hg.mozilla.org/mozilla-central/rev/c751c1775268
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Comment on attachment 8750319 [details]
MozReview Request: Bug 1271049 - fix showing alternative styles from <style> elements and make the test actually test things, r?mconley

Approval Request Comment
[Feature/regressing bug #]: bug 1141041
[User impact if declined]: alternative styles from <style> elements have stopped working; broken test
[Describe test coverage new/current, TreeHerder]: fixed the test in this patch, now actually has coverage
[Risks and why]: low, minor change, increased test coverage
[String/UUID change made/needed]: no.
Attachment #8750319 - Flags: approval-mozilla-aurora?
Comment on attachment 8750319 [details]
MozReview Request: Bug 1271049 - fix showing alternative styles from <style> elements and make the test actually test things, r?mconley

Fix a regression, has a (better) test, taking it.
Attachment #8750319 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
I've seen this issue on this bug in Nightly 49.0a1 (2016-05-07) ; (Build ID: 20160507030302) from Linux.

This Bug is now verified as fixed on Latest Firefox Aurora 49.0a2 (2016-07-30) (Build ID: 20160730004003)

and also Verified Latest Firefox Beta 48.0 (Build ID: 20160726073904)

User Agent:  Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
User Agent:  Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
OS: Linux 4.4.0-31-generic ; Ubuntu 16.04 (64 Bit)
QA Whiteboard: [bugday-20160727]
I've successfully reproduced this bug in Nightly 49.0a1 (2016-05-07) ; (Build ID: 20160507030302) from Windows. 
Verified as fixed on Latest Firefox Aurora 49.0a2 (2016-07-31) (Build ID: 20160731004003)

and Latest Firefox Beta 48.0b9 (Build ID: 20160718142219)
[bugday-20160727]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: