Commit Graph

254 Commits

Author SHA1 Message Date
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Paolo Amadini
228a7145fc Bug 1424264 - Part 3 - Use the minimum height from the older transitioning view. r=Gijs
This also fixes the clean up of the width and height properties of the viewContainer.

MozReview-Commit-ID: 28XQlUoLLCr
2018-01-26 14:20:10 +00:00
Paolo Amadini
178efe65fc Bug 1424264 - Part 2 - Move state related to view sizing to the PanelView class. r=Gijs
MozReview-Commit-ID: IsywTHd3qVV
2018-01-26 14:19:53 +00:00
Paolo Amadini
4ed7980f43 Bug 1424264 - Part 1 - Always update min-width and max-width before showing views. r=Gijs
This also removes some unneeded checks for variables that are now never false.

MozReview-Commit-ID: KVVwARLrpYO
2018-01-26 14:05:11 +00:00
Paolo Amadini
7281a38d7e Bug 1432016 - Part 4 - Move keyboard navigation to the PanelView class. r=Gijs
This allows removing the separate keyboard navigation map.

MozReview-Commit-ID: 2N0wflAvg7Y
2018-01-22 14:42:24 +00:00
Paolo Amadini
1958720fa5 Bug 1432016 - Part 3 - Use the PanelView class for knownViews and openViews. r=Gijs
MozReview-Commit-ID: CQ0Ao3FlRRc
2018-01-22 13:06:55 +00:00
Paolo Amadini
2f84510771 Bug 1432016 - Part 2 - Move descriptionHeightWorkaround and some other methods to the PanelView class. r=Gijs
MozReview-Commit-ID: 59fUuB35Ygy
2018-01-25 15:35:45 +00:00
Paolo Amadini
82768948ee Bug 1432016 - Part 1 - Add a PanelView class using a base class shared with PanelMultiView. r=Gijs
Only one method is moved to the PanelView class to simplify the keyboard navigation test.

MozReview-Commit-ID: CHB5FiT9ptn
2018-01-22 12:46:48 +00:00
Paolo Amadini
3970ea11c7 Bug 1432015 - Part 5 - Remove unused code. r=Gijs
MozReview-Commit-ID: IoURPSdQAiR
2018-01-21 11:37:50 +00:00
Paolo Amadini
42fddc9dc0 Bug 1432015 - Part 4 - Separate the set of known views from the stack of open views. r=Gijs
This makes the code easier to follow and facilitates future refactoring, for example the set of known views can be removed entirely by making the clean up and navigation code use the stack of open views.

The SlidingPanelView class can thus be removed, saving various lines of code. The class implemented a small optimization for garbage collection, that was already less effective because various other objects are created during each view transition anyways.

MozReview-Commit-ID: Z4JJMklUMf
2018-01-21 17:27:11 +00:00
Paolo Amadini
f6b0b3a5cf Bug 1432015 - Part 3 - Ensure that views passed to showSubView are added to the list of known views without having to reset the internal _panelViews variable. r=Gijs
MozReview-Commit-ID: Hld45ghdduv
2018-01-17 15:04:18 +00:00
Paolo Amadini
01051cc093 Bug 1432015 - Part 2 - Remove the setMainView methods. r=Gijs
The setMainView method of PanelMultiView controls the "mainview" attribute, which is already set or removed later in the showSubView method. When called at construction time, it changes the mainViewId if there is at least one child in the "panelmultiview" element and the original mainViewId does not already reference the first child. This would be incorrect, but in practice it never happens for either ephemeral or static panels, and can be avoided for the throw-away activated page action panel.

The setMainView method of PanelUI is never called, and this makes the corresponding PanelMultiView method removable.

MozReview-Commit-ID: 5bNidHfKFTA
2018-01-21 15:59:41 +00:00
Kris Maglione
1046270983 Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9
2018-01-24 22:04:59 -08:00
Kris Maglione
50ace7f99d Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
MozReview-Commit-ID: 8V1ZT53ReiP
2018-01-24 15:48:47 -08:00
Ian Moody
db7adf1a0b Bug 1425972 - Manually handle Tab navigation in PanelMultiView so it syncs with Arrow navigation. r=Gijs
MozReview-Commit-ID: 5PjXFZBeWzM
2017-12-19 19:37:34 +00:00
Paolo Amadini
13d678e2e6 Bug 1423891 - Panel header is gone when going back from Bookmarks to Library. r=Gijs
MozReview-Commit-ID: Bfgg61BH9L8
2017-12-07 15:32:40 +00:00
Paolo Amadini
a5de33f591 Bug 1417042 - Remove the "panelview" binding. r=Gijs
MozReview-Commit-ID: 26uQb3pteQd
2017-12-06 10:37:25 +00:00
Paolo Amadini
756cb221b2 Bug 1392340 - Height jumps when opening subviews of different lengths. r=Gijs
The height of the subview being opened was supposedly calculated using an off-screen container independent from the currently displayed views, but this didn't work as expected because of the incorrect box alignment. This is now fixed and the correct minimum and maximum heights are set on the container separately, also preventing the current view from flickering before the transition in case the subview was taller.

With this issue fixed, the height can now be recalculated each time the subview is opened, without the caching that caused incorrect results when the same view was reopened with different elements or text.

Jumping could also occur because of a border applied only during the transition, which could influence the subview height in the presence of wrapping text.

MozReview-Commit-ID: EWHs1hFKXT4
2017-11-28 16:53:42 +00:00
Sebastian Hengst
077047e8d8 Backed out changeset bce38a7817ee (bug 1417042) for browser-chrome failures, e.g. browser/components/customizableui/test/browser_987640_charEncoding.js and browser/base/content/test/urlbar/browser_page_action_menu.js. r=backout on a CLOSED TREE 2017-11-27 18:03:15 +02:00
Paolo Amadini
6f96d883c6 Bug 1417042 - Remove the "panelview" binding. r=Gijs
MozReview-Commit-ID: 26uQb3pteQd
2017-11-23 18:07:15 +00:00
Paolo Amadini
ea9b09c38d Bug 1414244 - Part 7 - Remove unused code paths from PanelMultiview.jsm. r=Gijs
MozReview-Commit-ID: 9cwaAZXqDGO
2017-11-23 15:18:14 +00:00
Paolo Amadini
977acaa16f Bug 1414244 - Part 4 - Remove the "panel-clickcapturer" element. r=Gijs
MozReview-Commit-ID: 3aPVbnmr7QB
2017-11-11 22:48:32 +00:00
Paolo Amadini
cf6e951359 Bug 1414244 - Part 3 - Remove the "panel-subviews" container. r=Gijs
MozReview-Commit-ID: 2GGJ1myKuF5
2017-11-11 22:09:30 +00:00
Paolo Amadini
fbb05038da Bug 1414244 - Part 2 - Remove the "viewtype" attribute. r=Gijs
MozReview-Commit-ID: 8fq0KLfYWnc
2017-11-21 13:22:47 +00:00
Paolo Amadini
dfdeedad26 Bug 1414244 - Part 1 - Remove the "panelid" attribute. r=Gijs
MozReview-Commit-ID: 4o27h6PhCRg
2017-11-11 13:05:51 +00:00
Sam Foster
6e5439f706 Bug 1412364 - defer applying maxHeight in PanelMultiView until popup is positioned. r=Paolo
* Let popup code initially measure and place the panel without maxHeight, this ensures alignmentPosition is a reasonable value
* Assign maxHeight from a popuppositioned handler and update the comment explaining the role of the autoPosition property
* Refactor to move the maxHeight calculation into a method on PMV
* panel autoPosition now gets reset to false in popuppositioned (was popupshowing) as the ShowWithPositionedEvent on popupFrame sets it back to true every time
* Update reflow tests with new signatures, and elimination of 1 reflow
* In appMenu reflow test, we must now wait for popupshown before opening subviews

MozReview-Commit-ID: KfHxngnajM3
2017-11-16 17:12:06 -08:00
Gijs Kruitbosch
4240d1040c Bug 1388029 - remove dead CSS relating to the old panel, r=jaws
MozReview-Commit-ID: FoXjvWPc9in
2017-11-07 12:52:56 +00:00
Paolo Amadini
3f2ebfffab Bug 1409301 - Update the site security subview to the Photon style. r=johannh
The site security subview is now implemented using the "photonpanelmultiview" element, replacing the last instance of the "panelmultiview" element. The subview features a standard Photon header, hence the connection state icon was moved to the element below it. This makes the styles more similar between the main view and the subview. The connection state styles are now applied using a class name, and the tests have been updated accordingly.

This change required some fixes in the "photonpanelmultiview" implementation to make sure the height of the subview is correct and to allow keyboard navigation back to the main view.

