Check if the CSS inplace editor is currently using several lines
to display its value. When using several lines, prevent increment,
decrement and autocomplete features.
The autocomplete can still be triggered by typing a value at the end
of the input (or before a space). When the autocomplete popup is
opened, UP/DOWN still allow to cycle through the suggestions.
MozReview-Commit-ID: DapCdhjx444
--HG--
extra : rebase_source : e7c6e8a53d29b79174913c011e1ac07c39431238
Refactor the keypress event handler to make it easier to read.
MozReview-Commit-ID: 4yvlg7GIYMK
--HG--
extra : rebase_source : 8cf7b07511b36fea9db174606f62d84720a508af
Previously, every test and support file would be synced to the objdir
when running any test. Now that only those support files and tests requested
are synced, we note support files required beyond those in a test's
directory in ini manifests.
MozReview-Commit-ID: EmlDz9d4lqt
Only text styles should be copied between the replaced element and the input.
Other styles are still copied between the input and the measurement element.
MozReview-Commit-ID: 7YSWtjLgH2z
--HG--
extra : rebase_source : 568ac2a70b6b70e3df97bcb9ab2e55cc693a51b6
All the other methods use the style
{
myMethod() { ... }
}
while these two methods use
{
myMethod: function () { ... }
}
For consistency, we should use the common style here.
MozReview-Commit-ID: 5rg8uPoULyN
The default inplace-editor autocomplete behavior is not userfriendly
when combined with a multiline inplace-editor. Navigating up/down might
trigger an autocomplete suggestion.
Also, the autocomplete popup is not displayed at the correct position and
should take the multiline into account.
MozReview-Commit-ID: JTiCQ3HK5bn
--HG--
extra : rebase_source : 001becbe7cfde064b2163e7c2ebcc4aa82e22610
The inplaceEditor now supports a maxWidth configuration option which can either
be a number or a method returning a number. This maxWidth will be applied to the
hidden element used in order to autosize the input.
MozReview-Commit-ID: JTiCQ3HK5bn
--HG--
extra : rebase_source : dcf7ba4a897cd77b43b333ec3b5633dc9043e51d
extra : source : a93558488cf7fc9f54165bd5f98055e8a3901dac
Add an 'unit-change' event fired when shift+click on color and angle swatches.
Add a listener on this event in text-property-editor.js to call the same function
that's called when tooltip edit is commited to persist the new unit.
Edit some tests to adapt to this new behaviour and create some tests to make sure
the value obtained via shift+click are actually persisted.
MozReview-Commit-ID: CcF4oiBPEzT
--HG--
extra : transplant_source : %1B%40%A24%EDW.%C5%96%C8m%3C%1F4%DA%F78%D1%26%8B
Based on the original patch from danemacmillan.
* suggestion-picker.js
Add a new shared util to find the most popular css property in an array.
The list of popular css properties is extracted from chrome devtools code.
* autocomplete-popup.js
Can specify selected item index when opening the popup or setting items.
* inplace-editor.js
Use the suggestion-picker to select a default property.
MozReview-Commit-ID: JuWZzbBSBqX
--HG--
extra : rebase_source : 3317766ae63aea83f845d3cf3d134ecf60135f67
Add a swatch before angle values in the rules panel and allow cycling
through angle units with shift+click (like we already do for color units).
MozReview-Commit-ID: CWhoUQTkP1G
--HG--
extra : transplant_source : %5B%E5%AD%22%D2%20uk%07%EE%A9%E4%91YS%B3R%C3%DF%21