Closed Bug 931463 Opened 11 years ago Closed 11 years ago

Shader editor programs checkboxes misaligned on Linux

Categories

(DevTools Graveyard :: WebGL Shader Editor, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: vporof, Assigned: vporof)

References

Details

Attachments

(1 file)

      No description provided.
Depends on: 931452
Summary: Shader editor programs checboxes misaligned on Linux → Shader editor programs checkboxes misaligned on Linux
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attachment #822876 - Flags: review?(past)
Comment on attachment 822876 [details] [diff] [review]
webgl-checkboxes.patch

Review of attachment 822876 [details] [diff] [review]:
-----------------------------------------------------------------

I would only note that you are converting a number of child selectors to the more expensive descendant selectors. Is this really necessary?

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Writing_efficient_CSS?redirectlocale=en-US&redirectslug=CSS%2FWriting_Efficient_CSS#Avoid_the_descendant_selector.21
Attachment #822876 - Flags: review?(past) → review+
(In reply to Panos Astithas [:past] from comment #2)
> Comment on attachment 822876 [details] [diff] [review]
> webgl-checkboxes.patch
> 
> Review of attachment 822876 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I would only note that you are converting a number of child selectors to the
> more expensive descendant selectors. Is this really necessary?
> 

I like that you noticed this :) Those nodes are not direct descendants on Linux anymore. There's a different internal DOM structure for the checkboxes on that magnifique platform. So instead of duplicating the rules in the designated themes/linux/shadereditor.css file, or having two different selectors for the same thing in the themes/common/shadereditor.inc.css file, I resorted to the simpler approach of converting the direct descendant selector to a more generic one.

It's also worth noting that, although the MDN article advises against generic descendant selectors (and I've been using the arguments in that article more than once when cleaning up my own styles *and* convincing others of the validity of efficient selectors), it was brought to my attention many times that our CSS parsers are very efficient now and "writing efficient selectors" is overrated. Moreover, since (in Gecko at least) selectors are parsed from right to left, and there are significantly less checkboxes than other elements in the Shader Editor, worrying about performance is not entirely justified at this time.
https://hg.mozilla.org/mozilla-central/rev/fc10d6b12014
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: