Commit graph

158 commits

Author SHA1 Message Date
Paolo Amadini
f06351c23c Bug 1473748 - Part 2 - Simplify how navigable elements are initialized. r=johannh
MozReview-Commit-ID: HN2ZYXNVi6m

--HG--
extra : rebase_source : 4373f26b679296d6f2237640dd248ce5bf8dd63c
2018-07-23 11:28:23 +01:00
Paolo Amadini
7328341032 Bug 1473748 - Part 1 - Use the type of element instead of the "subviewbutton" and "subviewkeynav" classes to initialize the list of navigable elements. r=johannh
MozReview-Commit-ID: IgxwGRNLsct

--HG--
extra : rebase_source : edc897a0c0ac7a8b7b551759a8d69b7c3d3659d5
2018-07-26 14:58:43 +01:00
Boris Zbarsky
270fa12c79 Bug 1476145 part 3. Stop using getInterface(nsIDOMWindowUtils) in browser/. r=gijs 2018-07-24 19:47:41 -04:00
Johann Hofmann
e7b9853987 Bug 1467385 - Use PanelMultiView APIs for keyboard navigation in the identity popup. r=Paolo
PanelMultiView has its own concept of "selected", so we should use this rather than move focus
using advanceFocusIntoSubTree.

MozReview-Commit-ID: DW2JqqggLl1

--HG--
extra : rebase_source : ec7a6f83fdda176f3286cf4395dc72de6cad2466
2018-07-02 14:34:25 +02:00
James Teh
8b233f97a0 Bug 1454866 part 1: PanelMultiView: Provide a way to allow keyboard navigation to an element without affecting visual presentation. r=johannh
PanelMultiView has specific code to support keyboard navigation.
However, it only includes elements with class subviewbutton, which has visual styling.
Some views have controls which should be included in keyboard navigation, but for which the subviewbutton styling is not appropriate.
Therefore, also include elements with the new class subviewkeynav, which is specific to keyboard navigation and has no visual styling.

MozReview-Commit-ID: 8A5q9nbGpdc

--HG--
extra : rebase_source : 431fd2b1e2926e53002a45c290f9d88e8463c42c
2018-04-23 10:37:42 +10:00
Neil Deakin
cf9835ac8b Bug 1446961, remove obsolete calls to showPopup and replace usages of the popup box object with the same methods defined on popups, r=paolo 2018-04-27 11:04:36 -04:00
Kris Maglione
a7b308c3a2 Bug 1456686: Part 1 - Fix unused and shadowed explicit imports. r=standard8
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.

MozReview-Commit-ID: DCChktTc5TW

--HG--
extra : rebase_source : cffb1c9762191c579d1397c8169e6e7635d229da
extra : histedit_source : dea59ddd2daaae52069c5faceae9149a4f08dd73
2018-04-24 20:18:09 -07:00
Mike Conley
4b6fb934f7 Bug 1442020 - Make PanelMultiView's description height workaround account for the possibility that panels have closed before a refresh driver tick. r=Paolo
MozReview-Commit-ID: IIjGYjoxMx5

--HG--
extra : rebase_source : 6e4f64576296e01deb6af0b8a1911b4da934e48d
2018-03-08 14:24:18 -05:00
Sam Foster
c11210d2df Bug 1402845 - Fix panelview sizing when customRectGetter is used. r=mikedeboer,Paolo
* The extension content drives the sizing of the browser and popup that contains it via the Extension:BrowserResized message. The ignoreResizes property throttles/debounces this initially, stashing the dimensions received rather than triggering resize of the popup for every message. When the popup is a subview and fixedWidth, we ignore width but *do* want to use the stashed height value.

* Until the panel is given visibility, it has 0 height, so after setting visibility, wait until the next refresh-driver tick before measuring any header which should get added to the overall view height

MozReview-Commit-ID: AgcruVb9QPA

--HG--
extra : rebase_source : 429503a7d38559cc8670a3205b3290b8e0bbbfa2
2017-10-05 10:23:53 -07:00
Mark Banner
a32bc883e7 Bug 1434446 - Enable no-unused-vars for global scope on jsm files in browser/. r=mossop
MozReview-Commit-ID: ERT1Fili25d

--HG--
extra : rebase_source : c62ad4e97fc5da7c59cbb03ba08928f7bbe5be6b
2018-03-01 20:06:06 +00:00
Tooru Fujisawa
d0ece36aa1 Backed out changeset 29e1fceaf48d (bug 1193394) 2018-03-01 19:55:08 +09:00
Tooru Fujisawa
25a9f5bb72 Bug 1193394 - Part 4: Wait for the next event tick before calling promiseDocumentFlushed in descriptionHeightWorkaround. r=bustage CLOSED TREE 2018-03-01 18:44:38 +09:00
Paolo Amadini
01dda8797e Bug 1420939 - Add an asynchronous version of the description height workaround. r=Gijs
This prevents synchronous reflows when opening subviews. This also removes a superfluous invocation of the workaround while the panel is still hidden.

MozReview-Commit-ID: DohLjntVaPU

--HG--
extra : rebase_source : 8cd1b86168aee23d4e75556c2b11baf2c8dd0b9c
2018-02-27 22:02:55 +00:00
Paolo Amadini
86df7b05eb Bug 1428839 - Part 8 - Fix the sliding transition when views are reordered. r=Gijs
Views moved to a different panel and then moved back could be placed after the subviews they give access to, if the other subviews were not moved. The transition would be incorrect when these subviews are opened later.

MozReview-Commit-ID: 6JJa0p0McxL

--HG--
extra : rebase_source : 7e28c0638c46b26c45b1073d8a76173fa75fd5fa
2018-02-28 13:43:51 +00:00
Paolo Amadini
29a9ce32a3 Bug 1428839 - Part 7 - Reduce calls to _cleanupTransitionPhase. r=Gijs
The transition code now returns early if the panel was closed during an "await" statement.

Given that transitions can only be interrupted when closing the panel, and the _cleanupTransitionPhase method handles exclusively state related to the panel rather than the individual views, it is now possible to call the _cleanupTransitionPhase method only when the panel is hidden or at the end of a transition.

MozReview-Commit-ID: GYRKyyhJBPK

--HG--
extra : rebase_source : cd66a1e68d0f6cf0a371d7216d54e7d07b576529
2018-02-27 22:56:15 +00:00
Paolo Amadini
ceb5caf0c5 Bug 1428839 - Part 6 - Remove previous workaround for the panel resizing at the end of the transition. r=Gijs
This was added in bug 1354141 and is not needed anymore.

MozReview-Commit-ID: 42oF7LpCa6R

--HG--
extra : rebase_source : cd002b7052d14318efe4ef1ac6cc48fe30467265
2018-02-27 16:13:48 +00:00
Paolo Amadini
389c9b6df4 Bug 1428839 - Part 5 - Open the anchor when subview navigation starts and close it asynchronously afterwards. r=Gijs
The anchor state does not need to be cleaned up synchronously, so we can handle it seperately from the transition state.

MozReview-Commit-ID: 1CBP9OS5WmM

--HG--
extra : rebase_source : 533cee34a8f8e0e4bae00a4ff4eb00b9f330f7c1
2018-02-27 15:52:07 +00:00
Paolo Amadini
91212fa6b1 Bug 1428839 - Part 4 - Avoid re-entrancy in PanelMultiView navigation functions. r=Gijs
We now use the "active" property of views to track whether navigation is possible. This has the advantage of being already handled correctly when views are moved to a different panel, and is in line with the purpose of the "active" state. The note about using the "popupshown" event for navigation has been updated accordingly.

Keyboard navigation is also linked to the "active" property now, so there is no need to track the state of the "_transitioning" property anymore.

Since the goBack and showSubView methods can only be called when the view is active, we don't need to check for attempts to start a transition while the panel is closed anymore.

MozReview-Commit-ID: 3KT3A5EwGFy

--HG--
extra : rebase_source : c338362923a7574210c7329bb84316d549898fdc
2018-02-27 15:33:33 +00:00
Paolo Amadini
613236ab39 Bug 1428839 - Part 3 - Clean up view properties when opening them. r=Gijs
This allows the state to be handled correctly when views are moved to a different panel.

The "margin-inline-start" style property on the view stack is also reset unconditionally, allowing less state to be stored in the transition details object.

MozReview-Commit-ID: IpgnYsVvx0w

--HG--
extra : rebase_source : 222a398546da3c142f4051c88f5cf9b4da2b8e98
2018-02-27 15:35:42 +00:00
Paolo Amadini
af1087eff8 Bug 1428839 - Part 2 - Add a function to determine if a view is still open. r=Gijs
This makes the intent of the code clearer and hides the details of how the association is made.

MozReview-Commit-ID: C2L0vsjhxNO

--HG--
extra : rebase_source : 8ff0ef3463470ed909a60c788ec59eaefa6795a9
2018-02-27 15:27:27 +00:00
Paolo Amadini
5a7e8bc917 Bug 1428839 - Part 1 - Remove previous workaround for flickering at the end of the transition. r=Gijs
This was originally introduced in bug 1374749 but isn't needed anymore, and removing this allows making the _cleanupTransitionPhase method synchronous.

MozReview-Commit-ID: 6v78QoPXZoU

--HG--
extra : rebase_source : 1c089d8a9e4e6a1031a7d0337f3459b7c1e37117
2018-02-27 15:17:29 +00:00
Paolo Amadini
a524280e41 Bug 1441284 - Part 8 - Remove the "_mainView" and "_mainViewId" properties. r=Gijs
The null check for the "node" property can also be removed since the caller already checks it synchronously.

MozReview-Commit-ID: 7FaCdtWTz20

--HG--
extra : rebase_source : 9162b3588b6085da5385a63401457192b1d9e690
2018-02-27 14:17:10 +00:00
Paolo Amadini
357704dead Bug 1441284 - Part 7 - Remove the "_ephemeral" property. r=Gijs
The "ephemeral" attribute was not actually used anymore, because it is redundant with the "viewCacheId" attribute.

MozReview-Commit-ID: 6zxf2DmcEfI

--HG--
extra : rebase_source : b3fb5381152c8baaf8f77549e87723e1815f945f
2018-02-26 19:50:19 +00:00
Paolo Amadini
01883a026c Bug 1441284 - Part 6 - Do not move out subviews when the window is closing. r=Gijs
Since we control the code path that invokes the PanelMultiView destructor, it is now possible to call the _moveOutKids function only as needed, avoiding some unnecessary DOM modifications when the browser window is closing.

MozReview-Commit-ID: JTJQmhZKFOh

--HG--
extra : rebase_source : cc3f1843cfd57e94bdf657aa033fbc9d5a086bf7
2018-02-26 19:47:29 +00:00
Paolo Amadini
a52806ca23 Bug 1441284 - Part 5 - Remove the "_panelViewCache" property. r=Gijs
MozReview-Commit-ID: IjTCdzr6gZ5

--HG--
extra : rebase_source : 1fece9694dfa2be6120230935af2c41f8efd26fb
2018-02-26 19:36:12 +00:00
Paolo Amadini
6a40e40b80 Bug 1441284 - Part 4 - Remove redundant calls before _moveOutKids and simplify the function. r=Gijs
The main view is already included in the children of the view stack, so the code that moves it out separately can be removed. The "mainview" attribute is already set to the correct value the next time the view is opened.

MozReview-Commit-ID: B8LMAxWvvTb

--HG--
extra : rebase_source : ae8afd201782346e63772cdb62797b7069e0d3ac
2018-02-26 19:14:31 +00:00
Paolo Amadini
d46beaba6f Bug 1441284 - Part 3 - Remove the "showingSubView" property. r=Gijs
The value "single" for the "closemenu" attribute on panel buttons is unused, so the only consumer of the "showingSubView" property can be removed.

MozReview-Commit-ID: 2jf5YE4Uyd

--HG--
extra : rebase_source : d1940fb7a470b42e0550c0e2876ad947d1c85d9d
2018-02-27 14:08:58 +00:00
Paolo Amadini
228213e40d Bug 1441284 - Part 2 - Remove the "_currentSubView" property. r=Gijs
MozReview-Commit-ID: Aua3V8hOT39

--HG--
extra : rebase_source : 08d506c3d65b3e2e72532183e776f8aa1c6c0975
2018-02-26 18:43:43 +00:00
Paolo Amadini
2d4d390d41 Bug 1441284 - Part 1 - Remove the "current" property. r=Gijs
MozReview-Commit-ID: GyqI8N3JQ9O

--HG--
extra : rebase_source : c2ac400d601c259ce17852a85d01230355885454
2018-02-26 18:36:59 +00:00
Paolo Amadini
53d37c96a7 Bug 1440333 - Part 3 - Raise the ViewShown event after the main view is active. r=Gijs
This also adds a new "active" property that can be used by regression tests to determine whether they should still wait for the ViewShown event.

MozReview-Commit-ID: K25F09llooj

--HG--
extra : rebase_source : 9f6dad605243fcd3633260c4fa34011f9cfab27c
extra : source : 2dad70b2a723e67b45563dd3ac254911dd193439
2018-02-26 13:18:22 +00:00
Paolo Amadini
acc856e8d4 Bug 1440333 - Part 2 - Rename the "current" attribute to "visible". r=Gijs
MozReview-Commit-ID: EazXDT6JC3M

--HG--
extra : rebase_source : ecaba689f94e26dcb20321bf51cd1b76d22ac2e8
extra : source : c705b49c2bae3301998df83dc0b883d0fb4e5219
2018-02-26 14:31:35 +00:00
Paolo Amadini
c359f82b1a Bug 1440333 - Part 1 - Remove the "in-transition" attribute. r=Gijs
This is made possible by a new workaround for a layout issue with panels that would prevent the main view from being displayed.

MozReview-Commit-ID: 3LGzq50QXt2

--HG--
extra : rebase_source : 2af636d4d93bf760b9ec4fd8b31ed77c715ab93f
extra : source : 9906b468eb78016aa4994b674da85bf7663c0285
2018-02-25 20:37:55 +00:00
Paolo Amadini
ffc1649aa1 Bug 1441154 - Start the PanelMultiView sliding transition together with the height transition. r=Gijs
This fixes an issue where the two transition are not simultaneous.

MozReview-Commit-ID: 8JKunQV3MDI

--HG--
extra : rebase_source : f272ab4c60de4361b44e71403806cd84436280db
2018-02-26 15:13:29 +00:00
Brindusan Cristian
81684073f2 Backed out 3 changesets (bug 1440333) for firefox-functional-test failures on test_no_certificate.py on a CLOSED TREE
Backed out changeset 2dad70b2a723 (bug 1440333)
Backed out changeset c705b49c2bae (bug 1440333)
Backed out changeset 9906b468eb78 (bug 1440333)
2018-02-26 16:19:18 +02:00
Paolo Amadini
885de209fb Bug 1440333 - Part 3 - Raise the ViewShown event after the main view is active. r=Gijs
This also adds a new "active" property that can be used by regression tests to determine whether they should still wait for the ViewShown event.

MozReview-Commit-ID: K25F09llooj

--HG--
extra : rebase_source : 8c9e2a86285be6453cd60b3da448876e6dfa7e8a
2018-02-26 13:18:22 +00:00
Paolo Amadini
76ef799b86 Bug 1440333 - Part 2 - Rename the "current" attribute to "visible". r=Gijs
MozReview-Commit-ID: EazXDT6JC3M

--HG--
extra : rebase_source : 5cca4cd0cf565ffbdf75a9777dfc15b359dcda57
2018-02-23 15:54:08 +00:00
Paolo Amadini
337d163883 Bug 1440333 - Part 1 - Remove the "in-transition" attribute. r=Gijs
This is made possible by a new workaround for a layout issue with panels that would prevent the main view from being displayed.

MozReview-Commit-ID: 3LGzq50QXt2

--HG--
extra : rebase_source : 5e594347fc612af2b3ee44748dd44383aa08f1a5
2018-02-25 20:37:55 +00:00
Paolo Amadini
c7bdffd735 Bug 1437512 - Part 2 - Remove the "panelmultiview" binding. r=Gijs
MozReview-Commit-ID: H9R7ahkCr2U

--HG--
extra : rebase_source : d6403d026b4539acc71325c600ee9ff3be667591
2018-02-25 18:43:55 +00:00
Paolo Amadini
c31491834b Bug 1437512 - Part 1 - Remove the "panelmultiview" binding construction. r=Gijs
MozReview-Commit-ID: 3oCvOe5th0B

--HG--
extra : rebase_source : 11ec16d78e61379d6efd359bd221b1829f89efa6
2018-02-25 18:41:45 +00:00
Mike Conley
4e9c3d2fe2 Bug 1434376 - Switch over all uses of BrowserUtils.promiseLayoutFlushed to window.promiseDocumentFlushed. r=Paolo
window.promiseDocumentFlushed will call a callback as soon as a style or layout
flush is not required for the document (which might be immediately). This is a
new ChromeOnly API introduced in an earlier patch in this series.

This patch also removes the now-unneeded BrowserUtils.promiseLayoutFlushed and
BrowserUtils.promiseReflowed methods and infrastructure.

MozReview-Commit-ID: Jv7KoxBXhHG

--HG--
extra : rebase_source : b8c9ae40dbdd0f5587d03e8b7c0833bd94032a78
2018-02-11 20:15:11 -05:00
Andreea Pavel
1aac7df383 Backed out 3 changesets (bug 1434376)for failing browser chrome at browser/base/content/test/performance/browser_urlbar_search_reflows.js on a CLOSED TREE
Backed out changeset b636251b75ab (bug 1434376)
Backed out changeset fccbba9cb959 (bug 1434376)
Backed out changeset b5128504011c (bug 1434376)
2018-02-25 12:44:28 +02:00
Mike Conley
96fbfba56f Bug 1434376 - Switch over all uses of BrowserUtils.promiseLayoutFlushed to window.promiseDocumentFlushed. r=Paolo
window.promiseDocumentFlushed will call a callback as soon as a style or layout
flush is not required for the document (which might be immediately). This is a
new ChromeOnly API introduced in an earlier patch in this series.

