Commit Graph

125 Commits

Author SHA1 Message Date
Michael Yoshitaka Erlewine
63327c73ad Bug 582023: iQ changes based on comments from gavin
- let is the new var, no multiple declarations on the same line.
- renamed iQ.fn.init to be iQClass, iQ.fn to be iQClass.prototype, to look much more normal. iQ now just creates a new iQClass. No more brain hurt.
- no more (function(){...}) closure
- Array.prototype.xxx.call replaced by Array.xxx
- a couple other changes recommended by gavin.
- Utils: rm some comments, but haven't touched JSM, isDOMElement, or merge.
2010-07-28 21:33:43 -06:00
Frank Yan
50ce1d5cfb Bug 582200: rm cross-browser code from iQ, follow Mozilla style better, r=mitcho 2010-07-27 10:07:17 -06:00
Ian Gilman
0825b66dee + We now do no work while the script is loading; everything waits until the UI.init() call at the very bottom
--HG--
extra : rebase_source : 301788f78500bfe57512b0df396cb6be2ca8a02f
2010-07-26 17:15:19 -07:00
Edward Lee
b6e2f7c7f7 Switch to Array.isArray from Utils.isArray. 2010-07-26 11:02:52 -07:00
Edward Lee
dc99f60010 Inline isFunction as typeof == function checks. 2010-07-23 19:29:32 -07:00
Michael Yoshitaka Erlewine
0de35204dc Utils + iQ cleanup!
- utility functions in iQ have been moved to Utils: isFunction, isArray, isPlainObject, isEmptyObject, merge, extend, timeout
- iQ depends on Utils. Utils no longer depends on iQ.
- simplified Utils.extend. Deep copy is no longer supported, nor is extending iQ and iQ.fn using extend. They were not being used.

--HG--
extra : rebase_source : ab8f86e4e6a65cb747bc79ae0aa36cb39819421a
2010-07-23 17:33:02 -04:00
Edward Lee
7a146e662d Followup bug 580870 to rename gTabDeck/gTabFrame to gTabView*. 2010-07-22 22:41:58 -07:00
Michael Yoshitaka Erlewine
613b2fbeb5 Rewrote various scaling/easing functions in terms of the Range's, with the new proportion and scale methods.
- removed Math.tanh, instead moving it into the Range proportion method for its "smooth" option
+ rewrote TabItem close button opacity and title font size using the new Range utilities. Should make code a tad easier to follow.
2010-07-23 00:35:07 -04:00
Michael Yoshitaka Erlewine
318e64a28f Bug 581143: Cleanup geometry utilities in utils.js
1. Move isRect, isPoint, isRange to Utils, to facilitate JSMing and to clean up
namespace
2. Remove unused/underutilized methods of Rect/Point/Range
3. Use QuickDraw-style comparison of pixel overlap (using < instead of <=)
throughout.
4. Range.overlaps is now Range.contains, to be more consistent with Rect.

