Commit Graph

139 Commits

Author SHA1 Message Date
Mark Striemer
4c033eb077 Bug 1395074 - Clear browserAction tab data on navigation r=mixedpuppy
MozReview-Commit-ID: 4hugj2q84Rd
2017-09-26 16:06:06 -05:00
Mike de Boer
3f2ca69f96 Bug 1401991 - Ensure that we don't hide panelviews that are already reparented to another multi-view and ensure to hide other panels consistently. r=Gijs
* Harden the new `hideAllViewsExcept()` to not do erroneous things if called when
   the binding is already gone.
 * Generalize things into `hideAllViewsExcept(thisOne)`:
    - Clear `_viewShowing` in there and do the descriptionHeightWorkaround thing
      in there too,
    - For Photon panels, do all the 'current' attribute setting in there. To show
      a panel during transition, I introduced the 'in-transition' attribute.
 * I had to make sure not to over-eagerly dispatch 'ViewShowing' events, because
   that confuses some,
 * Move the temporary panel handling, which contains an ephemeral panelmultiview
   instance, internally. This cleans up the hacky, duplicate PanelUI.js code nicely.
 * Keep a local copy of `_transitionDetails` to ensure it's still there after transition,
 * Harden `_cleanupTransitionPhase()` to only clear the phase that belongs to a
   specific transition, _if_ that's passed in as an argument. This resolves any
   potential raciness that might occur when `showSubView()` is called again mid-transition.
 * Skip the UITour element visibility check when it's inside a panelview, because
   too many things need to happen and that check is too simple to be useful in
   that case.

MozReview-Commit-ID: 5HpJKs1Ny5j
2017-09-29 13:51:51 +02:00
Mark Striemer
67d2df8a0c Bug 1314674 - Maintain badge style in new windows and customize r=mixedpuppy
MozReview-Commit-ID: 8f99d6Uqtx1
2017-09-20 17:27:48 -05:00
Mike de Boer
021d3d1107 Bug 1401383 - remove anchor state after transition even if the transition is canceled, and always set main view as current, r=Gijs
We weren't removing the 'open' attribute from the anchor if the transition didn't complete.
This patch fixes this by moving the addition of 'open' into _transitionViews, and its removal into
_cleanupTransitionPhase.

MozReview-Commit-ID: TS0CcwsHVN
2017-09-21 22:18:07 +02:00
Luca Greco
6d6f77e024 Bug 1397196 - Fix pageAction icon loading when an extension has a cached browserAction theme-based icon. r=mixedpuppy
MozReview-Commit-ID: Lmi5pLerzul
2017-09-06 12:40:45 +02:00
Shane Caraveo
a9b17aeedb Bug 1380597 - Ensure the url can be loaded by the extension. r=kmag
MozReview-Commit-ID: GH31FlHxpVu
2017-09-07 17:09:40 -04:00
Florian Quèze
9dd6a6c038 Bug 1373331 - update browserAction buttons synchronously when creating them to avoid flickering in new windows, r=kmag. 2017-08-18 21:53:30 +02:00
Shane Caraveo
c01f2f1be3 Bug 1341126 implement open for browser/page/sidebar actions, r=kmag,zombie
MozReview-Commit-ID: 5r5aGpyPQ6W
2017-03-08 23:36:25 -08:00
Rob Wu
4fce0bf47e Bug 1387506 - Apply activeTab permission for _execute_browser_action r=kmag
And add tests to confirm that activeTab works for both
_execute_browser_action and _execute_page_action.

MozReview-Commit-ID: HDTDZXCvukc
2017-08-04 20:18:39 +02:00
Carsten "Tomcat" Book
b83067d218 merge mozilla-inbound to mozilla-central a=merge 2017-08-08 13:18:14 +02:00
Kris Maglione
5b5382fb8b Bug 1387907: Part 3 - Merge ext-browser.js and ext-utils.js. r=mixedpuppy
MozReview-Commit-ID: CmOax5b5Gki
2017-08-06 18:20:25 -07:00
Kris Maglione
fa416b7835 Bug 1387902: Don't attempt to localize browserAction widget properties. r=Gijs
We spend a lot of time at startup generating exception objects while trying to
retrieve nonexistent localized properties from string bundles. Since extension
widget values will never be localized this way, we should skip the string
bundle lookup entirely.

MozReview-Commit-ID: L9r59bf2Dgf
2017-08-06 16:34:31 -07:00
Kris Maglione
b116d419d7 Bug 1387899: Part 1 - Cache browserAction icon data for startup. r=mixedpuppy
MozReview-Commit-ID: 57ANCciibCn
2017-08-06 16:12:14 -07:00
Kris Maglione
8077ebeb20 Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy
MozReview-Commit-ID: FRCdXHc3S4K
2017-08-07 14:42:57 -07:00
Gijs Kruitbosch
daa94112cb Bug 1354117 - don't force border radius to 0 for photon (x-ref bug 1374315), fix webextension tests, r=kmag
MozReview-Commit-ID: 2HAi5J7uzxP
2017-08-01 18:37:41 +01:00
Tomislav Jovanovic
80c37829b7 Bug 1370716 - Only try to add _action menus if extension has permission r=mixedpuppy
MozReview-Commit-ID: KpT1RH30NMh
2017-08-06 23:27:10 +02:00
Kris Maglione
c4d42444e0 Remove unused lazy imports. r=trivial (no bug)
MozReview-Commit-ID: rqUFJw7Wsb
2017-08-02 21:09:38 -07:00
Gijs Kruitbosch
d8d8270dd8 Bug 1383076 - restore workaround for 'current' setter on panelviews in non-photon panelmultiview, r=mconley
MozReview-Commit-ID: 6YZ6Wyu0Spc
2017-07-24 14:56:01 +01:00
Gijs Kruitbosch
6ea9acbc72 Bug 1354086 - switch overflow panel to using a photonpanelmultiview, allowing webextension views to specify their own size, r=mikedeboer
MozReview-Commit-ID: 1uHEKXsO8vh
2017-07-19 21:23:46 +01:00
Gijs Kruitbosch
90cac15204 Bug 1370967 - close containing popup when clicking a non-popup browser action, r=mixedpuppy
MozReview-Commit-ID: HkdV5FUPnDV
2017-07-03 17:14:58 +01:00
Sebastian Hengst
3b79a3d804 Backed out changeset 4d0faee8c200 (bug 1370967) for eslint failure: missing comma at browser_ext_browserAction_popup.js:132. r=backout 2017-07-05 22:34:23 +02:00
Gijs Kruitbosch
b6b47745de Bug 1370967 - close containing popup when clicking a non-popup browser action, r=mixedpuppy
MozReview-Commit-ID: HkdV5FUPnDV
2017-07-03 17:14:58 +01:00
Andrew Swan
3358f38632 Bug 1369577 Part 2 Propagate isHandlingUserInput for browserAction, pageAction, and menus r=kmag
The implementations of browserAction, pageAction, and menu onClick
handlers now stash the current <browser> until we get a reply from
the extension process indicating that the handler has finished running.
We also have to take care to keep that <browser> around even if the
permissions api has to be loaded asynchronously.

MozReview-Commit-ID: BYJaiwdj40u
2017-06-15 12:48:40 -07:00
Andrew Swan
3d501bbfd5 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Sebastian Hengst
8642712c2a Backed out changeset 26fd6d0a1254 (bug 1369577) for failing xpcshell's test_ext_simple.js and test_ext_startup_cache.js on Android. r=backout 2017-06-30 01:01:13 +02:00
Sebastian Hengst
c48d1b793d Backed out changeset dfb376de5c23 (bug 1369577) 2017-06-30 00:59:59 +02:00
Andrew Swan
e77019e2bd Bug 1369577 Part 2 Propagate isHandlingUserInput for browserAction, pageAction, and menus r=kmag
The implementations of browserAction, pageAction, and menu onClick
handlers now stash the current <browser> until we get a reply from
the extension process indicating that the handler has finished running.
We also have to take care to keep that <browser> around even if the
permissions api has to be loaded asynchronously.

MozReview-Commit-ID: BYJaiwdj40u
2017-06-15 12:48:40 -07:00
Andrew Swan
c140bd9d12 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Bob Silverberg
0ae12dfd8e Bug 1374237 - Part 3: Declare all top-level functions in browser API files files via const., r=mixedpuppy
Also changed some function names to attempt to guarantee uniqueness across API files.

MozReview-Commit-ID: FU5JU1lRHzn
2017-06-21 16:13:00 -04:00
Matthew Wein
c7a81cb41f Bug 1329242 - Add support for browser_action.theme_icons r=mixedpuppy
MozReview-Commit-ID: HvfUQZzBQWq
2017-06-27 15:23:35 -07:00
Bob Silverberg
bb5ee64124 Bug 1297167 - Part 2: Add telemetry probes for BrowserAction popups, r=bsmedberg,kmag
Add histogram for WEBEXT_BROWSERACTION_POPUP_OPEN_MS to track the amount of time it takes to open a browserAction popup.
Add histogram for WEBEXT_BROWSERACTION_POPUP_PRELOAD_RESULT_COUNT to track how often a popup preload results in a popup being shown, vs a popup being cancelled, both after hover and after mousedown.

MozReview-Commit-ID: L8xlSJxgTzX
2017-05-03 11:12:03 -04:00
Mike de Boer
f9f58d253a Bug 1370580 - Part 1 - Ensure that the overflow rules are set the exact same way for the temporary panel as for the appMenu panel. r=Gijs
These rules are set explicitly to allow the two views to be displayed next to
each other briefly when the slide-in transition starts.
This patch also applies the last remaining photon styles to the temporary panel,
which is used by the new Library widget as well.

MozReview-Commit-ID: 45aYzVHwRYv
2017-06-16 15:41:57 +02:00
Sebastian Hengst
b75bf97136 Backed out changeset af176d040fad (bug 1370580) for frequently failing browser_ext_sidebarAction.js on Linux debug. r=backout a=backout
MozReview-Commit-ID: AwnMjAQTdmC
2017-06-17 23:18:55 +02:00
Mike de Boer
6ea7b945df Bug 1370580 - Part 1 - Ensure that the overflow rules are set the exact same way for the temporary panel as for the appMenu panel. r=Gijs
These rules are set explicitly to allow the two views to be displayed next to
each other briefly when the slide-in transition starts.
This patch also applies the last remaining photon styles to the temporary panel,
which is used by the new Library widget as well.

MozReview-Commit-ID: 45aYzVHwRYv
2017-06-16 15:41:57 +02:00
Sebastian Hengst
9c3bf7d0cd Backed out changeset d6be7dc56cc5 (bug 1370580) for failing test-oop-extensions/browser_ext_browserAction_popup_resize.js. r=backout 2017-06-15 19:24:39 +02:00
Mike de Boer
a351ec54ca Bug 1370580 - Part 1 - Ensure that the overflow rules are set the exact same way for the temporary panel as for the appMenu panel. r=Gijs
These rules are set explicitly to allow the two views to be displayed next to
each other briefly when the slide-in transition starts.
This patch also applies the last remaining photon styles to the temporary panel,
which is used by the new Library widget as well.

MozReview-Commit-ID: 45aYzVHwRYv
2017-06-15 12:49:18 +02:00
Gijs Kruitbosch
7010102531 Bug 1354109 - update WebExtensions code for Photon, r=kmag
MozReview-Commit-ID: 8nHvyafxwV1
2017-05-31 18:08:52 +01:00
Mark Banner
9916415caf Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 5KC23kzaCFN
2017-06-08 10:59:12 +01:00
Kris Maglione
db3ec327d2 Bug 1368189: Move more code out of ExtensionUtils.jsm. r=mixedpuppy
Also removes some dead code.

A lot of the code in ExtensionUtils.jsm is not needed in all processes, and a
lot of the rest isn't needed until extension code runs. Most of it winds up
being loaded into all processes way earlier than necessary.

MozReview-Commit-ID: CMRjCPOjRF2
2017-05-26 15:44:41 -07:00
Florian Quèze
ff53eb9a63 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Tomislav Jovanovic
fa9e24877d Bug 1362445 - Fix _action context menus when module is not loaded r=bsilverberg,mixedpuppy
MozReview-Commit-ID: AOzcpXSgy8d
2017-05-07 21:38:01 +02:00
Kris Maglione
d90dddf7d5 Bug 1362224: requestAnimationFrame before changing browserAction/pageAction buttons. r=aswan
MozReview-Commit-ID: H9Eq7z5L4Xq
2017-05-05 14:56:19 -07:00
Kris Maglione
25a66508a9 Bug 1362224: Cache per-tab icon data for browserAction/pageAction. r=aswan
MozReview-Commit-ID: JifAtY36gKA
2017-05-05 14:21:07 -07:00
Bob Silverberg
acab821a21 Bug 1361463 - Fix typo in BrowserAction.getPopup, r=kmag
The if statement in getPopup should read `if (!blockParser)` not `if (!this.blockParser)`.

MozReview-Commit-ID: IBtHHS634sG
2017-05-02 14:55:03 -04:00
Alexandre Poirot
208511b0d3 Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK
2017-04-27 17:58:09 +02:00
Kris Maglione
da08b6926c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV
2017-04-07 13:39:06 -07:00
Kris Maglione
52b67bf633 Bug 1350522: Part 7 - Merge pageAction/browserAction/sidebarAction/commands helper classes into API instances. r=aswan
MozReview-Commit-ID: 6aRQ1uybAmg
2017-03-26 18:42:59 -07:00
Kris Maglione
ef300362e4 Bug 1350522: Part 6 - Cleanup per-api-instance state logic. r=aswan
MozReview-Commit-ID: 5ixBA34fvFf
2017-03-25 11:36:56 -07:00
Kris Maglione
937291f42b Bug 1350522: Part 4 - Convert browser APIs to lazy loading. r=aswan
MozReview-Commit-ID: BQoWF9nHOuF
2017-04-02 11:59:55 -07:00
Kris Maglione
a48a112588 Bug 1346607: Begin speculative preload of popups on hover. r=mixedpuppy
Ideally we'd try to detect hover intent here, but the preload is relatively
cheap, so I don't think we have much to lose by starting out simple.

MozReview-Commit-ID: 7pjiohGMJVc
2017-03-11 19:05:09 -08:00