This patch also removes the now-unneeded BrowserUtils.promiseLayoutFlushed and
BrowserUtils.promiseReflowed methods and infrastructure.

MozReview-Commit-ID: Jv7KoxBXhHG

--HG--
extra : rebase_source : b8c9ae40dbdd0f5587d03e8b7c0833bd94032a78
2018-02-11 20:15:11 -05:00
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Paolo Amadini
c6d3def00e Bug 1439358 - Part 8 - Change how visibility is controlled so knownViews can be removed. r=Gijs
MozReview-Commit-ID: 9dVZ1cOto8O

--HG--
extra : rebase_source : be13ed8d5c72b0e018dd0d27ef1fd3b7293bef48
2018-02-22 15:28:15 +00:00
Paolo Amadini
7a2372af52 Bug 1439358 - Part 7 - Close the main view synchronously before opening it in a different panel. r=Gijs
This also updates the AppMenu mozscreenshots module to work with the Photon main menu.

MozReview-Commit-ID: FciQH815F95

--HG--
extra : rebase_source : 5c129b0d4aa824bbe899066f2bb197106d1c0408
2018-02-22 11:25:10 +00:00
Paolo Amadini
a623dbe5af Bug 1439358 - Part 6 - Decouple view events from view visibility. r=Gijs
This stops redundant ViewHiding and late ViewShown events from being dispatched when the panel is closed during a ViewShowing event or a transition, and stops dispatching ViewHiding events when a view becomes invisible but is still open.

The panelMultiView property on "panelview" nodes is now set to null when the view is closed, indicating that the view can be immediately reused in a different panel. The Places view had to be updated so it doesn't rely on this property during the PanelMultiViewHidden event.

MozReview-Commit-ID: B1yU6si3eD3

--HG--
extra : rebase_source : 440ddc3eabcbe9d0f02a172f8adf047c66ca53ac
2018-02-22 14:20:11 +00:00
Paolo Amadini
3ffdb38d61 Bug 1439358 - Part 5 - Handle panel hiding during ViewShowing events. r=Gijs
The ViewHiding event is now dispatched consistently, regardless of whether the ViewShowing event is canceled or the panel is closed during the event. This is done by a new _openView helper, while the logic that is specific to each of the showMainView, showSubView, and goBack functions has been moved out of the _showView function.

MozReview-Commit-ID: 5WvW6THWbyb

--HG--
extra : rebase_source : 666c5744843f5197ab5130212096a1c83a2e3983
2018-02-22 17:11:25 +00:00
Paolo Amadini
5ef12b919b Bug 1439358 - Part 4 - Open views before the transition and close them after it. r=Gijs
This allows the openViews array to reflect the state of the navigation more accurately, paving the way for further simplification of the code. The showSubView function will now fail early when it's called with a view that is already open, so the rest of the code doesn't have to take this case into consideration.

MozReview-Commit-ID: 1VoIImxVTDN

--HG--
extra : rebase_source : b483f9c7e2782f070f5694d85a91a0bfefff5457
extra : source : 7ce7a10fd212989eee76b482632eac9b985d4b2e
2018-02-22 13:39:09 +00:00
Paolo Amadini
92a511a1a2 Bug 1439358 - Part 3 - Always raise ViewShowing events and don't update the "current" property. r=Gijs
The ViewShowing event is now called earlier and unconditionally, since we don't set the "current" attribute and call showMainView while the panel is closing anymore.

It is already the case that the ViewShowing event handlers don't depend on the "current" property, so we don't need to keep track of it before ViewShown events are dispatched.

MozReview-Commit-ID: Ii4SN03KjwW

--HG--
extra : rebase_source : 5e994fa4d54b2805b5eb10d9471bbb25bd21f24c
2018-02-19 11:17:52 +00:00
Paolo Amadini
660eb79aeb Bug 1439358 - Part 1 - Support "panelview" elements located anywhere in the document. r=Gijs
The showSubView public method now aligns with its callers and doesn't return a Promise anymore. The showMainView method still returns a Promise because at the moment it is used externally for asynchronous cleanup.

MozReview-Commit-ID: FcnEx5f5HKh

--HG--
extra : rebase_source : dc0a8e5267b7211c7ee3e2216bd1dc0cabdbd4bd
extra : intermediate-source : 9cc3eafb24f3936eb8ccb359f2f04e9839ae9ff2
extra : source : 7ce7a10fd212989eee76b482632eac9b985d4b2e
2018-02-12 16:44:00 +00:00