Closed
Bug 673104
Opened 15 years ago
Closed 15 years ago
Use ES5 strict mode for Panorama
Categories
(Firefox Graveyard :: Panorama, defect)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 8
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(1 file, 1 obsolete file)
|
15.56 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Updated•15 years ago
|
OS: Linux → All
Hardware: x86_64 → All
| Assignee | ||
Comment 1•15 years ago
|
||
Attachment #547410 -
Flags: feedback?(raymond)
Comment 2•15 years ago
|
||
Comment on attachment 547410 [details] [diff] [review]
patch v1
>--- a/browser/base/content/tabview/modules/utils.jsm
>+++ b/browser/base/content/tabview/modules/utils.jsm
>+ function tanh(x) {
>+ var e = Math.exp(x);
>+ return (e - 1/e) / (e + 1/e);
>+ }
>+
> if (smooth) {
> // The ease function ".5+.5*Math.tanh(4*x-2)" is a pretty
> // little graph. It goes from near 0 at x=0 to near 1 at x=1
> // smoothly and beautifully.
> // http://www.wolframalpha.com/input/?i=.5+%2B+.5+*+tanh%28%284+*+x%29+-+2%29
>- function tanh(x) {
>- var e = Math.exp(x);
>- return (e - 1/e) / (e + 1/e);
>- }
> return .5 - .5 * tanh(2 - 4 * proportion);
> }
>--- a/browser/base/content/tabview/search.js
>+++ b/browser/base/content/tabview/search.js
>+ function dispatchTabViewSearchEnabledEvent() {
>+ let newEvent = document.createEvent("Events");
>+ newEvent.initEvent("tabviewsearchenabled", false, false);
>+ dispatchEvent(newEvent);
>+ }
>+
> if (!isSearchEnabled()) {
> $searchShade.show();
> $search.show();
>
> #ifdef XP_MACOSX
> UI.setTitlebarColors({active: "#717171", inactive: "#EDEDED"});
> #endif
>
> // NOTE: when this function is called by keydown handler, next keypress
> // event or composition events of IME will be fired on the focused editor.
>-
>- function dispatchTabViewSearchEnabledEvent() {
>- let newEvent = document.createEvent("Events");
>- newEvent.initEvent("tabviewsearchenabled", false, false);
>- dispatchEvent(newEvent);
>- };
That's annoying. What rule enforces this?
| Assignee | ||
Comment 3•15 years ago
|
||
Comment 4•15 years ago
|
||
Again, annoying. Does let foo = function ... work?
| Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #4)
> Again, annoying. Does let foo = function ... work?
Yep, it does.
Attachment #547410 -
Attachment is obsolete: true
Attachment #547523 -
Flags: feedback?(raymond)
Attachment #547410 -
Flags: feedback?(raymond)
| Assignee | ||
Updated•15 years ago
|
Attachment #547523 -
Flags: feedback?(raymond) → review?(dao)
Comment 6•15 years ago
|
||
Comment on attachment 547523 [details] [diff] [review]
patch v2
> function observer(subject, topic, data) {
> switch (topic) {
> case "domwindowopened":
>- subject.addEventListener("load", function() {
>- subject.removeEventListener("load", arguments.callee, false);
>+ subject.addEventListener("load", function onLoad() {
>+ subject.removeEventListener("load", onLoad, false);
I wonder where this makes onLoad available, exactly, and why this doesn't bother strict mode.
Attachment #547523 -
Flags: review?(dao) → review+
| Assignee | ||
Comment 7•15 years ago
|
||
(In reply to comment #6)
> I wonder where this makes onLoad available, exactly, and why this doesn't
> bother strict mode.
In this case it's a function expression (not a function definition) and so the name of it is bound locally inside the function, but not outside.
| Assignee | ||
Comment 8•15 years ago
|
||
Whiteboard: [fixed-in-fx-team]
| Assignee | ||
Comment 9•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
| Assignee | ||
Updated•15 years ago
|
Target Milestone: --- → Firefox 8
Updated•10 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•