--HG--
extra : rebase_source : cc3507bb3bbe92f922d3147cc9130c1f713391b2
2010-07-22 15:46:51 -04:00
Michael Yoshitaka Erlewine
c36ae7ac65 Bug 580878: removing some underutilized Utils functions: getMilliseconds, and testLogging
--HG--
extra : rebase_source : 28ff49903f395240a3aca3b3761c7638ee6d4b7d
2010-07-22 15:42:29 -04:00
Edward Lee
9270bfd798 Bug 581078 - Get rid of Utils.activeTab to avoid iterating over all Tabs
Directly access gBrowser.selectedTab and compare other raw tabs against it until BrowserTab goes away. Get the reference to the BrowserTab instead of iterating over Tabs through .tabcandyBrowserTab.
2010-07-22 12:36:17 -07:00
Edward Lee
6a46fe1b33 Bug 580870 - Alias gBrowser to the tabcandy context to remove getCurrentWindow
Add aliases for gWindow, gBrowser, gTabDeck, gTabFrame for the tabcandy chrome context. Update uses and simplify some code like removing Navbar.
2010-07-22 12:34:13 -07:00
Edward Lee
b40ce0f381 Remove trailing spaces/tabs from tabcandy files. 2010-07-20 10:17:29 -07:00
Ian Gilman
475f1478b1 + Filled out iQ.js comments 2010-07-19 15:27:19 -07:00
Michael Yoshitaka Erlewine
0b1bea1854 rm stacktrace.js!
--HG--
extra : rebase_source : ee145386d3b3836f0c02005c1f4f7ef517377b7e
2010-07-19 14:21:09 -04:00
Raymond Lee
e4030d1c3c Fixed Bug 579814 - Fix behavior of tab-manipulation keyboard shortcuts 2010-07-19 17:37:22 +08:00
Michael Yoshitaka Erlewine
6f98446603 rm trailing whitespace 2010-07-18 11:58:10 -04:00
Ian Gilman
9eca35d1cb + Finished documenting all of the app code, plus utils.js. Remaining: iq.js, mirror.js, tabs.js 2010-07-16 17:27:01 -07:00
Raymond Lee
f6bf040f29 Bug 577445: Show tab candy title in the tab candy interface and change 'let' to 'var' 2010-07-15 16:41:08 +08:00
Raymond Lee
29bffe4181 Bug 576110: Show saved thumbnails at browser startup if tab candy was last open 2010-07-15 10:40:46 +08:00
Ian Gilman
177cd12414 + Cleaned up a scope issue with Subscribable and added some guards 2010-07-14 17:24:03 -07:00
Ian Gilman
1672b8823b + Subscribable (in utils.js) no longer has a separate onClose path
+ My recent addition of a "content" div broke dragging to make a new group; fixed
2010-07-14 16:59:37 -07:00
Ian Gilman
f721908785 + Fixed a typo in iQ.each that was breaking everything
+ Rearranged the UIClass initialization sequence a little, to make sure everything happens in the right sequence
2010-07-14 11:21:07 -07:00
Michael Yoshitaka Erlewine
b2e717a708 Bug 577387: cleanup of the new iQ(...).each 2010-07-14 00:08:45 -04:00
Michael Yoshitaka Erlewine
9a60acf905 Bug 577387: iQ.each is gone! iQ(...).each still exists, and its callback must now explicitly take the element as its argument 2010-07-14 00:03:47 -04:00
Michael Yoshitaka Erlewine
091ba94b69 cleanup: rm unused functions, constants from Utils + Mirror 2010-07-13 22:48:55 -04:00
Michael Yoshitaka Erlewine
fe182c97dc iQ cleanup: of course we're Gecko > 1.9.2 so we have classList! use it in .{add,remove,has}Class 2010-07-13 22:17:35 -04:00
Michael Yoshitaka Erlewine
5b86879af2 iQ cleanup: rm unused regexps and other constants; rm iQ.toArray, iQ.pushStack, iQ.slice, iQ.trim 2010-07-13 22:02:11 -04:00
Michael Yoshitaka Erlewine
2f32f45b95 cleanup: iQ.each: never used with args, so that code is removed 2010-07-13 20:28:36 -04:00
Michael Yoshitaka Erlewine
45ae6c43ea cleanup: rm iQ.grep; using .filter instead. 2010-07-13 20:23:04 -04:00
Michael Yoshitaka Erlewine
66fbb972b6 cleanup: rm iQ.inArray 2010-07-13 20:10:53 -04:00
Michael Yoshitaka Erlewine
115a5ceee4 cleanup: rm various instances of iQ.each where it's an array, so we can use .forEach
--HG--
extra : rebase_source : f41f088641f71aba6796092766b0645fca925ad1
2010-07-13 19:38:51 -04:00
Michael Yoshitaka Erlewine
2518a2912d cleanup: rm iQ.makeArray 2010-07-13 17:39:46 -04:00
Raymond Lee
d710dcfb46 Bug 576110: Open tab candy at startup if it was last open 2010-07-13 12:04:04 +08:00
Michael Yoshitaka Erlewine
12fea0e4df bug 577968: control words like if, switch, etc. should have a space after them 2010-07-11 20:54:42 -04:00
Michael Yoshitaka Erlewine
7c68df1b19 bug 577968: removing elses preceded by returns; replacing tabs 2010-07-11 19:48:05 -04:00
Ian Gilman
f074bb3090 + started work on the first run experience: everything goes into a single new group, and there is an info item as well
+ Added "reset" to the dev menu so we can test first run (since the reset button is currently AWOL)
+ Added Utils.assertThrow(), an assert that throws an exception
2010-07-07 17:04:01 -07:00
Ian Gilman
d1e2e54e22 + refactored Raymond's fix to Bug 576424 2010-07-02 16:33:33 -07:00
Ian Gilman
4c5dd290a4 + Removed placebo hack from Storage.wipe()
+ Removed TabItems.reconstitute(), which we haven't actually needed for a while, but now it's also causing trouble
+ Removed Utils.activeWindow, which doesn't seem to work, and replaced its use in Utils.activeTab (the only remaining place it was being used) with Utils.getCurrentWindow(), which does seem to work
+ Utils.assert() now dumps a trace
+ Fixed paths to the edit pencil and new tab button images; they should now show up properly
2010-07-01 17:05:46 -07:00
Raymond Lee
cb3ec79a4c Bug 572889 - Move TabCandy out of a tab and into a per-window xul:deck [r=iangilman]
Update code for tabCandy in xul:deck to not assume it's living in a tab and update various events and callbacks.

