Commit Graph

3468 Commits

Author SHA1 Message Date
YUKI Hiroshi
15666abfcb Call renamed methods correctly 2015-08-28 17:39:04 +09:00
Piro / YUKI Hiroshi
5380304aa8 Simplify #887 2015-08-19 01:24:54 +09:00
Piro / YUKI Hiroshi
dd2f17dd53 Show/hide UI to manage parent tab correctly on Firefox 40 and later #887 2015-08-19 01:12:07 +09:00
Piro / YUKI Hiroshi
289057ce55 Fix indent #887 2015-08-19 01:03:01 +09:00
Piro / YUKI Hiroshi
4abc4413e9 Initialize "edit" UI of a bookmark correctly for Firefox 40 and later #887 2015-08-19 00:59:16 +09:00
Piro / YUKI Hiroshi
c3adaabacf Fix mismatched method call on quitEditMode #887 2015-08-19 00:27:45 +09:00
Piro / YUKI Hiroshi
80938e8858 Replace functions entirely instead of partial patching.
This should fix #887 partially. However, when I click the star button twice, there still be another error like:

~~~
treestyletab: doPatching: gEditItemOverlay._showHideRows is missing! utils.js:319:0
treestyletab: Failed to patch to gEditItemOverlay.initPanel: function initPanel(aInfo) {
    if (typeof(aInfo) != "object" || aInfo === null)
      throw new Error("aInfo must be an object.");

    // For sanity ensure that the implementer has uninited the panel before
    // trying to init it again, or we could end up leaking due to observers.
    if (this.initialized)
      this.uninitPanel(false);

    let { itemId, itemGuid, isItem,
          isURI, uri, title,
          isBookmark, bulkTagging, uris,
          visibleRows } = this._setPaneInfo(aInfo);

    let showOrCollapse =
      (rowId, isAppropriateForInput, nameInHiddenRows = null) => {
        let visible = isAppropriateForInput;
        if (visible && "hiddenRows" in aInfo && nameInHiddenRows)
          visible &= aInfo.hiddenRows.indexOf(nameInHiddenRows) == -1;
        if (visible)
          visibleRows.add(rowId);
        return !(this._element(rowId).collapsed = !visible);
      };

    if (showOrCollapse("nameRow", !bulkTagging, "name")) {
      this._initNamePicker();
      this._namePicker.readOnly = this.readOnly;
    }

    // In some cases we want to hide the location field, since it's not
    // human-readable, but we still want to initialize it.
    showOrCollapse("locationRow", isURI, "location");
    if (isURI) {
      this._initLocationField();
      this._locationField.readOnly = this.readOnly;
    }

    // hide the description field for
    if (showOrCollapse("descriptionRow", isItem && !this.readOnly,
                       "description")) {
      this._initDescriptionField();
      this._descriptionField.readOnly = this.readOnly;
    }

    if (showOrCollapse("keywordRow", isBookmark, "keyword")) {
      this._initKeywordField();
      this._keywordField.readOnly = this.readOnly;
    }

    // Collapse the tag selector if the item does not accept tags.
    if (showOrCollapse("tagsRow", isURI || bulkTagging, "tags"))
      this._initTagsField().catch(Components.utils.reportError);
    else if (!this._element("tagsSelectorRow").collapsed)
      this.toggleTagsSelector().catch(Components.utils.reportError);

    // Load in sidebar.
    if (showOrCollapse("loadInSidebarCheckbox", isBookmark, "loadInSidebar")) {
      this._initLoadInSidebar();
    }

    // Folder picker.
    // Technically we should check that the item is not moveable, but that's
    // not cheap (we don't always have the parent), and there's no use case for
    // this (it's only the Star UI that shows the folderPicker)
    if (showOrCollapse("folderRow", isItem, "folderPicker")) {
      let containerId = PlacesUtils.bookmarks.getFolderIdForItem(itemId);
      this._initFolderMenuList(containerId);
    }

    // Selection count.
    if (showOrCollapse("selectionCount", bulkTagging)) {
      this._element("itemsCountText").value =
        PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
                                      uris.length,
                                      [uris.length]);
    }

    // Observe changes.
    if (!this._observersAdded) {
      PlacesUtils.bookmarks.addObserver(this, false);
      window.addEventListener("unload", this, false);
      this._observersAdded = true;
    }
  }
~~~
2015-08-19 00:25:47 +09:00
YUKI "Piro" Hiroshi
4252c461fd Merge pull request #925 from upsuper/fix-fullscreen
Fix fullscreen issues #903 and #910
2015-08-18 16:55:11 +09:00
Xidorn Quan
1e8a1bc324 Fix Fullscreen API issue for Firefox 41+.
This is a change from bug 1161802 which makes the "fullscreen" event be
triggered after window.fullScreen value flips.
2015-08-18 12:11:23 +10:00
Xidorn Quan
075487b836 Fix sidebar in fullscreen mode for Firefox 40+.
This is a change from bug 947854 where FullScreen.mouseoverToggle is
replaced with FullScreen.{show,hide}NavToolbox. This fix detects this
and do patching accordingly.
2015-08-18 12:10:08 +10:00
YUKI Hiroshi
27efc4311d Update library 2015-07-24 11:14:57 +09:00
YUKI "Piro" Hiroshi
11756e550b Merge pull request #916 from jryans/raf
Replace mozRequestAnimationFrame with requestAnimationFrame. Fixes #915
2015-07-24 10:51:06 +09:00
YUKI Hiroshi
c224b26066 Revert "Repair fullscreen detection. Fixes #903"
This reverts commit 5958766997.
It breaks Firefox 39 and older versions.
2015-07-23 12:18:59 +09:00
YUKI "Piro" Hiroshi
68cbf8456d Merge pull request #917 from jryans/fullscreen
Repair fullscreen detection. Fixes #903
2015-07-23 12:13:43 +09:00
J. Ryan Stinnett
5958766997 Repair fullscreen detection. Fixes #903 2015-07-22 19:13:08 -05:00
J. Ryan Stinnett
008a520efd Replace mozRequestAnimationFrame with requestAnimationFrame. Fixes #915 2015-07-22 10:43:47 -05:00
Piro / YUKI Hiroshi
acc59ec32a Add news topic for the next release 2015-06-13 00:38:50 +09:00
Piro / YUKI Hiroshi
b6e4abe842 Update library 2015-06-13 00:19:58 +09:00
Piro / YUKI Hiroshi
daa27ee336 Clear temporary position information of the tab bar after it is permanently changed.
This seems to fix broken appearance issue around toolbar customization (on second try or later).
2015-06-13 00:16:21 +09:00
Piro / YUKI Hiroshi
8df88139d4 Remove obsolete utility 2015-06-13 00:06:54 +09:00
Piro / YUKI Hiroshi
f9aa9d123c Restore/reinit tabbar asynchronously on toolbar customization 2015-06-13 00:06:15 +09:00
Piro / YUKI Hiroshi
48ee58e3a2 Send shutdown event correctly 2015-06-12 23:45:47 +09:00
Piro / YUKI Hiroshi
6bdfafd2f8 Broadcast message for content processes correctly when a window is closed 2015-06-12 23:32:38 +09:00
Piro / YUKI Hiroshi
523848a7ed Migrate from "selected" to "visuallyselected" attribute.
See also: http://www.hackermusings.com/2015/06/electrolysis-a-tale-of-tab-switching-and-themes/
2015-06-11 03:28:00 +09:00
Piro / YUKI Hiroshi
3eaae4cbcf Unregister event listener for SSWindowStateBusy correctly 2015-06-11 03:08:54 +09:00
YUKI Hiroshi
94428a1b2d Fix typo: handle DOMContentLoaded events correctly 2015-05-11 18:48:27 +09:00
YUKI Hiroshi
0c2c33e19d Fix typo 2015-03-19 18:12:07 +09:00
YUKI Hiroshi
a22337abde Scroll to opened tab group after expanding animation is finished 2015-03-19 11:46:48 +09:00
YUKI Hiroshi
d2d68a6437 Avoid errors from elements without box object 2015-03-19 11:32:03 +09:00
YUKI Hiroshi
a8d490f468 Scroll to pened tab group with delay to avoid canceling by other triggers 2015-03-19 11:24:41 +09:00
YUKI Hiroshi
6efc491e66 Cancel previous scroll before scroll to tab group 2015-03-19 11:20:52 +09:00
YUKI Hiroshi
2e484f9026 Don't scroll to group tabs opened in the background 2015-03-19 10:55:06 +09:00
YUKI Hiroshi
609400e19a Scroll to opened tab group even if TMP is not installed 2015-03-19 10:47:49 +09:00
YUKI Hiroshi
65007f64e6 Scroll to tabs opened from a bookmark folder 2015-03-19 10:25:25 +09:00
YUKI Hiroshi
d7963e36be Extract logic to scroll to specified tabs, from the method to scroll to a tree 2015-03-19 10:24:47 +09:00
YUKI Hiroshi
445ebbcf35 Update visibility of tab bar by status change of related elements more robustly #848 2015-03-18 11:25:33 +09:00
Piro / YUKI Hiroshi
eccfe1ea8d Don't move scroll position if the target tab is already in the viewport (regression by the previous commit) 2015-03-18 02:59:58 +09:00
Piro / YUKI Hiroshi
4ff4584833 Use Firefox's native smooth scrolling method if possible, to activate accelerations #856 2015-03-18 02:52:02 +09:00
Piro / YUKI Hiroshi
d0fb0280e8 Fix indent 2015-03-18 02:40:08 +09:00
Piro / YUKI Hiroshi
d821755f2f Extract implementations about smooth scrolling 2015-03-18 02:39:36 +09:00
Piro / YUKI Hiroshi
9f59a6ebe7 Don't do smooth scroll if it is expressly forbidden 2015-03-18 02:33:41 +09:00
YUKI Hiroshi
0cae72fd00 Cancel previous scroll if the new to-be-scrolled tab is in the viewport 2015-03-17 18:57:12 +09:00
YUKI Hiroshi
d41a66603e Scroll to expanded tree more intelligently 2015-03-17 18:29:09 +09:00
YUKI Hiroshi
283a79e56c Always override ensureElementIsVisible() if animation effect is active 2015-03-17 17:59:20 +09:00
YUKI Hiroshi
784f3d875a Fix indent 2015-03-17 17:52:26 +09:00
YUKI Hiroshi
f639cf2145 Don't update ensureElementIsVisible() twice 2015-03-17 17:52:08 +09:00
YUKI Hiroshi
ec76dd9c04 Remove needless event handler for wheel scrolling on the tab bar 2015-03-17 17:49:39 +09:00
YUKI Hiroshi
0d1973ced9 Update Firefox's ensureElementIsVisible() of the tab bar without eval() 2015-03-17 17:48:36 +09:00
YUKI Hiroshi
f0c012710d Use given duration 2015-03-17 16:06:20 +09:00
YUKI Hiroshi
f3a3d8f0d0 Update news topics 2015-03-13 17:07:21 +09:00