"ele is null" with layout.css.devPixelsPerPx = 2

RESOLVED FIXED in Firefox 21

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jruderman, Assigned: mconley)

Tracking

({regression})

Trunk
Firefox 21
x86_64
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Running Firefox with
  user_pref("layout.css.devPixelsPerPx", '2.0');

triggers
  JavaScript error: chrome://browser/content/browser.js, line 12304: ele is null

At
  http://hg.mozilla.org/mozilla-central/annotate/beca57e612fd/browser/base/content/browser.js#l5033

(This is on a non-Retina MBP, running Mac OS X 10.7.)

Probably a regression from bug 647216, which enabled CAN_DRAW_IN_TITLEBAR on Mac.
Yep, I'd buy that.
Assignee: nobody → mconley
Posted patch Patch v1 (obsolete) — Splinter Review
This seems to do the job, but I'd like to do more testing with it first. I'll request review tomorrow.
Attachment #711545 - Attachment description: WIP Patch v1 → Patch v1
Attachment #711545 - Flags: review?(dao)
Comment on attachment 711545 [details] [diff] [review]
Patch v1

>       let appmenuButtonBox  = $("appmenu-button-container");
>       let captionButtonsBox = $("titlebar-buttonbox");
>+#ifdef MENUBAR_CAN_AUTOHIDE
>       this._sizePlaceholder("appmenu-button", rect(appmenuButtonBox).width);
>+#endif

Please declare appmenuButtonBox depending on MENUBAR_CAN_AUTOHIDE as well.
Component: Widget: Cocoa → General
Product: Core → Firefox
Posted patch Patch v2 (obsolete) — Splinter Review
Done.
Attachment #711545 - Attachment is obsolete: true
Attachment #711545 - Flags: review?(dao)
Attachment #711845 - Flags: review?(dao)
Comment on attachment 711845 [details] [diff] [review]
Patch v2

>+      let captionButtonsBox = $("titlebar-buttonbox");
>+#ifdef MENUBAR_CAN_AUTOHIDE
>       let appmenuButtonBox  = $("appmenu-button-container");
>-      let captionButtonsBox = $("titlebar-buttonbox");
>       this._sizePlaceholder("appmenu-button", rect(appmenuButtonBox).width);
>+#endif
>       this._sizePlaceholder("caption-buttons", rect(captionButtonsBox).width);

And now move the captionButtonsBox declaration down such that this code is ordered nicely ;)
Posted patch Patch v3Splinter Review
Good call. Thanks. :)
Attachment #711845 - Attachment is obsolete: true
Attachment #711845 - Flags: review?(dao)
Attachment #711847 - Flags: review?(dao)
Attachment #711847 - Flags: review?(dao) → review+
Duplicate of this bug: 839496
No longer blocks: 839496
https://hg.mozilla.org/mozilla-central/rev/b436db64121f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
You need to log in before you can comment on or make changes to this bug.