--HG--
extra : rebase_source : 7007f13f4e9e3ebd0eb38f91d41bccfa68b3099d
2010-06-23 17:25:34 +08:00
Ian Gilman
59ca7177c1 + Removed icons that exist elsewhere in the browser; now using them instead
+ Our toolbar button now uses the standard toolbar button styling; we just apply a glyph to it
+ Went through the code with http://caja.appspot.com/tools/index and fixed a number of minor issues it found
+ Added "refresh" to the dev menu (since you won't be able to just refresh the tabcandy page once it's in the xul:deck)
2010-06-25 16:00:51 -07:00
Ian Gilman
db039df3cc + If a dragged item overlaps more than one droppable, the largest intersection wins
+ Added intersection and area to Rect
+ Cleaned out a little debug code
2010-06-23 17:10:16 -07:00
Michael Yoshitaka Erlewine
4b8db5704f just some comments to pushAway and related functions; rm legacy squishModes; pushAway now uses Trenches.gutter for margins, and respects safe window bounds 2010-06-22 19:50:37 -04:00
Ian Gilman
f27b76876b + In the quest to abolish reloadBounds(), I've rewritten draggable, droppable and resizable to operate on an item's bounds rather than directly on the div. I've also removed those routines from iQ, and integrated them into Item. Additional related cleanup and documentation.
+ Removed a little bit of aza debug code
+ Added size and position routines to Rect
2010-06-22 16:42:06 -07:00
Michael Yoshitaka Erlewine
0449a02ad5 + Range.overlaps; bugfix: border trenches unfortunately had an inappropriately large activeRange... fixed. This fixes the long-distance border-snapping which unfortunately shipped with 0.4 2010-06-21 22:32:07 -04:00
Aza Raskin
1ecd755252 + Opacity was effected, so backed out my iQ change. 2010-06-21 18:05:46 -07:00
Aza Raskin
8527336f86 +merge 2010-06-21 17:34:52 -07:00
Aza Raskin
5a2c9050c0 + Fixed a bug in iQ whereby unadorend numbers in animations wouldn't get a "px" suffix.
+ This fixes the title's strange placement.
2010-06-21 17:34:34 -07:00
Ian Gilman
f3d7fae183 + Added attr to iQ, plus a unit test for it
+ Fixed click handler for expand button (it was allowing drag, and also it was on mousedown)
+ Added Ehsan and Raymond to the install.rdf contributors list
2010-06-21 17:27:12 -07:00
Aza Raskin
34acdb793e + More merging 2010-06-19 18:53:21 -07:00