Since the expander button and the permission controls in the main view are not visible anymore after the subview is shown, some code related to focus and hover could be removed as well.

MozReview-Commit-ID: 4nIAPWJPV8k
2017-11-11 19:13:43 +00:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Mike de Boer
5d9a84b388 Bug 1407591 - Listen for the 'transitioncancel' event as well to ensure that a panel transition is also cleaned up properly in this rare case. r=Paolo
MozReview-Commit-ID: 2bph43ndzJJ
2017-10-12 13:26:04 +02:00
Mike de Boer
ad452d3c6f Bug 1405942 - Make sure to always apply the descriptionHeightWorkaround in Photon panels on popupshown, because it might've missed elements that were hidden. r=Paolo
MozReview-Commit-ID: 9xSqoZGJ3MF
2017-10-10 12:42:43 +02:00
Mike de Boer
ef64a8e308 Bug 1387808 - Don't ever fixate the width and height of the main view, but leave it flexible. r=Gijs
MozReview-Commit-ID: AJw6yI6Onje
2017-10-05 13:14:02 +02: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
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
Sebastian Hengst
971b4b6606 Backed out changeset 658b68ee4d0a (bug 1401383) for frequently failing browser-chrome's browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js, especially on Linux x64 asan. r=backout 2017-09-20 17:28:51 +02:00
Gijs Kruitbosch
782b1c0650 Bug 1401383 - remove anchor state after transition even if the transition is canceled, and always set main view as current, r=mikedeboer
Prior to this change, showMainView set the 'current' attribute on a main view, but then _cleanupTransitionPhase() would remove it again.
This patch fixes that by calling showMainView *after* _cleanupTransitionPhase.

Separately, 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: 24FYaxDVlga
2017-09-19 23:53:59 +01:00
Mike de Boer
998cb252ae Bug 1374749 - Animate the panelviews differently to make it look as if the view to show is pushing the previous view out of the panel. r=jaws
MozReview-Commit-ID: Dy6UppV3xDH
2017-09-12 21:33:25 +02:00
Sebastian Hengst
f5e44610fc Backed out changeset f09b2b387751 (bug 1374749) for frequently failing browser-chrome's browser/components/extensions/test/browser/test-oop-extensions/browser_ext_browserAction_popup_resize.js on macOS. r=backout 2017-09-11 18:45:35 +02:00
Mike de Boer
0b4bd52893 Bug 1374749 - Animate the panelviews differently to make it look as if the view to show is pushing the previous view out of the panel. r=jaws
MozReview-Commit-ID: Dy6UppV3xDH
2017-09-11 16:28:06 +02:00
Sebastian Hengst
a13bb1402a Backed out changeset 20f6207757f3 (bug 1374749) for failing browser-chrome's browser/base/content/test/urlbar/browser_page_action_menu.js. r=backout 2017-09-08 19:42:22 +02:00
Mike de Boer
2aab007fa2 Bug 1374749 - Animate the panelviews differently to make it look as if the view to show is pushing the previous view out of the panel. r=jaws
MozReview-Commit-ID: Dy6UppV3xDH
2017-09-08 18:02:10 +02:00
Mike de Boer
95e3288ebd Bug 1390336 - Disable panelview keyboard navigation using arrow keys in the overflow panel, because input boxes can be in there. r=Gijs
MozReview-Commit-ID: DxZv8JDp2Q2
2017-09-08 11:53:11 +02:00
Mike de Boer
13c09563a1 Bug 1354532 - Part 3 - Ensure that the offscreen bounds check for panelviews does not cause temporary empty panels. r=Paolo
MozReview-Commit-ID: 8EACBXDekIW
2017-09-06 17:21:24 +02:00
Sebastian Hengst
d6f569157f Backed out changeset 545712909b9b (bug 1354532) 2017-09-06 16:47:06 +02:00
Mike de Boer
0ce0f0228a Bug 1354532 - Part 3 - Ensure that the offscreen bounds check for panelviews does not cause temporary empty panels. r=Paolo
MozReview-Commit-ID: 8EACBXDekIW
2017-09-06 16:23:08 +02:00
Blake Winton
8a54569293 Bug 1392332 - Set the viewtype attribute correctly when going back to the main view. r=Gijs.
MozReview-Commit-ID: KMK4fQn5DwZ
2017-08-21 13:09:37 -04:00